mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-20 01:12:13 +02:00
parent
f08eebf7fa
commit
d14ba8ea07
@ -37,13 +37,13 @@ public final class RenameCmd extends Command
|
||||
for(int i = 1; i < args.length; i++)
|
||||
message += " " + args[i];
|
||||
|
||||
message = message.replace("$", "<EFBFBD>").replace("<EFBFBD><EFBFBD>", "$");
|
||||
message = message.replace("$", "\u00a7").replace("\u00a7\u00a7", "$");
|
||||
ItemStack item = MC.player.inventory.getMainHandStack();
|
||||
|
||||
if(item == null)
|
||||
throw new CmdError("There is no item in your hand.");
|
||||
|
||||
item.setCustomName(new LiteralText(message));
|
||||
ChatUtils.message("Renamed item to \"" + message + "<EFBFBD>r\".");
|
||||
ChatUtils.message("Renamed item to \"" + message + "\u00a7r\".");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user