From 97d107bc8111c0329945ee9644ed26548569bd78 Mon Sep 17 00:00:00 2001 From: Nathan Blaney Date: Tue, 27 Aug 2024 20:54:19 +1000 Subject: [PATCH] Updated: Smallish fix for /attribute list/remove, both are still broken though #35 --- .../rcommands/CmdAttributes.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/RoyalCommands/src/main/java/org/royaldev/royalcommands/rcommands/CmdAttributes.java b/modules/RoyalCommands/src/main/java/org/royaldev/royalcommands/rcommands/CmdAttributes.java index 835c80fd..c15c4960 100644 --- a/modules/RoyalCommands/src/main/java/org/royaldev/royalcommands/rcommands/CmdAttributes.java +++ b/modules/RoyalCommands/src/main/java/org/royaldev/royalcommands/rcommands/CmdAttributes.java @@ -71,18 +71,19 @@ protected boolean runCommand(CommandSender cs, Command cmd, String label, String if (subcommand.equalsIgnoreCase("list")) { if (meta.hasAttributeModifiers()) { final FancyMessage fm = new FancyMessage("Item ").color(MessageColor.POSITIVE.cc()) - .then(hand.getType().name()).color(MessageColor.NEUTRAL.cc()) - .then(" has these Attribute Modifiers:").color(MessageColor.POSITIVE.cc()); + .then(hand.getType().name()).color(MessageColor.NEUTRAL.cc()) + .then(" has these Attribute Modifiers:").color(MessageColor.POSITIVE.cc()); fm.send(cs); for (AttributeModifier am : meta.getAttributeModifiers().values()) { + cs.sendMessage(am.toString()); final FancyMessage fma = new FancyMessage(am.getName()).color(MessageColor.NEUTRAL.cc()) - .tooltip(MessageColor.NEUTRAL - + "Attribute: " + MessageColor.RESET + am.getName() + "\n" + MessageColor.NEUTRAL - + "Operation: " + MessageColor.RESET + am.getOperation() + "\n" + MessageColor.NEUTRAL - + "Amount: " + MessageColor.RESET +am.getAmount() + "\n" + MessageColor.NEUTRAL - + "UUID: " + MessageColor.RESET + am.getUniqueId() + "\n" - + "click to copy the UUID") - .clipboard(String.valueOf(am.getUniqueId())); + .tooltip(MessageColor.NEUTRAL + + "Attribute: " + MessageColor.RESET + am.getName() + "\n" + MessageColor.NEUTRAL + + "Operation: " + MessageColor.RESET + am.getOperation() + "\n" + MessageColor.NEUTRAL + + "Amount: " + MessageColor.RESET +am.getAmount() + "\n" + MessageColor.NEUTRAL + + "UUID: " + MessageColor.RESET + am.getKey() + "\n" + + "click to copy the UUID") + .clipboard(String.valueOf(am.getKey())); fma.send(cs); } } else { @@ -162,4 +163,4 @@ protected boolean runCommand(CommandSender cs, Command cmd, String label, String } else cs.sendMessage(MessageColor.NEGATIVE + "No such subcommand!"); return true; } -} \ No newline at end of file +}