From c5d5298695970fa3882bdadadcf09801799eac29 Mon Sep 17 00:00:00 2001 From: applenick Date: Sun, 30 Oct 2022 10:15:41 -0700 Subject: [PATCH] Fix being unable to set chat channels (#1088) Signed-off-by: applenick --- core/src/main/java/tc/oc/pgm/listeners/ChatDispatcher.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/tc/oc/pgm/listeners/ChatDispatcher.java b/core/src/main/java/tc/oc/pgm/listeners/ChatDispatcher.java index 2debe3a7ef..83e5f0394b 100644 --- a/core/src/main/java/tc/oc/pgm/listeners/ChatDispatcher.java +++ b/core/src/main/java/tc/oc/pgm/listeners/ChatDispatcher.java @@ -9,6 +9,7 @@ import static tc.oc.pgm.util.text.TextTranslations.translate; import app.ashcon.intake.Command; +import app.ashcon.intake.parametric.annotation.Maybe; import app.ashcon.intake.parametric.annotation.Text; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; @@ -116,7 +117,7 @@ public Set getMutedUUIDs() { aliases = {"g", "all"}, desc = "Send a message to everyone", usage = "[message]") - public void sendGlobal(Match match, MatchPlayer sender, @Nullable @Text String message) { + public void sendGlobal(Match match, MatchPlayer sender, @Maybe @Text String message) { if (sender != null && sender.isVanished()) { sendAdmin(match, sender, message); return; @@ -138,7 +139,7 @@ public void sendGlobal(Match match, MatchPlayer sender, @Nullable @Text String m aliases = {"t"}, desc = "Send a message to your team", usage = "[message]") - public void sendTeam(Match match, MatchPlayer sender, @Nullable @Text String message) { + public void sendTeam(Match match, MatchPlayer sender, @Maybe @Text String message) { if (sender != null && sender.isVanished()) { sendAdmin(match, sender, message); return; @@ -172,7 +173,7 @@ public void sendTeam(Match match, MatchPlayer sender, @Nullable @Text String mes desc = "Send a message to operators", usage = "[message]", perms = Permissions.ADMINCHAT) - public void sendAdmin(Match match, MatchPlayer sender, @Nullable @Text String message) { + public void sendAdmin(Match match, MatchPlayer sender, @Maybe @Text String message) { // If a player managed to send a default message without permissions, reset their chat channel if (sender != null && !sender.getBukkit().hasPermission(Permissions.ADMINCHAT)) { sender.getSettings().resetValue(SettingKey.CHAT);