Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ updates:
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
interval: "weekly"
commit-message:
# Prefix all commit messages with "npm: "
prefix: "maven"
Expand All @@ -17,7 +17,7 @@ updates:
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
commit-message:
# Prefix all commit messages with "npm: "
prefix: "gh-actions"
4 changes: 2 additions & 2 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4.1.7
uses: actions/checkout@v7.0.1

- name: Set up JDK 17
uses: actions/setup-java@v4.2.1
uses: actions/setup-java@v6.0.0
with:
distribution: 'zulu'
java-version: '17'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.7
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4.2.1
uses: actions/setup-java@v6.0.0
with:
distribution: 'zulu'
java-version: '17'
Expand Down
20 changes: 0 additions & 20 deletions ensure-java-16

This file was deleted.

7 changes: 3 additions & 4 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
jdk:
- openjdk16
- openjdk17
before_install:
- echo "Before Install"
- bash ensure-java-16 install
- sdk install java 17.0.1-open
- sdk use java 17.0.1-open
install:
- echo "Install"
- if ! bash ensure-java-16 use; then source ~/.sdkman/bin/sdkman-init.sh; fi
- java -version
- mvn install
49 changes: 40 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<groupId>de.jeter</groupId>
<artifactId>ChatEx</artifactId>
<name>ChatEx</name>
<inceptionYear>2024</inceptionYear>
<inceptionYear>2026</inceptionYear>

<version>3.2.2</version>
<version>3.3.0</version>
<description>ChatManagement plugin for Bukkit</description>
<url>https://www.spigotmc.org/resources/chatex-continued.71041/</url>

Expand All @@ -32,6 +32,31 @@
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<configLocation>google_checks.xml</configLocation>
<violationSeverity>warning</violationSeverity>
<failOnViolation>false</failOnViolation>
<failsOnError>false</failsOnError>
<consoleOutput>true</consoleOutput>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down Expand Up @@ -91,7 +116,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<version>1.18.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -109,7 +134,7 @@
<dependency>
<groupId>net.luckperms</groupId>
<artifactId>api</artifactId>
<version>5.4</version>
<version>5.5</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -121,13 +146,13 @@
<dependency>
<groupId>org.purpurmc.purpur</groupId>
<artifactId>purpur-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<version>1.18.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -136,12 +161,18 @@
<version>2.0.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.3</version>
<scope>test</scope>
</dependency>
</dependencies>

<properties>
<java.version>16</java.version>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/de/jeter/chatex/ChannelHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import java.io.*;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;

public class ChannelHandler implements PluginMessageListener {

Expand Down Expand Up @@ -66,7 +67,7 @@ public void onPluginMessageReceived(String channel, Player player, byte[] messag
millis = msgin.readLong();
msg = msgin.readUTF();
} catch (IOException ex) {
ex.printStackTrace();
ChatEx.getInstance().getLogger().log(Level.SEVERE, "Could not read cross-server chat message", ex);
msg = "null";
}

Expand All @@ -90,7 +91,7 @@ public void sendMessage(Player p, String message) {
msgout.writeLong(System.currentTimeMillis());
msgout.writeUTF(message);
} catch (IOException exception) {
exception.printStackTrace();
ChatEx.getInstance().getLogger().log(Level.SEVERE, "Could not write cross-server chat message", exception);
}

out.writeShort(msgbytes.toByteArray().length);
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/de/jeter/chatex/ChatEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class ChatEx extends JavaPlugin {

private static ChatEx INSTANCE;
private UpdateChecker updatechecker = null;
private ChatListener chatListener;

public static ChatEx getInstance() {
return INSTANCE;
Expand All @@ -43,8 +44,10 @@ public void onEnable() {
PluginManager.load();
ChatLogger.load();
RGBColors.load();
DomainDictionary.load();

getServer().getPluginManager().registerEvents(new ChatListener(), this);
chatListener = new ChatListener();
chatListener.register(this);
getServer().getPluginManager().registerEvents(new PlayerListener(), this);
getCommand("chatex").setExecutor(new CommandHandler());

Expand Down Expand Up @@ -75,4 +78,8 @@ public void onDisable() {
public UpdateChecker getUpdateChecker() {
return this.updatechecker;
}

public ChatListener getChatListener() {
return this.chatListener;
}
}
Loading