Update ServerCommand.java

This commit is contained in:
GEOEGII555 2024-08-20 22:00:39 +04:00 committed by GitHub
parent 8fe96bcc2b
commit 994b6eff6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,6 +76,11 @@ public final class ServerCommand implements Listener {
commandName = "/" + arr[1].toLowerCase();
}
// Block /clone only in command blocks
if ((sender instanceof BlockCommandSender) || (sender instanceof CommandMinecart)) {
if (commandName == "/clone" || commandName == "/minecraft:clone") return "cancel";
}
try {
switch (commandName) {
case "/minecraft:execute", "/execute" -> {