Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 6fab8b7

Browse files
changed oncommand return value
1 parent 88ef7cd commit 6fab8b7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/org/zerobzerot/playtimenamecolor/PlaytimeNameColor.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ public boolean onCommand(CommandSender sender, Command cmd, String commandLabel,
175175

176176
sender.sendMessage(message.toString());
177177
}
178+
179+
return true;
178180
} else if (cmd.getName().equalsIgnoreCase("mute") && (sender instanceof ConsoleCommandSender || sender.isOp())) {
179181
if (args.length == 1) {
180182
if (!muted.contains(args[0].toLowerCase())) {
@@ -190,6 +192,8 @@ public boolean onCommand(CommandSender sender, Command cmd, String commandLabel,
190192
} else {
191193
sender.sendMessage(pluginPrefix + "Use " + ChatColor.GOLD + "/mute <Player>" + ChatColor.RESET + " to mute a player.");
192194
}
195+
196+
return true;
193197
} else if (cmd.getName().equalsIgnoreCase("unmute") && (sender instanceof ConsoleCommandSender || sender.isOp())) {
194198
if (args.length == 1) {
195199
if (muted.contains(args[0].toLowerCase())) {
@@ -199,9 +203,12 @@ public boolean onCommand(CommandSender sender, Command cmd, String commandLabel,
199203
} else {
200204
sender.sendMessage(pluginPrefix + "Use " + ChatColor.GOLD + "/mute <Player>" + ChatColor.RESET + " to mute a player.");
201205
}
206+
207+
return true;
202208
}
203209

204-
return true;
210+
// we did not process the command
211+
return false;
205212
}
206213

207214
private int getMaximumColorIndex(Player player) {

0 commit comments

Comments
 (0)