From d0246790cb7cc5e03dc4f6aa4ecdee5e141660c1 Mon Sep 17 00:00:00 2001 From: Allink Date: Sat, 1 Apr 2023 23:58:23 +0100 Subject: [PATCH] Update Paper API to 1.19.4 & limit commandModificationBlockLimit gamerule --- pom.xml | 2 +- .../pw/kaboom/extras/modules/server/ServerGameRule.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 8519cc4..e98f3b3 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ io.papermc.paper paper-api - 1.18.2-R0.1-SNAPSHOT + 1.19.4-R0.1-SNAPSHOT provided diff --git a/src/main/java/pw/kaboom/extras/modules/server/ServerGameRule.java b/src/main/java/pw/kaboom/extras/modules/server/ServerGameRule.java index 7e816d8..22c7e8d 100644 --- a/src/main/java/pw/kaboom/extras/modules/server/ServerGameRule.java +++ b/src/main/java/pw/kaboom/extras/modules/server/ServerGameRule.java @@ -1,11 +1,10 @@ package pw.kaboom.extras.modules.server; +import io.papermc.paper.event.world.WorldGameRuleChangeEvent; import org.bukkit.GameRule; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; -import io.papermc.paper.event.world.WorldGameRuleChangeEvent; - public final class ServerGameRule implements Listener { @EventHandler void onGameRuleChange(final WorldGameRuleChangeEvent event) { @@ -14,7 +13,9 @@ public final class ServerGameRule implements Listener { if ((gameRule == GameRule.RANDOM_TICK_SPEED && Integer.parseInt(event.getValue()) > 6) || (event.getGameRule() == GameRule.SPAWN_RADIUS - && Integer.parseInt(event.getValue()) > 100)) { + && Integer.parseInt(event.getValue()) > 100) + || (event.getGameRule() == GameRule.COMMAND_MODIFICATION_BLOCK_LIMIT + && Integer.parseInt(event.getValue()) > 32768)) { event.setCancelled(true); } }