mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-06 17:36:43 +00:00
Add a toggle option for toggling chat (#89)
* Add moderated mode toggle option * Add new messages to messages.yml for modmode toggle * Add block_on_modmode list for commands to block, should be separate from block_on_mute so pms can still work * Implement the restricted chat toggle * Add the restricted chat toggle to the toggle gui * Add the restricted chat toggle to the consoles version of the command as well * Update toggles.yml / requested changes * Update messages.yml / requested changes * Update commands.yml / requested changes * Update ToggleMenu.java / requested changes * Update TogglesListener.java / requested changes * Update ToggleCMD.java / requested changes * Update messages.yml / requested changes * Update ToggleMenu.java / requested changes * Update ToggleCMD.java / requested changes
This commit is contained in:
@ -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> - Chat" + status("chat")));
|
||||
return null;
|
||||
}
|
||||
switch (args[0].toLowerCase())
|
||||
@ -52,6 +53,11 @@ public class ToggleCMD extends PlexCommand
|
||||
{
|
||||
return toggle("redstone");
|
||||
}
|
||||
case "chat" ->
|
||||
{
|
||||
PlexUtils.broadcast(PlexUtils.messageComponent("chatToggled", sender.getName(), plugin.toggles.getBoolean("chat") ? "off" : "on"));
|
||||
return toggle("chat");
|
||||
}
|
||||
default ->
|
||||
{
|
||||
return messageComponent("invalidToggle");
|
||||
|
Reference in New Issue
Block a user