Skip to content

Commit

Permalink
Updated: Smallish fix for /attribute list/remove, both are still brok…
Browse files Browse the repository at this point in the history
…en though #35
  • Loading branch information
BlaneyXYZ committed Aug 27, 2024
1 parent 13c3c59 commit 97d107b
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -162,4 +163,4 @@ protected boolean runCommand(CommandSender cs, Command cmd, String label, String
} else cs.sendMessage(MessageColor.NEGATIVE + "No such subcommand!");
return true;
}
}
}

0 comments on commit 97d107b

Please sign in to comment.