From 8484f92030d2ab8712f7c6424f7e4e4b0c5c4515 Mon Sep 17 00:00:00 2001 From: Trent Hensler Date: Wed, 31 Jan 2018 16:49:19 -0800 Subject: [PATCH] Use Lang for roles --- .../massivecraft/factions/struct/Relation.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/struct/Relation.java b/src/main/java/com/massivecraft/factions/struct/Relation.java index 29704273..57c822af 100644 --- a/src/main/java/com/massivecraft/factions/struct/Relation.java +++ b/src/main/java/com/massivecraft/factions/struct/Relation.java @@ -6,11 +6,11 @@ import org.bukkit.ChatColor; public enum Relation { - MEMBER(4, "member"), - ALLY(3, "ally"), - TRUCE(2, "truce"), - NEUTRAL(1, "neutral"), - ENEMY(0, "enemy"); + MEMBER(4, TL.RELATION_MEMBER_SINGULAR.toString()), + ALLY(3, TL.RELATION_ALLY_SINGULAR.toString()), + TRUCE(2, TL.RELATION_TRUCE_SINGULAR.toString()), + NEUTRAL(1, TL.RELATION_NEUTRAL_SINGULAR.toString()), + ENEMY(0, TL.RELATION_ENEMY_SINGULAR.toString()); public final int value; public final String nicename; @@ -27,13 +27,13 @@ public enum Relation { public static Relation fromString(String s) { // Because Java 6 doesn't allow String switches :( - if (s.equalsIgnoreCase("member")) { + if (s.equalsIgnoreCase(MEMBER.nicename)) { return MEMBER; - } else if (s.equalsIgnoreCase("ally")) { + } else if (s.equalsIgnoreCase(ALLY.nicename)) { return ALLY; - } else if (s.equalsIgnoreCase("truce")) { + } else if (s.equalsIgnoreCase(TRUCE.nicename)) { return TRUCE; - } else if (s.equalsIgnoreCase("enemy")) { + } else if (s.equalsIgnoreCase(ENEMY.nicename)) { return ENEMY; } else { return NEUTRAL; // If they somehow mess things up, go back to default behavior.