Skip to content

Commit

Permalink
also enhance this
Browse files Browse the repository at this point in the history
  • Loading branch information
Spigey committed May 3, 2024
1 parent 1d8e3b1 commit f4ec0e0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public void build(LiteralArgumentBuilder<CommandSource> 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;
}));
}
Expand Down

0 comments on commit f4ec0e0

Please sign in to comment.