Skip to content

Commit

Permalink
Update 1.4.0: Target Java 11
Browse files Browse the repository at this point in the history
Merge pull request #25 from DiscordSRV/java11
  • Loading branch information
RezzedUp committed Jul 19, 2021
2 parents d7073e7 + 4f2f287 commit b09f6ef
Show file tree
Hide file tree
Showing 47 changed files with 2,944 additions and 488 deletions.
28 changes: 28 additions & 0 deletions .run/clean-package.run.xml
@@ -0,0 +1,28 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="clean-package" type="MavenRunConfiguration" factoryName="Maven">
<MavenSettings>
<option name="myGeneralSettings" />
<option name="myRunnerSettings" />
<option name="myRunnerParameters">
<MavenRunnerParameters>
<option name="profiles">
<set />
</option>
<option name="goals">
<list>
<option value="clean" />
<option value="package" />
</list>
</option>
<option name="pomFileName" />
<option name="profilesMap">
<map />
</option>
<option name="resolveToWorkspace" value="false" />
<option name="workingDirPath" value="$PROJECT_DIR$" />
</MavenRunnerParameters>
</option>
</MavenSettings>
<method v="2" />
</configuration>
</component>
30 changes: 30 additions & 0 deletions .run/update-license-headers.run.xml
@@ -0,0 +1,30 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="update-license-headers" type="MavenRunConfiguration" factoryName="Maven">
<MavenSettings>
<option name="myGeneralSettings" />
<option name="myRunnerSettings" />
<option name="myRunnerParameters">
<MavenRunnerParameters>
<option name="profiles">
<set />
</option>
<option name="goals">
<list>
<option value="license:remove" />
<option value="license:format" />
</list>
</option>
<option name="pomFileName" />
<option name="profilesMap">
<map>
<entry key="development" value="false" />
</map>
</option>
<option name="resolveToWorkspace" value="true" />
<option name="workingDirPath" value="$PROJECT_DIR$" />
</MavenRunnerParameters>
</option>
</MavenSettings>
<method v="2" />
</configuration>
</component>
53 changes: 41 additions & 12 deletions README.md
@@ -1,8 +1,10 @@
# ![](http://i.imgur.com/DZwTm1u.png)
# ![](https://i.imgur.com/DZwTm1u.png)

**Spigot:** https://www.spigotmc.org/resources/discordsrv-staff-chat.44245/

DiscordSRV-Staff-Chat is a staff chat plugin that connects to a Discord channel (via [DiscordSRV](https://github.com/Scarsz/DiscordSRV)), allowing in-game staff to communicate with staff on Discord.

![](http://i.imgur.com/363hVvE.gif)
![](https://i.imgur.com/ssKGDTJ.gif)

## Installation

Expand All @@ -13,43 +15,70 @@ DiscordSRV-Staff-Chat is a staff chat plugin that connects to a Discord channel

### Adding a staff-chat channel

Add a **"staff-chat"** entry to DiscordSRV's config. Note: it's very important that this entry is called "staff-chat".
Add a **"staff-chat"** entry to DiscordSRV's config. Note: it's very important that this entry is called `"staff-chat"`.

```yaml
# Channel links from game to Discord
# syntax is Channels: {"in-game channel name": "numerical channel ID from Discord", "another in-game channel name": "another numerical channel ID from Discord"}
# The first channel pair specified in this config option will be the "main" channel, used for sending player joins/quits/deaths/achievements/etc
# syntax is Channels: {"in-game channel name from Minecraft": "numerical channel ID from Discord", "another in-game channel name from Minecraft": "another numerical channel ID from Discord"}
#
Channels: {"global": "000000000000000000", "staff-chat": "000000000000000000"}
```

Replace all those zeros with your staff chat's channel ID.

![](http://i.imgur.com/Y8ncgsh.gif)
![](https://i.imgur.com/tXNU6Ei.gif)

```yaml
Channels: {"global": "000000000000000000", "staff-chat": "337769984539361281"}
```


## Commands & Permissions

### /staffchat

![](http://i.imgur.com/BcjXNKl.gif)
![](https://i.imgur.com/ILwkaqa.gif)

**Permission:** `staffchat.access`

**Aliases:** `/adminchat`, `/schat`, `/achat`, `/sc`, `/ac`, and `/a`

**Usage:**
* `/staffchat` - Toggle automatic staff chat.
* `/staffchat <message>` - Send a message to the staff chat.
- `/staffchat` - Toggle automatic staff chat.
- `/staffchat <message>` - Send a message to the staff chat.

### /leavestaffchat

![](https://i.imgur.com/BO3fgmC.png)

**Permission:** `staffchat.access`

**Aliases:** `/leaveadminchat`

**Usage:**
- `/leavestaffchat` - Stop receiving staff chat messages.
- This can be disabled in the config if you don't want staff members to turn off their staff chat.

### /joinstaffchat

![](https://i.imgur.com/7EriNrS.png)

**Permission:** `staffchat.access`

**Aliases:** `/joinadminchat`

**Usage:**
- `/joinstaffchat` - Start receiving staff chat messages again if you previously left.

### /managestaffchat

**Permission:** `staffchat.manage`

**Aliases:** `/discordstaffchat`, `/discordadminchat`, `/manageadminchat`, `/managesc`, `/manageac`, `/dsc`, `/msc`, `/dac`, and `/mac`
**Aliases:** `/discordsrv-staff-chat`, `/discrodsrvstaffchat`, `/discordstaffchat`, `/discordadminchat`, `/manageadminchat`

**Usage:**
* `/managestaffchat` - Display plugin information and command usage.
* `/managestaffchat reload` - Reload the config.
- `/managestaffchat` - Display plugin information and command usage.
- `/managestaffchat reload` - Reload configs.
- `/managestaffchat debug` - Enable or disable debugging.

[![](https://bstats.org/signatures/bukkit/DiscordSRV-Staff-Chat.svg)](https://bstats.org/plugin/bukkit/DiscordSRV-Staff-Chat/11056)
104 changes: 94 additions & 10 deletions pom.xml
Expand Up @@ -6,12 +6,21 @@

<groupId>com.rezzedup</groupId>
<artifactId>discordsrv-staff-chat</artifactId>
<version>1.4.0</version>

<name>DiscordSRV-Staff-Chat</name>
<version>1.3.4</version>
<inceptionYear>2017</inceptionYear>
<url>https://github.com/DiscordSRV/Staff-Chat</url>
<description>A staff-chat plugin that hooks into DiscordSRV.</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<shade.relocation>com.rezzedup.discordsrv.staffchat.shaded</shade.relocation>

<!-- License headers -->
<license.header.year>${project.inceptionYear}-2021</license.header.year>
<license.header.owner>RezzedUp and Contributors</license.header.owner>
<license.header.url>https://github.com/DiscordSRV/Staff-Chat</license.header.url>
</properties>

<repositories>
Expand All @@ -24,8 +33,8 @@
<url>https://nexus.scarsz.me/content/repositories/public/</url>
</repository>
<repository>
<id>extendedclip-repo</id>
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

Expand All @@ -34,23 +43,48 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- DiscordSRV (via scarsz-nexus) -->
<dependency>
<groupId>com.discordsrv</groupId>
<artifactId>discordsrv</artifactId>
<version>1.22.0</version>
<version>1.23.0</version>
<scope>provided</scope>
</dependency>
<!-- PlaceholderAPI (via extendedclip-repo) -->
<!-- PlaceholderAPI (via jitpack.io) -->
<dependency>
<groupId>me.clip</groupId>
<groupId>com.github.placeholderapi</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.6</version>
<version>2.10.9</version>
<scope>provided</scope>
</dependency>
<!-- LeafCommunity ConfigValues (via jitpack.io) -->
<dependency>
<groupId>community.leaf.configvalues</groupId>
<artifactId>config-values-bukkit</artifactId>
<version>0.0.3</version>
</dependency>
<!-- LeafCommunity Eventful (via jitpack.io) -->
<dependency>
<groupId>community.leaf.eventful</groupId>
<artifactId>events-bukkit</artifactId>
<version>0.1.0</version>
</dependency>
<!-- LeafCommunity Tasks (via jitpack.io) -->
<dependency>
<groupId>community.leaf.tasks</groupId>
<artifactId>tasks-bukkit</artifactId>
<version>0.0.1</version>
</dependency>
<!-- Java SemVer (via maven-central) -->
<!-- https://github.com/zafarkhaja/jsemver -->
<dependency>
<groupId>com.github.zafarkhaja</groupId>
<artifactId>java-semver</artifactId>
<version>0.9.0</version>
</dependency>
<!-- bStats (via maven-central) -->
<dependency>
<groupId>org.bstats</groupId>
Expand All @@ -76,8 +110,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<!-- Shade dependencies -->
Expand All @@ -88,6 +122,18 @@
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<relocations>
<relocation>
<pattern>com.github</pattern>
<shadedPattern>${shade.relocation}.com.github</shadedPattern>
</relocation>
<relocation>
<pattern>community.leaf</pattern>
<shadedPattern>${shade.relocation}.community.leaf</shadedPattern>
</relocation>
<relocation>
<pattern>com.rezzedup.util</pattern>
<shadedPattern>${shade.relocation}.com.rezzedup.util</shadedPattern>
</relocation>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>${shade.relocation}.org.bstats</shadedPattern>
Expand Down Expand Up @@ -120,6 +166,44 @@
</execution>
</executions>
</plugin>
<!-- Add license headers -->
<!-- `mvn license:format` or run the `update-license-headers` configuration -->
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>4.1</version>
<configuration>
<properties>
<year>${license.header.year}</year>
<owner>${license.header.owner}</owner>
<email>${license.header.url}</email>
</properties>
<licenseSets>
<licenseSet>
<header>com/mycila/maven/plugin/license/templates/MIT.txt</header>
<excludes>
<exclude>*.md</exclude>
<exclude>*.txt</exclude>
<exclude>*.xml</exclude>
<exclude>*.yml</exclude>
<exclude>.run/**</exclude>
<exclude>examples/**</exclude>
<exclude>src/test/resources/**</exclude>
<exclude>src/main/resources/**</exclude>
</excludes>
</licenseSet>
</licenseSets>
</configuration>
<!-- Check for missing license headers -->
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<!-- Filter resource files -->
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/com/rezzedup/discordsrv/staffchat/ChatService.java
@@ -1,3 +1,25 @@
/*
* The MIT License
* Copyright © 2017-2021 RezzedUp and Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.rezzedup.discordsrv.staffchat;

public enum ChatService
Expand Down

0 comments on commit b09f6ef

Please sign in to comment.