From fdb84dfaf47f9c5956692186d3761efe276a5217 Mon Sep 17 00:00:00 2001 From: Andreas Troelsen Date: Sun, 1 Nov 2020 15:02:26 +0100 Subject: [PATCH] Use Arena "config name" on leaderboard headers. Going forward, it should be possible to show "pretty" arena names by simply using a pretty name in the config-file instead of slug-like names now that slugs are on the horizon. --- changelog.md | 1 + .../com/garbagemule/MobArena/listeners/MAGlobalListener.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 7954926..d92bc19 100644 --- a/changelog.md +++ b/changelog.md @@ -26,6 +26,7 @@ These changes will (most likely) be included in the next version. - Permissions for arenas and classes are now based on "slugs". It is now possible to configure permissions for arenas and classes with multi-word names (including "My Items"). Check the Permissions page on the wiki for details. - Commands that resolve class names now consistently resolve and tab complete "slugs" instead of arbitrarily "squashed" names. This greatly improves support for multi-word names. - The class signs generated by the `/ma autogenerate` command now use class names from the config-file instead of arbitrarily "squashed" names. +- Leaderboards now use arena names from the config-file instead of arbitrarily "prettified" names. - Using `spectate-on-death: true` no longer forces players out to their join location/exit warp before moving them to the spectator area. This should prevent "jumpy" behavior in multi-world setups. - Players should now properly respawn at the spectator area rather than at world spawn on servers with plugins that override respawn locations. - Config-files with missing `pet-items` nodes no longer errors. A missing `pet-items` node in `global-settings` is treated as empty, i.e. no pet items will be registered. diff --git a/src/main/java/com/garbagemule/MobArena/listeners/MAGlobalListener.java b/src/main/java/com/garbagemule/MobArena/listeners/MAGlobalListener.java index e54ae77..2d010c5 100644 --- a/src/main/java/com/garbagemule/MobArena/listeners/MAGlobalListener.java +++ b/src/main/java/com/garbagemule/MobArena/listeners/MAGlobalListener.java @@ -136,7 +136,7 @@ public class MAGlobalListener implements Listener if ((arena = am.getArenaWithName(text)) != null) { arena.getEventListener().onSignChange(event); - setSignLines(event, ChatColor.GREEN + "MobArena", ChatColor.YELLOW + arena.arenaName(), ChatColor.AQUA + "Players", "---------------"); + setSignLines(event, ChatColor.GREEN + "MobArena", ChatColor.YELLOW + arena.configName(), ChatColor.AQUA + "Players", "---------------"); } else if ((stat = Stats.getByShortName(text)) != null) { setSignLines(event, ChatColor.GREEN + "", "", ChatColor.AQUA + stat.getFullName(), "---------------");