Minor improvements

- Add /toggles as an alias for /toggle
- We now use docs.plex.us.org again
This commit is contained in:
Telesphoreo 2022-05-26 00:31:37 -05:00
parent 53cd4b1306
commit d0b1d09f38
2 changed files with 7 additions and 7 deletions

View File

@ -16,7 +16,7 @@ import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@CommandParameters(name = "toggle", usage = "/<command>", description = "Allows toggling various server aspects through a GUI") @CommandParameters(name = "toggle", description = "Allows toggling various server aspects through a GUI", aliases = "toggles")
@CommandPermissions(level = Rank.ADMIN, permission = "plex.toggle", source = RequiredCommandSource.ANY) @CommandPermissions(level = Rank.ADMIN, permission = "plex.toggle", source = RequiredCommandSource.ANY)
public class ToggleCMD extends PlexCommand public class ToggleCMD extends PlexCommand
{ {
@ -37,15 +37,15 @@ public class ToggleCMD extends PlexCommand
{ {
case "explosions" -> case "explosions" ->
{ {
return toggle(sender, "explosions"); return toggle("explosions");
} }
case "fluidspread" -> case "fluidspread" ->
{ {
return toggle(sender, "fluidspread"); return toggle("fluidspread");
} }
case "drops" -> case "drops" ->
{ {
return toggle(sender, "drops"); return toggle("drops");
} }
default -> default ->
{ {
@ -68,7 +68,7 @@ public class ToggleCMD extends PlexCommand
return plugin.toggles.getBoolean(toggle) ? " (enabled)" : " (disabled)"; return plugin.toggles.getBoolean(toggle) ? " (enabled)" : " (disabled)";
} }
private Component toggle(CommandSender sender, String toggle) private Component toggle(String toggle)
{ {
plugin.toggles.set(toggle, !plugin.getToggles().getBoolean(toggle)); plugin.toggles.set(toggle, !plugin.getToggles().getBoolean(toggle));
return Component.text("Toggled " + toggle + status(toggle)).color(NamedTextColor.GRAY); return Component.text("Toggled " + toggle + status(toggle)).color(NamedTextColor.GRAY);

View File

@ -1,5 +1,5 @@
# Plex Configuration File # Plex Configuration File
# For documentation, please visit: https://plex.us.org # For documentation, please visit: https://docs.plex.us.org
server: server:
name: "Plexus" name: "Plexus"
@ -149,7 +149,7 @@ blocked_entities:
- "ENDER_DRAGON" - "ENDER_DRAGON"
- "MINECART_TNT" - "MINECART_TNT"
# See https://plex.us.org/docs/customization/config#worlds for documentation # See https://docs.plex.us.org/docs/customization/config#worlds for documentation
# These gamerules apply to all worlds on the server # These gamerules apply to all worlds on the server
global_gamerules: global_gamerules:
- "doWeatherCycle;true" - "doWeatherCycle;true"