Added test class for Island.

This commit is contained in:
tastybento 2021-09-12 17:35:52 -07:00
parent 7271096ace
commit 0e744cae81
2 changed files with 1253 additions and 41 deletions

View File

@ -45,7 +45,6 @@ import world.bentobox.bentobox.database.objects.adapters.LogEntryListAdapter;
import world.bentobox.bentobox.lists.Flags;
import world.bentobox.bentobox.managers.IslandWorldManager;
import world.bentobox.bentobox.managers.RanksManager;
import world.bentobox.bentobox.util.IslandInfo;
import world.bentobox.bentobox.util.Pair;
import world.bentobox.bentobox.util.Util;
@ -164,8 +163,6 @@ public class Island implements DataObject, MetaDataAble {
@Expose
private List<LogEntry> history = new LinkedList<>();
@Expose
private int levelHandicap;
@Expose
private Map<Environment, Location> spawnPoint = new EnumMap<>(Environment.class);
@ -258,7 +255,6 @@ public class Island implements DataObject, MetaDataAble {
this.gameMode = island.getGameMode();
this.homes = new HashMap<>(island.getHomes());
this.history.addAll(island.getHistory());
this.levelHandicap = island.getLevelHandicap();
this.location = island.getProtectionCenter();
this.maxEverProtectionRange = island.getMaxEverProtectionRange();
this.maxHomes = island.getMaxHomes();
@ -376,13 +372,6 @@ public class Island implements DataObject, MetaDataAble {
return flags;
}
/**
* @return the levelHandicap
*/
public int getLevelHandicap() {
return levelHandicap;
}
/**
* Returns the members of this island.
* It contains all players that have any rank on this island, including {@link RanksManager#BANNED_RANK BANNED},
@ -875,14 +864,6 @@ public class Island implements DataObject, MetaDataAble {
setChanged();
}
/**
* @param levelHandicap the levelHandicap to set
*/
public void setLevelHandicap(int levelHandicap) {
this.levelHandicap = levelHandicap;
setChanged();
}
/**
* @param members the members to set
*/
@ -1079,27 +1060,6 @@ public class Island implements DataObject, MetaDataAble {
setChanged();
}
/**
* Shows info of this island to this user.
* @param user the User who is requesting it
* @return always true
* @deprecated Use {@link IslandInfo#showInfo(User) instead}
*/
@Deprecated
public boolean showInfo(User user) {
return new IslandInfo(this).showInfo(user);
}
/**
* Shows the members of this island to this user.
* @param user the User who is requesting it
* @deprecated Use {@link IslandInfo#showMembers(User) instead}
*/
@Deprecated
public void showMembers(User user) {
new IslandInfo(this).showMembers(user);
}
/**
* Toggles a settings flag
* This method affects subflags (if the given flag is a parent flag)
@ -1580,7 +1540,7 @@ public class Island implements DataObject, MetaDataAble {
+ ", name=" + name + ", createdDate=" + createdDate + ", updatedDate=" + updatedDate + ", owner="
+ owner + ", members=" + members + ", maxMembers=" + maxMembers + ", spawn=" + spawn
+ ", purgeProtected=" + purgeProtected + ", flags=" + flags + ", history=" + history
+ ", levelHandicap=" + levelHandicap + ", spawnPoint=" + spawnPoint + ", doNotLoad=" + doNotLoad
+ ", spawnPoint=" + spawnPoint + ", doNotLoad=" + doNotLoad
+ ", cooldowns=" + cooldowns + ", commandRanks=" + commandRanks + ", reserved=" + reserved
+ ", metaData=" + metaData + ", homes=" + homes + ", maxHomes=" + maxHomes + "]";
}

File diff suppressed because it is too large Load Diff