diff options
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/util')
-rw-r--r-- | src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java b/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java index 062d488..4694fee 100644 --- a/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java +++ b/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java @@ -143,8 +143,15 @@ public class MooChatComponent extends ChatComponentText { } public MooChatComponent setSuggestCommand(String command) { + setSuggestCommand(command, true); + return this; + } + + public MooChatComponent setSuggestCommand(String command, boolean addTooltip) { setChatStyle(getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, command))); - setHover(new KeyValueChatComponent("Run", command, " ")); + if (addTooltip) { + setHover(new KeyValueChatComponent("Run", command, " ")); + } return this; } |