From 4a917201b403879e436df7f15bb5e2263feea2d0 Mon Sep 17 00:00:00 2001 From: Chip <65827213+ChipmunkMC@users.noreply.github.com> Date: Fri, 4 Nov 2022 22:11:40 +0000 Subject: [PATCH] Unblock selector even more (#327) --- .../extras/modules/server/ServerCommand.java | 31 ------------------- 1 file changed, 31 deletions(-) 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 cc3d046..03a5dbc 100644 --- a/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java +++ b/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java @@ -135,9 +135,6 @@ public final class ServerCommand implements Listener { if (command.contains("auto")) { return command.replace("auto", "[auto]"); } - if (command.contains("selector")) { - return "cancel"; - } break; case "/minecraft:give": case "/give": @@ -178,13 +175,6 @@ public final class ServerCommand implements Listener { return String.join(" ", arr); } break; - case "/minecraft:setblock": - case "/setblock": - final String charCommand = parseCharCodes(command); - if (charCommand.contains("selector")) { - return "cancel"; - } - break; case "/viaversion:viaver": case "/viaversion:viaversion": case "/viaversion:vvbukkit": @@ -255,25 +245,4 @@ public final class ServerCommand implements Listener { LOGGER.log(Level.INFO, "Console command: " + command); } - - public static String parseCharCodes(final String input) { - if (input.contains("\\u")) { - StringBuilder output = new StringBuilder(); - String[] split = input.split("\\\\u"); - int index = 0; - for (String item:split) { - if (index == 0) { - output.append(item); - } else { - String charCode = item.substring(0, 4); - output.append((char) Integer.parseInt(charCode, 16)); - output.append(item.substring(4)); - } - index++; - } - return output.toString(); - } else { - return input; - } - } }