diff --git a/src/main/java/spigey/asteroide/commands/CommandBlockCommand.java b/src/main/java/spigey/asteroide/commands/CommandBlockCommand.java index c206dcb..b28e1ab 100644 --- a/src/main/java/spigey/asteroide/commands/CommandBlockCommand.java +++ b/src/main/java/spigey/asteroide/commands/CommandBlockCommand.java @@ -28,8 +28,9 @@ public void build(LiteralArgumentBuilder builder) { assert mc.player != null; if(!mc.player.getAbilities().creativeMode){error("You need to be in creative mode to use this command!"); return SINGLE_SUCCESS;} if(!mc.player.hasPermissionLevel(4)){error("You're missing the permission level '§f4§c', you can most likely not place the command block!");} - ChatUtils.sendMsg(Text.of("§fReceiving command block with command '§7" + StringArgumentType.getString(context,"command") + "§f'.")); - CommandBlock(Items.COMMAND_BLOCK, StringArgumentType.getString(context, "command").replaceAll("\"", "\\\\\\\""), 1); + String command = StringArgumentType.getString(context, "command"); + ChatUtils.sendMsg(Text.of("§fReceiving command block with command '§7" + command + "§f'.")); + CommandBlock(Items.COMMAND_BLOCK, command, 1, command.substring(0, Math.min(command.length(), 30)), true); return SINGLE_SUCCESS; })); }