mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-22 18:45:24 +01:00
Moved to use IslandManager instead of PlayerManager.
This commit is contained in:
parent
ca8ed11bdd
commit
e5afb84e46
@ -292,7 +292,7 @@ public class LevelCalcByChunk {
|
||||
if (!event.isCancelled()) {
|
||||
// Save the value
|
||||
addon.setIslandLevel(island.getOwner(), event.getLevel());
|
||||
if (addon.getPlayers().inTeam(targetPlayer)) {
|
||||
if (addon.getIslands().inTeam(targetPlayer)) {
|
||||
//plugin.getLogger().info("DEBUG: player is in team");
|
||||
for (UUID member : addon.getIslands().getMembers(targetPlayer)) {
|
||||
//plugin.getLogger().info("DEBUG: updating team member level too");
|
||||
@ -300,7 +300,7 @@ public class LevelCalcByChunk {
|
||||
addon.setIslandLevel(member, event.getLevel());
|
||||
}
|
||||
}
|
||||
if (addon.getPlayers().inTeam(targetPlayer)) {
|
||||
if (addon.getIslands().inTeam(targetPlayer)) {
|
||||
UUID leader = addon.getIslands().getTeamLeader(targetPlayer);
|
||||
if (leader != null) {
|
||||
addon.getTopTen().addEntry(leader, event.getLevel());
|
||||
|
@ -149,7 +149,7 @@ public class TopTen implements Listener {
|
||||
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.island-level","[level]", String.valueOf(level)));
|
||||
if (addon.getPlayers().inTeam(playerUUID)) {
|
||||
if (addon.getIslands().inTeam(playerUUID)) {
|
||||
List<String> memberList = new ArrayList<>();
|
||||
for (UUID members : addon.getIslands().getMembers(playerUUID)) {
|
||||
memberList.add(ChatColor.AQUA + addon.getPlayers().getName(members));
|
||||
|
@ -24,6 +24,7 @@ public class Settings {
|
||||
private boolean islandResetDeathReset;
|
||||
private boolean teamJoinDeathReset;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Settings(Level level) {
|
||||
level.saveDefaultConfig();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user