use of mc.dragons.core.gameobject.item.ItemClass in project DragonsOnline by UniverseCraft.
the class ItemCommand method setName.
private void setName(CommandSender sender, String[] args) {
ItemClass itemClass = lookupItemClass(sender, args[0]);
if (itemClass == null)
return;
Document base = Document.parse(itemClass.getData().toJson());
String name = StringUtil.concatArgs(args, 2);
String displayName = ChatColor.translateAlternateColorCodes('&', name);
itemClass.setName(displayName);
sender.sendMessage(ChatColor.GREEN + "Updated item display name successfully.");
AUDIT_LOG.saveEntry(itemClass, user(sender), base, "Set display name to " + displayName);
}
Aggregations