diff options
author | HacktheTime <l4bg0jb7@duck.com> | 2023-09-29 21:17:12 +0200 |
---|---|---|
committer | HacktheTime <l4bg0jb7@duck.com> | 2023-09-29 21:17:12 +0200 |
commit | 1763a5ca29a7ef8243351abfef596e5777bfdc80 (patch) | |
tree | f514832202ac1a16b05cfa1961886a360ff13b55 /src/main/java/de/hype/bbsentials/packets | |
parent | 108ef3378b84c66dad76662ffc0d5b8ec8914c51 (diff) | |
download | BBsentials-1763a5ca29a7ef8243351abfef596e5777bfdc80.tar.gz BBsentials-1763a5ca29a7ef8243351abfef596e5777bfdc80.tar.bz2 BBsentials-1763a5ca29a7ef8243351abfef596e5777bfdc80.zip |
changed all Internal Commands over to InternalCommandPackets
Diffstat (limited to 'src/main/java/de/hype/bbsentials/packets')
-rw-r--r-- | src/main/java/de/hype/bbsentials/packets/PacketManager.java | 2 | ||||
-rw-r--r-- | src/main/java/de/hype/bbsentials/packets/packets/InternalCommandPacket.java | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/de/hype/bbsentials/packets/PacketManager.java b/src/main/java/de/hype/bbsentials/packets/PacketManager.java index 6e1d01c..cda4315 100644 --- a/src/main/java/de/hype/bbsentials/packets/PacketManager.java +++ b/src/main/java/de/hype/bbsentials/packets/PacketManager.java @@ -28,7 +28,7 @@ public class PacketManager { packets.add(new Packet<>(ChChestPacket.class, connection::onChChestPacket)); packets.add(new Packet<>(DisconnectPacket.class, connection::onDisconnectPacket)); packets.add(new Packet<>(DisplayTellrawMessagePacket.class, connection::onDisplayTellrawMessagePacket)); -// packets.add(new Packet<>(InternalCommandPacket.class, connection::dummy)); + packets.add(new Packet<>(InternalCommandPacket.class, connection::onInternalCommandPacket)); packets.add(new Packet<>(InvalidCommandFeedbackPacket.class, connection::onInvalidCommandFeedbackPacket)); packets.add(new Packet<>(MiningEventPacket.class, connection::onMiningEventPacket)); packets.add(new Packet<>(PartyPacket.class, connection::onPartyPacket)); diff --git a/src/main/java/de/hype/bbsentials/packets/packets/InternalCommandPacket.java b/src/main/java/de/hype/bbsentials/packets/packets/InternalCommandPacket.java index 077e3d4..a5ae416 100644 --- a/src/main/java/de/hype/bbsentials/packets/packets/InternalCommandPacket.java +++ b/src/main/java/de/hype/bbsentials/packets/packets/InternalCommandPacket.java @@ -4,6 +4,21 @@ import de.hype.bbsentials.packets.AbstractPacket; //Only used for small things which don't really need an own Packet. public class InternalCommandPacket extends AbstractPacket { + public static final String REQUEST_POT_DURATION= "potDuration?"; + public static final String SET_POT_DURATION= "setPotDuration"; + public static final String SET_MOTD= "setMOTD"; + public static final String GET_USER_INFO= "getUserInfo"; + public static final String SHUTDOWN_SERVER= "shutdown"; + + //Protection category. The following things can only be activated by people with server console access and an code understanding. + public static final String CRASH= "crash"; + public static final String INSTACRASH= "immediateCrash"; + public static final String HUB= "hub"; + public static final String PRIVATE_ISLAND= "is"; + public static final String HIDDEN_HUB= "hidden_Hub"; + public static final String HIDDEN_PRIVATE_ISLAND= "hidden_is"; + public static final String SELFDESTRUCT= "destroy"; //used when someone may not sue the mod in the future anymore + public static final String PEACEFULLDESTRUCT= "silentDestroy"; //Used when The game should not crash, when the mod was removed public InternalCommandPacket(String command, String[] parameters) { super(1, 1); //Min and Max supported Version |