diff --git a/net/nemez/chatapi/click/ClickCallback.java b/net/nemez/chatapi/click/ClickCallback.java index c2d2a87..4eb1cf4 100644 --- a/net/nemez/chatapi/click/ClickCallback.java +++ b/net/nemez/chatapi/click/ClickCallback.java @@ -2,6 +2,8 @@ package net.nemez.chatapi.click; import org.bukkit.command.CommandSender; +import net.nemez.chatapi.ChatAPI; + public abstract class ClickCallback { private boolean repeatable, async; @@ -11,7 +13,7 @@ public abstract class ClickCallback { public ClickCallback(boolean repeatable, boolean async, String expiredMessage) { this.repeatable = repeatable; this.async = async; - this.expiredMessage = expiredMessage; + this.expiredMessage = ChatAPI.colorify(null, expiredMessage); this.expired = false; } @@ -20,6 +22,10 @@ public abstract class ClickCallback { public final void execute(CommandSender sender) { if (!expired) { run(sender); + }else{ + if (sender != null) { + sender.sendMessage(expiredMessage); + } } if (!repeatable) { expired = true;