aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hype/bbsentials/packets
diff options
context:
space:
mode:
authorHacktheTime <l4bg0jb7@duck.com>2023-09-26 20:11:31 +0200
committerHacktheTime <l4bg0jb7@duck.com>2023-09-26 20:11:31 +0200
commit108ef3378b84c66dad76662ffc0d5b8ec8914c51 (patch)
treeab07c66e105ac3b00af03bce2f688c027693d964 /src/main/java/de/hype/bbsentials/packets
parent29f560cc2d3fcaa4e741b4db35af1ed154da9e96 (diff)
downloadBBsentials-108ef3378b84c66dad76662ffc0d5b8ec8914c51.tar.gz
BBsentials-108ef3378b84c66dad76662ffc0d5b8ec8914c51.tar.bz2
BBsentials-108ef3378b84c66dad76662ffc0d5b8ec8914c51.zip
removed DisplayMessagePacket.java due too SystemMessagePacket.java existing and being more useful
reworked the display of messages to have better colors by default. (splitted it up in a lot of different methods)
Diffstat (limited to 'src/main/java/de/hype/bbsentials/packets')
-rw-r--r--src/main/java/de/hype/bbsentials/packets/AbstractPacket.java2
-rw-r--r--src/main/java/de/hype/bbsentials/packets/PacketManager.java1
-rw-r--r--src/main/java/de/hype/bbsentials/packets/PacketUtils.java2
-rw-r--r--src/main/java/de/hype/bbsentials/packets/packets/DisplayMessagePacket.java13
4 files changed, 2 insertions, 16 deletions
diff --git a/src/main/java/de/hype/bbsentials/packets/AbstractPacket.java b/src/main/java/de/hype/bbsentials/packets/AbstractPacket.java
index 116c9b2..152e3d8 100644
--- a/src/main/java/de/hype/bbsentials/packets/AbstractPacket.java
+++ b/src/main/java/de/hype/bbsentials/packets/AbstractPacket.java
@@ -20,7 +20,7 @@ public class AbstractPacket {
public boolean isValid(BBsentialConnection connection, String[] allowedNullFields) {
if (isApiSupported(BBsentials.config)) {
- Chat.sendPrivateMessageToSelf("You are using an outdated version of the mod");
+ Chat.sendPrivateMessageToSelfFatal("You are using an outdated version of the mod");
}
return true;
}
diff --git a/src/main/java/de/hype/bbsentials/packets/PacketManager.java b/src/main/java/de/hype/bbsentials/packets/PacketManager.java
index 9c4a6b3..6e1d01c 100644
--- a/src/main/java/de/hype/bbsentials/packets/PacketManager.java
+++ b/src/main/java/de/hype/bbsentials/packets/PacketManager.java
@@ -27,7 +27,6 @@ public class PacketManager {
packets.add(new Packet<>(BroadcastMessagePacket.class, connection::onBroadcastMessagePacket));
packets.add(new Packet<>(ChChestPacket.class, connection::onChChestPacket));
packets.add(new Packet<>(DisconnectPacket.class, connection::onDisconnectPacket));
- packets.add(new Packet<>(DisplayMessagePacket.class, connection::onDisplayMessagePacket));
packets.add(new Packet<>(DisplayTellrawMessagePacket.class, connection::onDisplayTellrawMessagePacket));
// packets.add(new Packet<>(InternalCommandPacket.class, connection::dummy));
packets.add(new Packet<>(InvalidCommandFeedbackPacket.class, connection::onInvalidCommandFeedbackPacket));
diff --git a/src/main/java/de/hype/bbsentials/packets/PacketUtils.java b/src/main/java/de/hype/bbsentials/packets/PacketUtils.java
index 2445e9f..8dcd4d7 100644
--- a/src/main/java/de/hype/bbsentials/packets/PacketUtils.java
+++ b/src/main/java/de/hype/bbsentials/packets/PacketUtils.java
@@ -110,7 +110,7 @@ public class PacketUtils {
for (Packet<? extends AbstractPacket> packet : manager.getPackets()) {
if (!packetName.equals(packet.getClazz().getSimpleName())) continue;
try {
- if (BBsentials.getConfig().isDetailedDevModeEnabled()) Chat.sendPrivateMessageToSelf("§b"+packetName+":"+rawJson);
+ if (BBsentials.getConfig().isDetailedDevModeEnabled()) Chat.sendPrivateMessageToSelfDebug(packetName+":"+rawJson);
tryToProcessPacket(packet, rawJson);
return true;
} catch (Throwable t) {
diff --git a/src/main/java/de/hype/bbsentials/packets/packets/DisplayMessagePacket.java b/src/main/java/de/hype/bbsentials/packets/packets/DisplayMessagePacket.java
deleted file mode 100644
index 9774f38..0000000
--- a/src/main/java/de/hype/bbsentials/packets/packets/DisplayMessagePacket.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package de.hype.bbsentials.packets.packets;
-
-import de.hype.bbsentials.packets.AbstractPacket;
-
-public class DisplayMessagePacket extends AbstractPacket {
-
- public final String message;
-
- public DisplayMessagePacket(String message) {
- super(1, 1); //Min and Max supported Version
- this.message = message;
- }
-}