diff --git a/src/main/java/com/gmail/nossr50/party/Party.java b/src/main/java/com/gmail/nossr50/party/Party.java index 2d53f0ce7..170d7201f 100644 --- a/src/main/java/com/gmail/nossr50/party/Party.java +++ b/src/main/java/com/gmail/nossr50/party/Party.java @@ -13,7 +13,7 @@ public class Party { private String name; private String password; private boolean locked; - private ShareHandler.XpShareMode xpShareMode; + private ShareHandler.ShareMode xpShareMode; public List getMembers() { return members; @@ -64,11 +64,11 @@ public class Party { this.locked = locked; } - public void setXpShareMode(ShareHandler.XpShareMode xpShareMode) { + public void setXpShareMode(ShareHandler.ShareMode xpShareMode) { this.xpShareMode = xpShareMode; } - public ShareHandler.XpShareMode getXpShareMode() { + public ShareHandler.ShareMode getXpShareMode() { return xpShareMode; } } diff --git a/src/main/java/com/gmail/nossr50/party/PartyManager.java b/src/main/java/com/gmail/nossr50/party/PartyManager.java index cfc4deb90..2e183fb41 100644 --- a/src/main/java/com/gmail/nossr50/party/PartyManager.java +++ b/src/main/java/com/gmail/nossr50/party/PartyManager.java @@ -262,7 +262,7 @@ public final class PartyManager { party.setName(partyName); party.setLeader(playerName); - party.setXpShareMode(ShareHandler.XpShareMode.NONE); + party.setXpShareMode(ShareHandler.ShareMode.NONE); party.setLocked(true);//Parties are now invite-only by default, can be set to open with /party unlock if (password != null) { @@ -476,7 +476,7 @@ public final class PartyManager { party.setLeader(partiesFile.getString(partyName + ".Leader")); party.setPassword(partiesFile.getString(partyName + ".Password")); party.setLocked(partiesFile.getBoolean(partyName + ".Locked")); - party.setXpShareMode(ShareHandler.XpShareMode.getFromString(partiesFile.getString(partyName + ".ExpShareMode"))); + party.setXpShareMode(ShareHandler.ShareMode.getFromString(partiesFile.getString(partyName + ".ExpShareMode"))); party.getMembers().addAll(partiesFile.getStringList(partyName + ".Members")); parties.add(party); diff --git a/src/main/java/com/gmail/nossr50/party/ShareHandler.java b/src/main/java/com/gmail/nossr50/party/ShareHandler.java index 04bf4e560..15a7eac08 100644 --- a/src/main/java/com/gmail/nossr50/party/ShareHandler.java +++ b/src/main/java/com/gmail/nossr50/party/ShareHandler.java @@ -10,11 +10,11 @@ import com.gmail.nossr50.skills.utilities.SkillType; import com.gmail.nossr50.util.Users; public final class ShareHandler { - public enum XpShareMode { + public enum ShareMode { NONE, EQUAL; - public static XpShareMode getFromString(String string) { + public static ShareMode getFromString(String string) { try { return valueOf(string); } diff --git a/src/main/java/com/gmail/nossr50/party/commands/PartyExpShareCommand.java b/src/main/java/com/gmail/nossr50/party/commands/PartyExpShareCommand.java index 556cae611..db6986bdb 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/PartyExpShareCommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/PartyExpShareCommand.java @@ -8,7 +8,7 @@ import org.bukkit.entity.Player; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.party.Party; import com.gmail.nossr50.party.ShareHandler; -import com.gmail.nossr50.party.ShareHandler.XpShareMode; +import com.gmail.nossr50.party.ShareHandler.ShareMode; import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Users; @@ -35,10 +35,10 @@ public class PartyExpShareCommand implements CommandExecutor { } if (args[1].equalsIgnoreCase("none") || args[1].equalsIgnoreCase("off") || args[1].equalsIgnoreCase("false")) { - handleChangingShareMode(XpShareMode.NONE); + handleChangingShareMode(ShareMode.NONE); } else if (args[1].equalsIgnoreCase("equal") || args[1].equalsIgnoreCase("even") || args[1].equalsIgnoreCase("on") || args[1].equalsIgnoreCase("true")) { - handleChangingShareMode(XpShareMode.EQUAL); + handleChangingShareMode(ShareMode.EQUAL); } else { sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "expshare", "[NONE | EQUAL]")); @@ -52,7 +52,7 @@ public class PartyExpShareCommand implements CommandExecutor { } } - private void handleChangingShareMode(ShareHandler.XpShareMode mode) { + private void handleChangingShareMode(ShareHandler.ShareMode mode) { playerParty.setXpShareMode(mode); for (Player member : playerParty.getOnlineMembers()) {