aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java')
-rw-r--r--src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java9
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;
}