Moved to use IslandManager instead of PlayerManager.

This commit is contained in:
Tastybento 2018-05-06 16:50:21 -07:00
parent ca8ed11bdd
commit e5afb84e46
3 changed files with 4 additions and 3 deletions

View File

@ -292,7 +292,7 @@ public class LevelCalcByChunk {
if (!event.isCancelled()) { if (!event.isCancelled()) {
// Save the value // Save the value
addon.setIslandLevel(island.getOwner(), event.getLevel()); addon.setIslandLevel(island.getOwner(), event.getLevel());
if (addon.getPlayers().inTeam(targetPlayer)) { if (addon.getIslands().inTeam(targetPlayer)) {
//plugin.getLogger().info("DEBUG: player is in team"); //plugin.getLogger().info("DEBUG: player is in team");
for (UUID member : addon.getIslands().getMembers(targetPlayer)) { for (UUID member : addon.getIslands().getMembers(targetPlayer)) {
//plugin.getLogger().info("DEBUG: updating team member level too"); //plugin.getLogger().info("DEBUG: updating team member level too");
@ -300,7 +300,7 @@ public class LevelCalcByChunk {
addon.setIslandLevel(member, event.getLevel()); addon.setIslandLevel(member, event.getLevel());
} }
} }
if (addon.getPlayers().inTeam(targetPlayer)) { if (addon.getIslands().inTeam(targetPlayer)) {
UUID leader = addon.getIslands().getTeamLeader(targetPlayer); UUID leader = addon.getIslands().getTeamLeader(targetPlayer);
if (leader != null) { if (leader != null) {
addon.getTopTen().addEntry(leader, event.getLevel()); addon.getTopTen().addEntry(leader, event.getLevel());

View File

@ -149,7 +149,7 @@ public class TopTen implements Listener {
if (name != null) { if (name != null) {
description.add(asker.getTranslation("island.top.gui-heading", "[name]", addon.getIslands().getIslandName(playerUUID), "[rank]", String.valueOf(rank))); description.add(asker.getTranslation("island.top.gui-heading", "[name]", addon.getIslands().getIslandName(playerUUID), "[rank]", String.valueOf(rank)));
description.add(asker.getTranslation("island.top.island-level","[level]", String.valueOf(level))); description.add(asker.getTranslation("island.top.island-level","[level]", String.valueOf(level)));
if (addon.getPlayers().inTeam(playerUUID)) { if (addon.getIslands().inTeam(playerUUID)) {
List<String> memberList = new ArrayList<>(); List<String> memberList = new ArrayList<>();
for (UUID members : addon.getIslands().getMembers(playerUUID)) { for (UUID members : addon.getIslands().getMembers(playerUUID)) {
memberList.add(ChatColor.AQUA + addon.getPlayers().getName(members)); memberList.add(ChatColor.AQUA + addon.getPlayers().getName(members));

View File

@ -24,6 +24,7 @@ public class Settings {
private boolean islandResetDeathReset; private boolean islandResetDeathReset;
private boolean teamJoinDeathReset; private boolean teamJoinDeathReset;
@SuppressWarnings("deprecation")
public Settings(Level level) { public Settings(Level level) {
level.saveDefaultConfig(); level.saveDefaultConfig();