From 3278ddaddc86d6171fecf82817d246fe2cd53c28 Mon Sep 17 00:00:00 2001 From: GEOEGII555 <57674559+GEOEGII555@users.noreply.github.com> Date: Wed, 11 Sep 2024 02:19:56 +0300 Subject: [PATCH] Block the /execute ... run datapack command (#361) * Block the /execute ... run datapack command The /datapack list command is useless, and the other 2 subcommands (/datapack enable and /datapack disable) can be used to cause huge lag on the server. * Update ServerCommand.java (partial revert) --- .../java/pw/kaboom/extras/modules/server/ServerCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java b/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java index 7698b9c..9659fec 100644 --- a/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java +++ b/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java @@ -23,7 +23,7 @@ public final class ServerCommand implements Listener { private static final Pattern SELECTOR_PATTERN = Pattern.compile("(?>\\s)*@[aepsr](?>\\s)*"); private static final Logger LOGGER = JavaPlugin.getPlugin(Main.class).getLogger(); - private static final String[] COMMANDS = { "execute", "clone", "fill", "forceload", "kick", + private static final String[] COMMANDS = { "execute", "clone", "datapack", "fill", "forceload", "kick", "locate", "locatebiome", "me", "msg", "reload", "save-all", "say", "spreadplayers", "stop", "summon", "teammsg", "teleport", "tell", "tellraw", "tm", "tp", "w", "place", "fillbiome", "ride" , "tick", "jfr"};