From cd09e77b42fc32d71eb19c4ded09e50e704fc5c0 Mon Sep 17 00:00:00 2001 From: ProSavage Date: Tue, 6 Nov 2018 23:16:11 -0600 Subject: [PATCH] Fixed internal name problems with leader --- src/main/java/com/massivecraft/factions/Conf.java | 2 +- src/main/java/com/massivecraft/factions/struct/Role.java | 3 ++- .../com/massivecraft/factions/zcore/persist/MemoryFPlayer.java | 2 +- src/main/java/com/massivecraft/factions/zcore/util/TL.java | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/Conf.java b/src/main/java/com/massivecraft/factions/Conf.java index cc889afd..5ca29cc3 100644 --- a/src/main/java/com/massivecraft/factions/Conf.java +++ b/src/main/java/com/massivecraft/factions/Conf.java @@ -43,7 +43,7 @@ public class Conf { public static double powerOfflineLossPerDay = 0.0; // players will lose this much power per day offline public static double powerOfflineLossLimit = 0.0; // players will no longer lose power from being offline once their power drops to this amount or less public static double powerFactionMax = 0.0; // if greater than 0, the cap on how much power a faction can have (additional power from players beyond that will act as a "buffer" of sorts) - public static String prefixAdmin = "***"; + public static String prefixLeader = "***"; public static String prefixCoLeader = "**"; public static String prefixMod = "*"; public static String prefixRecruit = "-"; diff --git a/src/main/java/com/massivecraft/factions/struct/Role.java b/src/main/java/com/massivecraft/factions/struct/Role.java index ad05c25a..c5ddf1fb 100644 --- a/src/main/java/com/massivecraft/factions/struct/Role.java +++ b/src/main/java/com/massivecraft/factions/struct/Role.java @@ -55,6 +55,7 @@ public enum Role implements Permissable { public static Role fromString(String check) { switch (check.toLowerCase()) { + case "leader": case "admin": return LEADER; case "coleader": @@ -92,7 +93,7 @@ public enum Role implements Permissable { public String getPrefix() { if (this == Role.LEADER) { - return Conf.prefixAdmin; + return Conf.prefixLeader; } if (this == Role.COLEADER) { return Conf.prefixCoLeader; diff --git a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java index c9569930..0cc95ed6 100644 --- a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java +++ b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java @@ -1197,7 +1197,7 @@ public abstract class MemoryFPlayer implements FPlayer { return Conf.prefixCoLeader; } if (getRole() == Role.LEADER) { - return Conf.prefixAdmin; + return Conf.prefixLeader; } return null; } diff --git a/src/main/java/com/massivecraft/factions/zcore/util/TL.java b/src/main/java/com/massivecraft/factions/zcore/util/TL.java index e3ca082e..401af642 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TL.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TL.java @@ -880,7 +880,7 @@ public enum TL { /** * Roles */ - ROLE_LEADER("admin"), + ROLE_LEADER("leader"), ROLE_COLEADER("coleader"), ROLE_MODERATOR("moderator"), ROLE_NORMAL("normal member"),