mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
checktag can now check non MMOItem tags
This commit is contained in:
parent
799f699647
commit
00d7cbc044
@ -24,11 +24,12 @@ public class CheckTagCommandTreeNode extends CommandTreeNode {
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
String tag = args[2].contains("#") ? args[2].substring(1) : "MMOITEMS_" + args[2];
|
||||
NBTItem item = MMOLib.plugin.getVersion().getWrapper().getNBTItem(player.getInventory().getItemInMainHand());
|
||||
player.sendMessage(ChatColor.DARK_GRAY + "" + ChatColor.STRIKETHROUGH + "--------------------------------------------------");
|
||||
player.sendMessage(ChatColor.AQUA + "Boolean = " + ChatColor.RESET + item.getBoolean("MMOITEMS_" + args[2].toUpperCase().replace("-", "_")));
|
||||
player.sendMessage(ChatColor.AQUA + "Double = " + ChatColor.RESET + item.getDouble("MMOITEMS_" + args[2].toUpperCase().replace("-", "_")));
|
||||
player.sendMessage(ChatColor.AQUA + "String = " + ChatColor.RESET + item.getString("MMOITEMS_" + args[2].toUpperCase().replace("-", "_")));
|
||||
player.sendMessage(ChatColor.AQUA + "Boolean = " + ChatColor.RESET + item.getBoolean(tag.toUpperCase().replace("-", "_")));
|
||||
player.sendMessage(ChatColor.AQUA + "Double = " + ChatColor.RESET + item.getDouble(tag.toUpperCase().replace("-", "_")));
|
||||
player.sendMessage(ChatColor.AQUA + "String = " + ChatColor.RESET + item.getString(tag.toUpperCase().replace("-", "_")));
|
||||
return CommandResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user