Skip to content

Commit

Permalink
Block the /execute ... run datapack command (#361)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
GEOEGII555 authored Sep 10, 2024
1 parent 7450b8b commit 3278dda
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"};
Expand Down

0 comments on commit 3278dda

Please sign in to comment.