Add the restricted chat toggle to the consoles version of the command as well

This commit is contained in:
Deauthorized 2024-04-27 22:41:09 -04:00 committed by GitHub
parent 0b824fc7fd
commit 47bd1b6170
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,6 +32,7 @@ public class ToggleCMD extends PlexCommand
sender.sendMessage(PlexUtils.mmDeserialize("<gray> - Fluidspread" + status("fluidspread")));
sender.sendMessage(PlexUtils.mmDeserialize("<gray> - Drops" + status("drops")));
sender.sendMessage(PlexUtils.mmDeserialize("<gray> - Redstone" + status("redstone")));
sender.sendMessage(PlexUtils.mmDeserialize("<gray> - Admin-only public chat (modmode)" + status("moderated")));
return null;
}
switch (args[0].toLowerCase())
@ -52,6 +53,11 @@ public class ToggleCMD extends PlexCommand
{
return toggle("redstone");
}
case "modmode" ->
{
PlexUtils.broadcast(messageComponent(plugin.toggles.getBoolean("moderated") ? "modModeOff" : "modModeOn", sender.getName()));
return toggle("moderated");
}
default ->
{
return messageComponent("invalidToggle");