diff --git a/build.gradle.kts b/build.gradle.kts index 837ffa1..0cf538d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,11 +6,12 @@ plugins { tasks.withType { manifest { attributes["Main-Class"] = "dev.celestialfox.spectrumsurvival.Server" + archiveFileName.set("SpectrumSurvival.jar") } } group = "dev.celestialfox.spectrumsurvival" -version = "1.0" +version = "1.1" repositories { mavenCentral() diff --git a/server/SpectrumSurvival.jar b/server/SpectrumSurvival.jar index 0c2aa6a..dbba278 100644 Binary files a/server/SpectrumSurvival.jar and b/server/SpectrumSurvival.jar differ diff --git a/src/main/java/dev/celestialfox/spectrumsurvival/Server.java b/src/main/java/dev/celestialfox/spectrumsurvival/Server.java index ad689a9..c47b89b 100644 --- a/src/main/java/dev/celestialfox/spectrumsurvival/Server.java +++ b/src/main/java/dev/celestialfox/spectrumsurvival/Server.java @@ -14,6 +14,8 @@ import net.minestom.server.MinecraftServer; import net.minestom.server.adventure.audience.Audiences; import net.minestom.server.command.CommandManager; +import net.minestom.server.network.packet.client.play.ClientCommandChatPacket; +import net.minestom.server.network.packet.client.play.ClientSignedCommandChatPacket; import net.minestom.server.timer.TaskSchedule; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,6 +65,11 @@ public static void registerCommands() { commandManager.register(new AboutCommand()); commandManager.register(new CreditsCommand()); commandManager.register(new StopCommand()); + + // Fix for older Minecraft versions (when using ViaBackwards) + MinecraftServer.getPacketListenerManager().setPlayListener(ClientSignedCommandChatPacket.class, (packet, player) -> { + MinecraftServer.getPacketListenerManager().processClientPacket(new ClientCommandChatPacket(packet.message()), player.getPlayerConnection()); + }); } public static void tablist() {