diff --git a/REFERENCES.md b/REFERENCES.md
index 2a07a99c1..06f0ddda1 100644
--- a/REFERENCES.md
+++ b/REFERENCES.md
@@ -68,7 +68,7 @@ general.errors.no-island
general.errors.no-permission
general.errors.no-team
general.errors.not-in-team
-general.errors.not-leader
+general.errors.not-owner
general.errors.offline-player
general.errors.player-has-island
general.errors.player-has-no-island
diff --git a/pom.xml b/pom.xml
index dedd99710..95010649e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
world.bentobox
bentobox
- 0.16.0-SNAPSHOT
+ 0.17.0-SNAPSHOT
BentoBox
BentoBox is an expandable Minecraft Spigot plugin for island-type games like ASkyBlock or AcidIsland.
diff --git a/src/main/java/world/bentobox/bentobox/api/addons/exception/AddonException.java b/src/main/java/world/bentobox/bentobox/api/addons/exception/AddonException.java
deleted file mode 100644
index 4f0321d62..000000000
--- a/src/main/java/world/bentobox/bentobox/api/addons/exception/AddonException.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package world.bentobox.bentobox.api.addons.exception;
-
-/**
- * @deprecated Moved to {@link world.bentobox.bentobox.api.addons.exceptions.AddonException}.
- */
-@Deprecated
-public abstract class AddonException extends Exception {
-
- /**
- *
- */
- private static final long serialVersionUID = 4203162022348693854L;
-
- public AddonException(String errorMessage){
- super("AddonException : " + errorMessage);
- }
-
-}
diff --git a/src/main/java/world/bentobox/bentobox/api/addons/exception/InvalidAddonFormatException.java b/src/main/java/world/bentobox/bentobox/api/addons/exception/InvalidAddonFormatException.java
deleted file mode 100644
index 3b8da6f60..000000000
--- a/src/main/java/world/bentobox/bentobox/api/addons/exception/InvalidAddonFormatException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package world.bentobox.bentobox.api.addons.exception;
-
-import java.util.logging.Level;
-
-import org.bukkit.Bukkit;
-
-/**
- * @deprecated Moved to {@link world.bentobox.bentobox.api.addons.exceptions.InvalidAddonFormatException}.
- */
-@Deprecated
-public class InvalidAddonFormatException extends AddonException {
-
- /**
- *
- */
- private static final long serialVersionUID = 7741502900847049986L;
-
- public InvalidAddonFormatException(String errorMessage) {
- super(errorMessage);
- }
-
- @Override
- public void printStackTrace(){
- super.printStackTrace();
-
- Bukkit.getLogger().log(Level.WARNING, " Basic format : (addon.yml)");
- Bukkit.getLogger().log(Level.WARNING, " main: path.to.your.MainClass");
- Bukkit.getLogger().log(Level.WARNING, " name: ");
- Bukkit.getLogger().log(Level.WARNING, " authors: | ");
- Bukkit.getLogger().log(Level.WARNING, " version: YourVersion");
- }
-}
diff --git a/src/main/java/world/bentobox/bentobox/api/addons/exception/InvalidAddonInheritException.java b/src/main/java/world/bentobox/bentobox/api/addons/exception/InvalidAddonInheritException.java
deleted file mode 100644
index 1180952ae..000000000
--- a/src/main/java/world/bentobox/bentobox/api/addons/exception/InvalidAddonInheritException.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package world.bentobox.bentobox.api.addons.exception;
-
-/**
- * @deprecated Moved to {@link world.bentobox.bentobox.api.addons.exceptions.InvalidAddonInheritException}.
- */
-@Deprecated
-public class InvalidAddonInheritException extends AddonException {
-
- /**
- *
- */
- private static final long serialVersionUID = -5847358994397613244L;
-
- public InvalidAddonInheritException(String errorMessage) {
- super(errorMessage);
- }
-
-}
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/CompositeCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/CompositeCommand.java
index 08dff086a..00459c661 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/CompositeCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/CompositeCommand.java
@@ -381,22 +381,10 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
return getSubCommands();
}
- /**
- * Convenience method to obtain the user's team leader
- * @param world - world to check
- * @param user - the User
- * @return UUID of player's team leader or null if user has no island
- * @deprecated Renamed to {@link #getOwner(World, User)} for consistency.
- */
- @Deprecated
- protected UUID getTeamLeader(World world, User user) {
- return getOwner(world, user);
- }
-
/**
* Convenience method to obtain the user's island owner
* @param world world to check
- * @param user -the User
+ * @param user the User
* @return UUID of player's island owner or null if user has no island
*/
protected UUID getOwner(World world, User user) {
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommand.java
index e22923011..10ae4cd2e 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommand.java
@@ -42,9 +42,9 @@ public class AdminDeleteCommand extends ConfirmableCommand {
user.sendMessage("general.errors.player-has-no-island");
return false;
}
- // Team leaders should be kicked before deleting otherwise the whole team will become weird
+ // Owners should be kicked before deleting otherwise the whole team will become weird
if (getIslands().inTeam(getWorld(), targetUUID) && getIslands().getOwner(getWorld(), targetUUID).equals(targetUUID)) {
- user.sendMessage("commands.admin.delete.cannot-delete-team-leader");
+ user.sendMessage("commands.admin.delete.cannot-delete-owner");
return false;
}
// Confirm
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamAddCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamAddCommand.java
index f3e36ce07..f1090caaf 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamAddCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamAddCommand.java
@@ -27,9 +27,9 @@ public class AdminTeamAddCommand extends CompositeCommand {
showHelp(this, user);
return false;
}
- // Get leader and target
- UUID leaderUUID = getPlayers().getUUID(args.get(0));
- if (leaderUUID == null) {
+ // Get owner and target
+ UUID ownerUUID = getPlayers().getUUID(args.get(0));
+ if (ownerUUID == null) {
user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0));
return false;
}
@@ -38,13 +38,13 @@ public class AdminTeamAddCommand extends CompositeCommand {
user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(1));
return false;
}
- if (!getIslands().hasIsland(getWorld(), leaderUUID)) {
+ if (!getIslands().hasIsland(getWorld(), ownerUUID)) {
user.sendMessage("general.errors.player-has-no-island");
return false;
}
- if (getIslands().inTeam(getWorld(), leaderUUID) && !getIslands().getOwner(getWorld(), leaderUUID).equals(leaderUUID)) {
- user.sendMessage("commands.admin.team.add.name-not-leader", TextVariables.NAME, args.get(0));
- getIslands().getIsland(getWorld(), leaderUUID).showMembers(getPlugin(), user, getWorld());
+ if (getIslands().inTeam(getWorld(), ownerUUID) && !getIslands().getOwner(getWorld(), ownerUUID).equals(ownerUUID)) {
+ user.sendMessage("commands.admin.team.add.name-not-owner", TextVariables.NAME, args.get(0));
+ getIslands().getIsland(getWorld(), ownerUUID).showMembers(getPlugin(), user, getWorld());
return false;
}
if (getIslands().inTeam(getWorld(), targetUUID)) {
@@ -57,10 +57,10 @@ public class AdminTeamAddCommand extends CompositeCommand {
}
// Success
User target = User.getInstance(targetUUID);
- User leader = User.getInstance(leaderUUID);
- leader.sendMessage("commands.island.team.invite.accept.name-joined-your-island", TextVariables.NAME, getPlugin().getPlayers().getName(targetUUID));
+ User owner = User.getInstance(ownerUUID);
+ owner.sendMessage("commands.island.team.invite.accept.name-joined-your-island", TextVariables.NAME, getPlugin().getPlayers().getName(targetUUID));
target.sendMessage("commands.island.team.invite.accept.you-joined-island", TextVariables.LABEL, getTopLabel());
- getIslands().getIsland(getWorld(), leaderUUID).addMember(targetUUID);
+ getIslands().getIsland(getWorld(), ownerUUID).addMember(targetUUID);
user.sendMessage("general.success");
return true;
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamDisbandCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamDisbandCommand.java
index aff2526bd..ae0d6f23a 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamDisbandCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamDisbandCommand.java
@@ -42,13 +42,13 @@ public class AdminTeamDisbandCommand extends CompositeCommand {
return false;
}
if (!getIslands().getOwner(getWorld(), targetUUID).equals(targetUUID)) {
- user.sendMessage("commands.admin.team.disband.use-disband-leader", "[leader]", getPlayers().getName(getIslands().getOwner(getWorld(), targetUUID)));
+ user.sendMessage("commands.admin.team.disband.use-disband-owner", "[owner]", getPlayers().getName(getIslands().getOwner(getWorld(), targetUUID)));
return false;
}
// Disband team
getIslands().getMembers(getWorld(), targetUUID).forEach(m -> {
User.getInstance(m).sendMessage("commands.admin.team.disband.disbanded");
- // The leader gets to keep the island
+ // The owner gets to keep the island
if (!m.equals(targetUUID)) {
getIslands().setLeaveTeam(getWorld(), m);
}
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamKickCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamKickCommand.java
index 78e8a81d6..6981c7fa5 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamKickCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamKickCommand.java
@@ -43,7 +43,7 @@ public class AdminTeamKickCommand extends CompositeCommand {
return false;
}
if (getIslands().getOwner(getWorld(), targetUUID).equals(targetUUID)) {
- user.sendMessage("commands.admin.team.kick.cannot-kick-leader");
+ user.sendMessage("commands.admin.team.kick.cannot-kick-owner");
getIslands().getIsland(getWorld(), targetUUID).showMembers(getPlugin(), user, getWorld());
return false;
}
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandCreateCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandCreateCommand.java
index 8bd83e1ff..2014dfa96 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandCreateCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandCreateCommand.java
@@ -37,6 +37,13 @@ public class IslandCreateCommand extends CompositeCommand {
user.sendMessage("general.errors.already-have-island");
return false;
}
+ if (getIWM().getMaxIslands(getWorld()) > 0
+ && getIslands().getIslandCount(getWorld()) >= getIWM().getMaxIslands(getWorld())) {
+ // There is too many islands in the world :(
+ user.sendMessage("commands.island.create.too-many-islands");
+ return false;
+ }
+
user.sendMessage("commands.island.create.creating-island");
try {
NewIsland.builder()
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetCommand.java
index 3ab6a9733..22e61564f 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetCommand.java
@@ -39,7 +39,7 @@ public class IslandResetCommand extends ConfirmableCommand {
return false;
}
if (!getIslands().isOwner(getWorld(), user.getUniqueId())) {
- user.sendMessage("general.errors.not-leader");
+ user.sendMessage("general.errors.not-owner");
return false;
}
if (getIslands().inTeam(getWorld(), user.getUniqueId())) {
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetnameCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetnameCommand.java
index af1bb9354..2a8a81790 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetnameCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetnameCommand.java
@@ -33,7 +33,7 @@ public class IslandResetnameCommand extends CompositeCommand {
}
if (!getIslands().isOwner(getWorld(), playerUUID)) {
- user.sendMessage("general.errors.not-leader");
+ user.sendMessage("general.errors.not-owner");
return false;
}
// Resets the island name
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSetnameCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSetnameCommand.java
index fa7e6beef..68249d7ed 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSetnameCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSetnameCommand.java
@@ -37,7 +37,7 @@ public class IslandSetnameCommand extends CompositeCommand {
}
if (!getIslands().isOwner(getWorld(), playerUUID)) {
- user.sendMessage("general.errors.not-leader");
+ user.sendMessage("general.errors.not-owner");
return false;
}
// Explain command
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamCommand.java
index f3c8626ea..37fccf736 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamCommand.java
@@ -36,14 +36,13 @@ public class IslandTeamCommand extends CompositeCommand {
new IslandTeamUntrustCommand(this);
new IslandTeamPromoteCommand(this, "promote");
new IslandTeamPromoteCommand(this, "demote");
-
}
@Override
public boolean execute(User user, String label, List args) {
// Player issuing the command must have an island
- UUID teamLeaderUUID = getOwner(getWorld(), user);
- if (teamLeaderUUID == null) {
+ UUID ownerUUID = getOwner(getWorld(), user);
+ if (ownerUUID == null) {
user.sendMessage("general.errors.no-island");
return false;
}
@@ -55,7 +54,7 @@ public class IslandTeamCommand extends CompositeCommand {
return false;
}
Set teamMembers = getMembers(getWorld(), user);
- if (teamLeaderUUID.equals(playerUUID)) {
+ if (ownerUUID.equals(playerUUID)) {
int maxSize = inviteCommand.getMaxTeamSize(user);
if (teamMembers.size() < maxSize) {
user.sendMessage("commands.island.team.invite.you-can-invite", TextVariables.NUMBER, String.valueOf(maxSize - teamMembers.size()));
@@ -68,7 +67,6 @@ public class IslandTeamCommand extends CompositeCommand {
return true;
}
-
private boolean fireEvent(User user) {
IslandBaseEvent event = TeamEvent.builder()
.island(getIslands()
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteAcceptCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteAcceptCommand.java
index 262a9e2f3..cd6b84aad 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteAcceptCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteAcceptCommand.java
@@ -43,9 +43,9 @@ public class IslandTeamInviteAcceptCommand extends CompositeCommand {
user.sendMessage("commands.island.team.invite.errors.you-already-are-in-team");
return false;
}
- // Get the team leader
- UUID prospectiveTeamLeaderUUID = itc.getInviteCommand().getInviteList().get(playerUUID);
- if (!getIslands().hasIsland(getWorld(), prospectiveTeamLeaderUUID)) {
+ // Get the island owner
+ UUID prospectiveOwnerUUID = itc.getInviteCommand().getInviteList().get(playerUUID);
+ if (!getIslands().hasIsland(getWorld(), prospectiveOwnerUUID)) {
user.sendMessage("commands.island.team.invite.errors.invalid-invite");
itc.getInviteCommand().getInviteList().remove(playerUUID);
return false;
@@ -53,7 +53,7 @@ public class IslandTeamInviteAcceptCommand extends CompositeCommand {
// Fire event so add-ons can run commands, etc.
IslandBaseEvent event = TeamEvent.builder()
.island(getIslands()
- .getIsland(getWorld(), prospectiveTeamLeaderUUID))
+ .getIsland(getWorld(), prospectiveOwnerUUID))
.reason(TeamEvent.Reason.JOIN)
.involvedPlayer(playerUUID)
.build();
@@ -68,12 +68,12 @@ public class IslandTeamInviteAcceptCommand extends CompositeCommand {
// Get the player's island - may be null if the player has no island
Island island = getIslands().getIsland(getWorld(), playerUUID);
// Get the team's island
- Island teamIsland = getIslands().getIsland(getWorld(), prospectiveTeamLeaderUUID);
+ Island teamIsland = getIslands().getIsland(getWorld(), prospectiveOwnerUUID);
// Clear the player's inventory
user.getInventory().clear();
// Move player to team's island
- User prospectiveTeamLeader = User.getInstance(prospectiveTeamLeaderUUID);
- Location newHome = getIslands().getSafeHomeLocation(getWorld(), prospectiveTeamLeader, 1);
+ User prospectiveOwner = User.getInstance(prospectiveOwnerUUID);
+ Location newHome = getIslands().getSafeHomeLocation(getWorld(), prospectiveOwner, 1);
user.teleport(newHome);
// Remove player as owner of the old island
getIslands().removePlayer(getWorld(), playerUUID);
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteCommand.java
index cf8865b65..8f5548912 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteCommand.java
@@ -147,11 +147,10 @@ public class IslandTeamInviteCommand extends CompositeCommand {
/**
* Gets the maximum team size for this player in this game based on the permission or the world's setting
- * @param user - user
+ * @param user user
* @return max team size of user
*/
public int getMaxTeamSize(User user) {
- return user.getPermissionValue(getPermissionPrefix() + "team.maxsize.", getIWM().getMaxTeamSize(getWorld()));
+ return user.getPermissionValue(getPermissionPrefix() + "team.maxsize", getIWM().getMaxTeamSize(getWorld()));
}
-
}
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommand.java
index 8490b0a10..41a7b4372 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommand.java
@@ -30,7 +30,7 @@ public class IslandTeamKickCommand extends ConfirmableCommand {
return false;
}
if (!getOwner(getWorld(), user).equals(user.getUniqueId())) {
- user.sendMessage("general.errors.not-leader");
+ user.sendMessage("general.errors.not-owner");
return false;
}
// If args are not right, show help
@@ -63,7 +63,7 @@ public class IslandTeamKickCommand extends ConfirmableCommand {
private void kick(User user, UUID targetUUID) {
User target = User.getInstance(targetUUID);
- target.sendMessage("commands.island.team.kick.leader-kicked");
+ target.sendMessage("commands.island.team.kick.owner-kicked");
getIslands().removePlayer(getWorld(), targetUUID);
// Remove money inventory etc.
if (getIWM().isOnLeaveResetEnderChest(getWorld())) {
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamLeaveCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamLeaveCommand.java
index 6fb44f3c5..3a3722343 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamLeaveCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamLeaveCommand.java
@@ -41,9 +41,9 @@ public class IslandTeamLeaveCommand extends ConfirmableCommand {
}
private void leave(User user) {
- UUID leaderUUID = getIslands().getOwner(getWorld(), user.getUniqueId());
- if (leaderUUID != null) {
- User.getInstance(leaderUUID).sendMessage("commands.island.team.leave.left-your-island", TextVariables.NAME, user.getName());
+ UUID ownerUUID = getIslands().getOwner(getWorld(), user.getUniqueId());
+ if (ownerUUID != null) {
+ User.getInstance(ownerUUID).sendMessage("commands.island.team.leave.left-your-island", TextVariables.NAME, user.getName());
}
getIslands().setLeaveTeam(getWorld(), user.getUniqueId());
// Remove money inventory etc.
diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommand.java
index b03a4ef48..43c0e889c 100644
--- a/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommand.java
+++ b/src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommand.java
@@ -31,9 +31,9 @@ public class IslandTeamSetownerCommand extends CompositeCommand {
UUID playerUUID = user.getUniqueId();
// Can use if in a team
boolean inTeam = getPlugin().getIslands().inTeam(getWorld(), playerUUID);
- UUID teamLeaderUUID = getOwner(getWorld(), user);
- if (!(inTeam && teamLeaderUUID.equals(playerUUID))) {
- user.sendMessage("general.errors.not-leader");
+ UUID ownerUUID = getOwner(getWorld(), user);
+ if (!(inTeam && ownerUUID.equals(playerUUID))) {
+ user.sendMessage("general.errors.not-owner");
return false;
}
// If args are not right, show help
diff --git a/src/main/java/world/bentobox/bentobox/api/configuration/WorldSettings.java b/src/main/java/world/bentobox/bentobox/api/configuration/WorldSettings.java
index 1baf778bc..640d8ea01 100644
--- a/src/main/java/world/bentobox/bentobox/api/configuration/WorldSettings.java
+++ b/src/main/java/world/bentobox/bentobox/api/configuration/WorldSettings.java
@@ -100,6 +100,7 @@ public interface WorldSettings {
int getMaxHomes();
/**
+ * 0 or -1 is unlimited. It will block island creation if the island count for the world is higher than this.
* @return the maxIslands
*/
int getMaxIslands();
diff --git a/src/main/java/world/bentobox/bentobox/api/localization/BentoBoxLocale.java b/src/main/java/world/bentobox/bentobox/api/localization/BentoBoxLocale.java
index 035fb9498..f955ebfa2 100644
--- a/src/main/java/world/bentobox/bentobox/api/localization/BentoBoxLocale.java
+++ b/src/main/java/world/bentobox/bentobox/api/localization/BentoBoxLocale.java
@@ -14,7 +14,7 @@ import world.bentobox.bentobox.util.ItemParser;
*/
public class BentoBoxLocale {
- private final String UNKNOWN = "unknown";
+ private static final String UNKNOWN = "unknown";
private Locale locale;
private YamlConfiguration config;
diff --git a/src/main/java/world/bentobox/bentobox/api/user/User.java b/src/main/java/world/bentobox/bentobox/api/user/User.java
index 595a2b0b3..e464d9d9f 100644
--- a/src/main/java/world/bentobox/bentobox/api/user/User.java
+++ b/src/main/java/world/bentobox/bentobox/api/user/User.java
@@ -185,11 +185,16 @@ public class User {
/**
* Get the maximum value of a numerical permission setting
- * @param permissionPrefix the start of the perm, e.g., bskyblock.maxhomes
+ * @param permissionPrefix the start of the perm, e.g., {@code plugin.mypermission}
* @param defaultValue the default value; the result may be higher or lower than this
* @return max value
*/
public int getPermissionValue(String permissionPrefix, int defaultValue) {
+ // If there is a dot at the end of the permissionPrefix, remove it
+ if (permissionPrefix.endsWith(".")) {
+ permissionPrefix = permissionPrefix.substring(0, permissionPrefix.length()-1);
+ }
+
int value = defaultValue;
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
if (perms.getPermission().startsWith(permissionPrefix + ".")) {
diff --git a/src/main/java/world/bentobox/bentobox/database/objects/Island.java b/src/main/java/world/bentobox/bentobox/database/objects/Island.java
index cf68acb7c..f07a0befd 100644
--- a/src/main/java/world/bentobox/bentobox/database/objects/Island.java
+++ b/src/main/java/world/bentobox/bentobox/database/objects/Island.java
@@ -484,7 +484,7 @@ public class Island implements DataObject {
/**
* Sets the owner of the island.
- * @param owner - the island owner - the owner/team leader to set
+ * @param owner the island owner - the owner to set
*/
public void setOwner(UUID owner){
this.owner = owner;
diff --git a/src/main/java/world/bentobox/bentobox/listeners/JoinLeaveListener.java b/src/main/java/world/bentobox/bentobox/listeners/JoinLeaveListener.java
index 785d49a8f..d86a697c7 100644
--- a/src/main/java/world/bentobox/bentobox/listeners/JoinLeaveListener.java
+++ b/src/main/java/world/bentobox/bentobox/listeners/JoinLeaveListener.java
@@ -54,13 +54,13 @@ public class JoinLeaveListener implements Listener {
.forEach(world -> {
Island island = plugin.getIslands().getIsland(world, user);
- // Check if new leader has a different range permission than the island size
+ // Check if new owner has a different range permission than the island size
int range = user.getPermissionValue(plugin.getIWM().getAddon(island.getWorld()).get().getPermissionPrefix() + "island.range", plugin.getIWM().getIslandProtectionRange(Util.getWorld(island.getWorld())));
// Range can go up or down
if (range != island.getProtectionRange()) {
user.sendMessage("commands.admin.setrange.range-updated", TextVariables.NUMBER, String.valueOf(range));
- plugin.log("Makeleader: Island protection range changed from " + island.getProtectionRange() + " to "
+ plugin.log("Setowner: Island protection range changed from " + island.getProtectionRange() + " to "
+ range + " for " + user.getName() + " due to permission.");
}
diff --git a/src/main/java/world/bentobox/bentobox/listeners/flags/BucketListener.java b/src/main/java/world/bentobox/bentobox/listeners/flags/BucketListener.java
index 1cbdfd2ad..e18d565a8 100644
--- a/src/main/java/world/bentobox/bentobox/listeners/flags/BucketListener.java
+++ b/src/main/java/world/bentobox/bentobox/listeners/flags/BucketListener.java
@@ -1,6 +1,5 @@
package world.bentobox.bentobox.listeners.flags;
-import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.TropicalFish;
@@ -40,7 +39,6 @@ public class BucketListener extends FlagListener {
*/
@EventHandler(priority = EventPriority.LOW)
public void onBucketFill(final PlayerBucketFillEvent e) {
- Bukkit.getLogger().info("DEBUG: " + e.getEventName());
// Check filling of various liquids
if (e.getItemStack().getType().equals(Material.LAVA_BUCKET) && (!checkIsland(e, e.getBlockClicked().getLocation(), Flags.COLLECT_LAVA))) {
return;
@@ -61,6 +59,4 @@ public class BucketListener extends FlagListener {
checkIsland(e, e.getRightClicked().getLocation(), Flags.FISH_SCOOPING);
}
}
-
-
}
\ No newline at end of file
diff --git a/src/main/java/world/bentobox/bentobox/listeners/flags/PlaceBlocksListener.java b/src/main/java/world/bentobox/bentobox/listeners/flags/PlaceBlocksListener.java
index 032d2247d..18e2f7d07 100644
--- a/src/main/java/world/bentobox/bentobox/listeners/flags/PlaceBlocksListener.java
+++ b/src/main/java/world/bentobox/bentobox/listeners/flags/PlaceBlocksListener.java
@@ -90,7 +90,7 @@ public class PlaceBlocksListener extends FlagListener {
public void onBlockForm(EntityBlockFormEvent e) {
if (e.getNewState().getType().equals(Material.FROSTED_ICE) && e.getEntity() instanceof Player) {
setUser(User.getInstance((Player)e.getEntity()));
- checkIsland(e, e.getBlock().getLocation(), Flags.PLACE_BLOCKS);
+ checkIsland(e, e.getBlock().getLocation(), Flags.FROST_WALKER);
}
}
diff --git a/src/main/java/world/bentobox/bentobox/lists/Flags.java b/src/main/java/world/bentobox/bentobox/lists/Flags.java
index f762d0af0..60f645c9a 100644
--- a/src/main/java/world/bentobox/bentobox/lists/Flags.java
+++ b/src/main/java/world/bentobox/bentobox/lists/Flags.java
@@ -59,6 +59,9 @@ public class Flags {
public static final Flag BREAK_BLOCKS = new FlagBuilder().id("BREAK_BLOCKS").icon(Material.STONE).listener(new BreakBlocksListener()).build();
public static final Flag PLACE_BLOCKS = new FlagBuilder().id("PLACE_BLOCKS").icon(Material.GRASS).listener(new PlaceBlocksListener()).build();
+ // Frost walker - uses the place block listener
+ public static final Flag FROST_WALKER = new FlagBuilder().id("FROST_WALKER").icon(Material.ICE).build();
+
// Block interactions - all use BlockInteractionListener()
public static final Flag ANVIL = new FlagBuilder().id("ANVIL").icon(Material.ANVIL).listener(new BlockInteractionListener()).build();
public static final Flag BEACON = new FlagBuilder().id("BEACON").icon(Material.BEACON).build();
diff --git a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java
index 7e158cb5d..d8686e1fa 100644
--- a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java
+++ b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java
@@ -253,10 +253,14 @@ public class IslandsManager {
}
}
- public int getIslandCount(){
+ public int getIslandCount() {
return islandCache.size();
}
+ public int getIslandCount(World world) {
+ return islandCache.size(world);
+ }
+
/**
* Gets the island for this player. If they are in a team, the team island is returned.
* @param world - world to check
@@ -393,7 +397,7 @@ public class IslandsManager {
plugin.getPlayers().setHomeLocation(user, l, number);
return l;
} else {
- // try team leader's home
+ // try owner's home
Location tlh = plugin.getPlayers().getHomeLocation(world, plugin.getIslands().getOwner(world, user.getUniqueId()));
if (tlh != null && isSafeLocation(tlh)) {
plugin.getPlayers().setHomeLocation(user, tlh, number);
@@ -454,19 +458,6 @@ public class IslandsManager {
return spawn.containsKey(world) ? spawn.get(world).getSpawnPoint(world.getEnvironment()) : null;
}
- /**
- * Provides UUID of this player's island owner or null if it does not exist
- * @param world - world to check
- * @param playerUUID - the player's UUID
- * @return island owner's UUID or null if player has no island
- *
- * @deprecated Renamed to {@link #getOwner(World, UUID)} for consistency.
- */
- @Deprecated
- public UUID getTeamLeader(World world, UUID playerUUID) {
- return getOwner(world, playerUUID);
- }
-
/**
* Provides UUID of this player's island owner or null if it does not exist
* @param world world to check
@@ -789,20 +780,20 @@ public class IslandsManager {
}
/**
- * Makes a new leader for an island
- * @param world - world
- * @param user - the user who is issuing the command
- * @param targetUUID - the current island member who is going to become the new owner
+ * Sets this target as the owner for this island
+ * @param world world
+ * @param user the user who is issuing the command
+ * @param targetUUID the current island member who is going to become the new owner
*/
public void setOwner(World world, User user, UUID targetUUID) {
setOwner(user, targetUUID, getIsland(world, targetUUID));
}
/**
- * Makes a new leader for an island
- * @param user - requester
- * @param targetUUID - new owner
- * @param island - island to register
+ * Sets this target as the owner for this island
+ * @param user requester
+ * @param targetUUID new owner
+ * @param island island to register
*/
public void setOwner(User user, UUID targetUUID, Island island) {
islandCache.setOwner(island, targetUUID);
@@ -813,7 +804,7 @@ public class IslandsManager {
User target = User.getInstance(targetUUID);
target.sendMessage("commands.island.team.setowner.you-are-the-owner");
if (target.isOnline() && plugin.getIWM().getAddon(island.getWorld()).isPresent()) {
- // Check if new leader has a different range permission than the island size
+ // Check if new owner has a different range permission than the island size
int range = target.getPermissionValue(
plugin.getIWM().getAddon(island.getWorld()).get().getPermissionPrefix() + "island.range",
plugin.getIWM().getIslandProtectionRange(Util.getWorld(island.getWorld())));
@@ -821,7 +812,7 @@ public class IslandsManager {
if (range != island.getProtectionRange()) {
user.sendMessage("commands.admin.setrange.range-updated", TextVariables.NUMBER, String.valueOf(range));
target.sendMessage("commands.admin.setrange.range-updated", TextVariables.NUMBER, String.valueOf(range));
- plugin.log("Makeleader: Island protection range changed from " + island.getProtectionRange() + " to "
+ plugin.log("Setowner: Island protection range changed from " + island.getProtectionRange() + " to "
+ range + " for " + user.getName() + " due to permission.");
}
island.setProtectionRange(range);
diff --git a/src/main/java/world/bentobox/bentobox/managers/SchemsManager.java b/src/main/java/world/bentobox/bentobox/managers/SchemsManager.java
index 3176bae0c..4f4da421a 100644
--- a/src/main/java/world/bentobox/bentobox/managers/SchemsManager.java
+++ b/src/main/java/world/bentobox/bentobox/managers/SchemsManager.java
@@ -99,7 +99,8 @@ public class SchemsManager {
if (islandSchems.containsKey(world)) {
islandSchems.get(world).pasteIsland(world, island, task);
} else {
- plugin.logError("Tried to paste schem for " + world.getName() + " but it is not loaded!");
+ plugin.logError("Tried to paste schem for " + world.getName() + " but the schem is not loaded!");
+ plugin.log("This might be due to an invalid schem format. Keep in mind that schems are not schematics.");
}
}
diff --git a/src/main/java/world/bentobox/bentobox/managers/island/IslandCache.java b/src/main/java/world/bentobox/bentobox/managers/island/IslandCache.java
index ef0b21855..aa697d170 100644
--- a/src/main/java/world/bentobox/bentobox/managers/island/IslandCache.java
+++ b/src/main/java/world/bentobox/bentobox/managers/island/IslandCache.java
@@ -139,18 +139,6 @@ public class IslandCache {
return new HashSet<>(0);
}
- /**
- * @param world - the world to check
- * @param uuid - player's uuid
- * @return team leader's UUID, the player UUID if they are not in a team, or null if there is no island
- *
- * @deprecated Renamed to {@link #getOwner(World, UUID)} for consistency.
- */
- @Deprecated
- public UUID getTeamLeader(World world, UUID uuid) {
- return getOwner(world, uuid);
- }
-
/**
* @param world the world to check
* @param uuid the player's UUID
@@ -207,6 +195,15 @@ public class IslandCache {
return islandsByLocation.size();
}
+ /**
+ * Gets the number of islands in the cache for this world
+ * @param world
+ * @return the number of islands
+ */
+ public int size(World world) {
+ return islandsByUUID.getOrDefault(world, new HashMap<>(0)).size();
+ }
+
/**
* Sets an island owner. Clears out any other owner
* @param island - island
diff --git a/src/main/resources/locales/en-GB.yml b/src/main/resources/locales/en-GB.yml
deleted file mode 100644
index eaa8858d3..000000000
--- a/src/main/resources/locales/en-GB.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-###########################################################################################
-# This is a YML file. Be careful when editing. Check your edits in a YAML checker like #
-# the one at http://yaml-online-parser.appspot.com #
-###########################################################################################
-
-# Updated for
-
-meta:
- authors:
- - tastybento
- banner: "BLUE_BANNER:1:STRIPE_DOWNLEFT:WHITE:STRIPE_DOWNRIGHT:WHITE:STRIPE_CENTER:WHITE:STRIPE_MIDDLE:WHITE:STRAIGHT_CROSS:RED:CROSS:RED"
-
-protection:
- flags:
- ARMOR_STAND:
- description: "Toggle interaction"
- name: "Armour stands"
- hint: "Armour stand use disabled"
diff --git a/src/main/resources/locales/en-US.yml b/src/main/resources/locales/en-US.yml
index 7bddde961..2d92a2ee0 100644
--- a/src/main/resources/locales/en-US.yml
+++ b/src/main/resources/locales/en-US.yml
@@ -23,7 +23,7 @@ general:
player-has-no-island: "&cThat player has no island!"
already-have-island: "&cYou already have an island!"
no-safe-location: "&cNo safe location found on island!"
- not-leader: "&cYou are not the leader of your island!"
+ not-owner: "&cYou are not the owner of your island!"
not-in-team: "&cThat player is not in your team!"
offline-player: "&cThat player is offline or doesn't exist."
unknown-player: "&c[name] is an unknown player!"
@@ -31,7 +31,7 @@ general:
unknown-command: "&cUnknown command. Do &b/[label] help &cfor help."
warp-not-safe: "&cThat warp is not safe right now!"
wrong-world: "&cYou are not in the right world to do that!"
- you-must-wait: "&cYou must wait [number]s before you can do that command again"
+ you-must-wait: "&cYou must wait [number]s before you can do that command again."
tips:
changing-obsidian-to-lava: "Changing obsidian back into lava. Be careful!"
@@ -56,19 +56,19 @@ commands:
description: "clears all player reset counts for this world"
team:
add:
- parameters: " "
- description: "add player to leader's team"
- name-not-leader: "&c[name] is not the leader"
+ parameters: " "
+ description: "add player to owner's team"
+ name-not-owner: "&c[name] is not the owner."
name-has-island: "&c[name] has an island. Unregister or delete them first!"
disband:
- parameters: ""
- description: "disband team leader's team"
- user-disband-leader: "&cNot leader! Use disband [leader]"
+ parameters: ""
+ description: "disband owner's team"
+ use-disband-owner: "&cNot owner! Use disband [owner]"
disbanded: "&cAdmin disbanded your team!"
kick:
parameters: ""
description: "kick a player from a team"
- cannot-kick-leader: "&cYou cannot kick the team leader. Kick members first"
+ cannot-kick-owner: "&cYou cannot kick the owner. Kick members first"
admin-kicked: "&cThe admin kicked you from the team."
setowner:
parameters: ""
@@ -190,7 +190,7 @@ commands:
delete:
parameters: ""
description: "deletes a player's island"
- cannot-delete-team-leader: "&cAll island members have to be kicked from the island before deleting it."
+ cannot-delete-owner: "&cAll island members have to be kicked from the island before deleting it."
deleted-island: "&aIsland at &e[xyz] &ahas been successfully deleted."
why:
parameters: ""
@@ -231,9 +231,10 @@ commands:
description: "teleport you to the spawn"
create:
description: "create an island"
+ too-many-islands: "&cThere are too many islands in this world: there isn't enough room for yours to be created."
unable-create-island: "&cYour island could not be generated, please contact an administrator."
creating-island: "&aCreating your island..."
- pick-world: "&cPick a world from [worlds]"
+ pick-world: "&cPick a world from [worlds]."
info:
description: "display info about your island"
reset:
@@ -320,13 +321,13 @@ commands:
cancel:
description: "cancel the pending invite to join your island"
leave:
- cannot-leave: "&cTeam leaders cannot leave! Become a member first, or kick all members."
+ cannot-leave: "&cOwners cannot leave! Become a member first, or kick all members."
description: "leave your island"
left-your-island: "&c[name] &cleft your island"
kick:
description: "remove a member from your island"
parameters: ""
- leader-kicked: "&cThe leader kicked you from the island!"
+ owner-kicked: "&cThe owner kicked you from the island!"
cannot-kick: "&cYou cannot kick yourself!"
demote:
description: "demote a player on your island down a rank"
@@ -341,7 +342,7 @@ commands:
setowner:
description: "transfer your island ownership to a member"
errors:
- cant-transfer-to-yourself: "&cYou can't transfer ownership to yourself! Well, infact, you could... But we don't want you to. 'Cause it's bad."
+ cant-transfer-to-yourself: "&cYou can't transfer ownership to yourself! &7(&oWell, in fact, you could... But we don't want you to. Because it's useless.&r&7)"
target-is-not-member: "&cThat player is not part of your island team!"
name-is-the-owner: "&a[name] is now the island owner!"
parameters: ""
@@ -697,6 +698,10 @@ protection:
description: "Toggle crushing"
name: "Turtle Eggs"
hint: "Turtle eggs cannot be crushed!"
+ FROST_WALKER:
+ description: "Toggle Frost Walker enchantment"
+ name: "Frost Walker"
+ hint: "Frost Walker cannot be used here"
locked: "&cThis island is locked!"
protected: "&cIsland protected: [description]"
spawn-protected: "&cSpawn protected: [description]"
diff --git a/src/main/resources/locales/fr-FR.yml b/src/main/resources/locales/fr-FR.yml
deleted file mode 100644
index 39d6ca179..000000000
--- a/src/main/resources/locales/fr-FR.yml
+++ /dev/null
@@ -1,264 +0,0 @@
-###########################################################################################
-# Ceci est fichier YAML. Soyez prudents lorsque vous l'éditez et vérifiez la syntaxe en #
-# utilisant un parser YAML, tel que http://yaml-online-parser.appspot.com #
-###########################################################################################
-
-# Updated for
-
-meta:
- authors:
- - MrSheepSheep
- - Poslovitch
- banner: "WHITE_BANNER:1:STRIPE_BOTTOM:RED:STRIPE_TOP:BLUE"
-
-general:
- deaths: "morts"
- unlimited: "Illimité"
- success: "&aAction effectuée!"
- errors:
- command-cancelled: "&cCommande annulée."
- no-permission: "&cVous n'avez pas la permission d'utiliser cette commande."
- use-in-game: "&cCette commande doit être exécutée en jeu."
- no-team: "&cVous n'avez pas d'équipe!"
- no-island: "&cVous n'avez pas d'île!"
- player-has-no-island: "&cCe joueur n'a pas d'île!"
- already-have-island: "&cVous possédez déjà une île!"
- no-safe-location: "&cAucune position sécurisée n'a été trouvée sur cette île!"
- not-leader: "&cVous n'êtes oas le leader de votre île!"
- not-in-team: "&cCe joueur n'est pas dans votre équipe!"
- offline-player: "&cCe joueur est déconnecté ou n'existe pas."
- unknown-player: "&cCe joueur est inconnu."
- general: "&cImpossible d'exécuter la commande. Contactez un administrateur."
- warp-not-safe: "&cCe Warp n'est pas sécurisé."
- wrong-world: "&cVous n'êtes pas de le bon monde pour effectuer cette action."
- tips:
- changing-ob-to-lava: "Transformation de l'obsidienne en lave. Faites attention!"
-
-commands:
- help:
- header: "&7=========== &cBentoBox &7==========="
- syntax: "&b[usage] &a[parameters]&7: &e[description]"
- end: "&7================================="
- parameters: "[command]"
- description: "help command"
- admin:
- help:
- description: "admin command"
- version:
- description: "display BentoBox and addons versions"
- setrange:
- parameters: "[player] [range]"
- description: "set the range of player's island"
- range-updated: "Island range updated to [number]"
- reload:
- description: "reload the plugin"
- tp:
- parameters: "[player]"
- description: "teleport to a player's island"
- manual: "&cNo safe warp found! Manually tp near to &b[location] &cand check it out"
- island:
- about:
- description: "display info about BentoBox"
- go:
- parameters: ""
- description: "teleport you to your island"
- teleport: "&aTeleporting you to your island. &b/[label] help &afor help."
- teleported: "&aTeleported you to home &e#[number]."
- help:
- description: "The main island command"
- spawn:
- description: "teleport you to the spawn"
- create:
- description: "create an island"
- unable-create-island: "Your island could not be generated, please contact an administrator."
- creating-island: "Creating your island..."
- info:
- description: "display info about your island"
- reset:
- description: "restart your island and remove the old one"
- must-remove-members: "You must remove all members from your island before you can restart it (/island kick )."
- sethome:
- description: "set your teleport point for /island"
- must-be-on-your-island: "You must be on your island to set home!"
- num-homes: "Homes can be 1 to [max]."
- home-set: "Your island home has been set to your current location."
- parameters: ""
- setname:
- description: "set a name for your island"
- name-too-short: "&cToo short. Minimum size is [length] characters."
- name-too-long: "&cToo long. Maximum size is [length] characters."
- parameters: ""
- resetname:
- description: "reset your island name"
- team:
- description: "manage your team"
- info:
- description: "display detailed info about your team"
- invite:
- description: "invite a player to join your island"
- invitation-sent: "Invitation sent to [name]"
- removing-invite: "Removing invite"
- name-has-invited-you: "[name] has invited you to join their island."
- to-accept-or-reject: "Do /island team accept to accept, or /island team reject to reject"
- you-will-lose-your-island: "&cWARNING! You will lose your island if you accept!"
- errors:
- cannot-invite-self: "&cYou cannot invite yourself!"
- cooldown: "&cYou cannot invite that person for another [time] seconds"
- island-is-full: "&cYour island is full, you can't invite anyone else."
- none-invited-you: "&cNo one invited you :c."
- you-already-are-in-team: "&cYou are already on a team!"
- already-on-team: "&cThat player is already on a team!"
- invalid-invite: "&cThat invite is no longer valid, sorry."
- parameters: ""
- you-can-invite: "You can invite [number] more players."
- accept:
- description: "accept an invitation"
- you-joined-island: "&aYou joined an island! Use /[label] team info to see the other members."
- name-joined-your-island: "&a[name] joined your island!"
- reject:
- description: "reject an invitation"
- you-rejected-invite: "&aYou rejected the invitation to join an island."
- name-rejected-your-invite: "&c[name] rejected your island invite!"
- cancel:
- description: "cancel the pending invite to join your island"
- leave:
- description: "leave your island"
- type-again: "&cEnter the leave command again to confirm"
- left-your-island: "&c[player] left your island"
- kick:
- description: "remove a member from your island"
- parameters: ""
- type-again: "&cEnter the kick command again to confirm"
- leader-kicked: "&cThe leader kicked you from the island!"
- demote:
- description: "demote a player on your island down a rank"
- parameters: ""
- failure: "&cPlayer cannot be demoted any further!"
- success: "Demoted [name] to [rank]"
- promote:
- description: "promote a player on your island up a rank"
- parameters: ""
- failure: "&cPlayer cannot be promoted any further!"
- success: "Promoted [name] to [rank]"
- setowner:
- description: "transfer your island ownership to a member"
- errors:
- cant-transfer-to-yourself: "&cYou can't transfer ownership to yourself! Well, infact, you could... But we don't want you to. 'Cause it's bad."
- target-is-not-member: "&cThat player is not part of your island team!"
- name-is-the-owner: "&a[name] is now the island owner!"
- parameters: ""
- you-are-the-owner: "&aYou are now the island owner!"
- ban:
- description: "ban a player from your island"
- parameters: ""
- unban:
- description: "unban a player from your island"
- parameters: ""
- banlist:
- description: "list banned players"
- lock:
- description: "lock/unlock your island so visitors cannot enter it"
- settings:
- description: "display island settings"
- language:
- description: "select language"
-
-ranks:
- owner: "Owner"
- member: "Member"
- coop: "Coop"
- visitor: "Visitor"
- banned: "Banned"
-
-protection:
- protected: "&cIsland protected!"
- flags:
- ANVIL:
- name: "Anvils"
- description: "Toggle interaction with anvils"
- ARMOR_STAND:
- name: "Armor stands"
- description: "Toggle interaction with armor stands"
- BEACON:
- name: "Beacons"
- description: "Toggle interaction with beacons"
- BED:
- name: "Beds"
- description: "Toggle interaction with beds"
- BREAK_BLOCKS:
- name: "Break blocks"
- description: "Toggle block breaking"
- BREEDING:
- name: "Breed animals"
- description: "Toggle animal breeding"
- BREWING:
- name: "Brewing stands"
- description: "Toggle interaction with brewing stands"
- BUCKET:
- name: "Buckets"
- description: "Toggle interaction with buckets"
- COLLECT_WATER:
- name: "Collect water"
- description: |
- Toggle collecting water using buckets
- (override Buckets)
- COLLECT_LAVA:
- name: "Collect lava"
- description: |
- Toggle collecting lava using buckets
- (override Buckets)
- CHORUS_FRUIT:
- name: "Chorus fruits"
- description: "Toggle teleportation using Chorus fruits"
- CRAFTING: "Use crafting table"
- CROP_TRAMPLE: "Trample crops"
- DOOR: "Use doors"
- ELYTRA: "Use elytras"
- ENCHANTING: "Use enchanting table"
- ENTER_EXIT_MESSAGES: "Display entry and exit messages"
- FIRE: "FIRE"
- FIRE_EXTINGUISH: "FIRE_EXTINGUISH"
- FIRE_SPREAD: "FIRE_SPREAD"
- FURNACE: "FURNACE"
- GATE: "GATE"
- HURT_ANIMALS: "HURT_ANIMALS"
- HURT_MONSTERS: "HURT_MONSTERS"
- HURT_VILLAGERS: "HURT_VILLAGERS"
- ITEM_DROP: "ITEM_DROP"
- ITEM_PICKUP: "ITEM_PICKUP"
- LEASH: "LEASH"
- MILKING: "MILKING"
- MOB_SPAWN: "MOB_SPAWN"
- MONSTER_SPAWN: "MONSTER_SPAWN"
- MOUNT_INVENTORY: "MOUNT_INVENTORY"
- RIDING: "RIDING"
- MUSIC: "MUSIC"
- CHEST: "CHEST"
- PLACE_BLOCKS: "PLACE_BLOCKS"
- PORTAL: "PORTAL"
- PRESSURE_PLATE: "PRESSURE_PLATE"
- PVP_OVERWORLD: "PVP_OVERWORLD"
- PVP_NETHER: "PVP_NETHER"
- PVP_END: "PVP_END"
- REDSTONE: "REDSTONE"
- SPAWN_EGGS: "SPAWN_EGGS"
- SHEARING: "SHEARING"
- EGGS: "EGGS"
- TRADING: "TRADING"
- panel:
- title: "Island flags"
- flag-item:
- name-layout: "&a[name]"
- description-layout: |+
- &a[description]
-
- &7Allowed for: &f[rank]
- help-item:
- name: "&aNeed some help?"
- island:
- locked: "&cCette île est verrouillée!"
-
-language:
- panel-title: "Choisissez votre langue"
- selected: "&aActuellement sélectionné."
- edited: "&aLangue modifiée en &e[lang]&a."
\ No newline at end of file
diff --git a/src/main/resources/locales/jp-JP.yml b/src/main/resources/locales/jp-JP.yml
index 530015a77..406b137d2 100644
--- a/src/main/resources/locales/jp-JP.yml
+++ b/src/main/resources/locales/jp-JP.yml
@@ -22,7 +22,7 @@ general:
player-has-no-island: "&cあの選手には島がない!"
already-have-island: "&cあなたはすでに島を持っている!"
no-safe-location: "&cスタッフの方がとても親切でした。"
- not-leader: "&cあなたの島のリーダーではありません!"
+ not-owner: "&cあなたの島のリーダーではありません!"
not-in-team: "&cあの選手はあなたのチームにはいない!"
offline-player: "&cそのプレイヤーはオフラインまたは存在しません。"
unknown-player: "&c不明なプレイヤー!"
@@ -57,22 +57,22 @@ commands:
add:
parameters: "<リーダー> <プレーヤー>"
description: "リーダーのチームにプレイヤーを追加する"
- name-not-leader: "&c[name]はリーダーではありません"
+ name-not-owner: "&c[name]はリーダーではありません"
name-has-island: "&c[name]には島があります。登録を解除するか、最初に削除します。"
disband:
parameters: "<リーダー>"
description: "チームリーダーのチームを解散"
- user-disband-leader: "リーダーじゃない!解散を使用 [leader]"
+ use-disband-owner: "リーダーじゃない!解散を使用 [owner]"
disbanded: "管理者はあなたのチームを解散!"
kick:
parameters: "<プレーヤー>"
description: "チームからプレーヤーを蹴る"
- cannot-kick-leader: "&cチームリーダーを蹴ることはできません。キックのメンバーは、まず"
+ cannot-kick-owner: "&cチームリーダーを蹴ることはできません。キックのメンバーは、まず"
admin-kicked: "管理者は、チームからあなたを蹴った。"
- makeleader:
+ setowner:
parameters: "<プレーヤー>"
description: "プレーヤーをチームのリーダーにする"
- already-leader: "&cプレイヤーはすでにリーダーです!"
+ already-owner: "&cプレイヤーはすでにリーダーです!"
range:
description: "管理島の範囲コマンド"
display:
@@ -168,7 +168,7 @@ commands:
delete:
parameters: ""
description: "プレイヤーの島を削除します。"
- cannot-delete-team-leader: "&cすべての島のメンバーは、それを削除する前に島から追い出される必要があります。"
+ cannot-delete-owner: "&cすべての島のメンバーは、それを削除する前に島から追い出される必要があります。"
deleted-island: "&2[xyz] の島は正常に削除されました。"
bentobox:
description: "BentoBox管理コマンド"
@@ -291,7 +291,7 @@ commands:
kick:
description: "島からメンバーを削除する"
parameters: "<プレーヤー>"
- leader-kicked: "リーダーが島からあなたを削除しました!"
+ owner-kicked: "リーダーが島からあなたを削除しました!"
cannot-kick: "自分を削除することはできません!"
demote:
description: "ランクダウンあなたの島のプレーヤーを降格"
diff --git a/src/main/resources/locales/pl-PL.yml b/src/main/resources/locales/pl-PL.yml
index cd9662710..ccd4c6ee7 100644
--- a/src/main/resources/locales/pl-PL.yml
+++ b/src/main/resources/locales/pl-PL.yml
@@ -26,7 +26,7 @@ general:
player-has-no-island: "&cTen gracz nie ma wyspy!"
already-have-island: "&cMasz już wyspę!"
no-safe-location: "&cNa wyspie nie znaleziono bezpiecznej lokalizacji!"
- not-leader: "&cNie jesteś liderem swojej wyspy!"
+ not-owner: "&cNie jesteś liderem swojej wyspy!"
not-in-team: "&cTen gracz nie jest w twojej drużynie."
offline-player: "&cTen gracz jest offline lub nie istnieje."
unknown-player: "&cNieznany gracz!"
@@ -55,22 +55,22 @@ commands:
add:
parameters: " "
description: "dodaj gracza do drużyny lidera"
- name-not-leader: "&c[name] nie jest liderem"
+ name-not-owner: "&c[name] nie jest liderem"
name-has-island: "&c[name] ma wyspę. Najpierw musi ją wyrejestrować lub usunąć."
disband:
parameters: ""
description: "rozwiąż drużynę lidera wyspy"
- user-disband-leader: "&cNie jesteś liderem! Użyj disband [leader]"
+ use-disband-owner: "&cNie jesteś liderem! Użyj disband [owner]"
disbanded: "&cAdministrator rozwiązał Twoją drużyne!"
kick:
parameters: ""
description: "wyrzuć gracza z drużyny"
- cannot-kick-leader: "&cNie możesz wyrzucić lidera drużyny. Najpierw wyrzuć członków."
+ cannot-kick-owner: "&cNie możesz wyrzucić lidera drużyny. Najpierw wyrzuć członków."
admin-kicked: "&cAdministrator wyrzucił Cię z drużyny."
- makeleader:
+ setowner:
parameters: ""
description: "uczyń gracza liderem wyspy"
- already-leader: "&cGracz jest już liderem!"
+ already-owner: "&cGracz jest już liderem!"
register:
parameters: ""
description: "zarejestruj gracza na niezamieszkanej wyspie, na której jesteś"
@@ -215,7 +215,7 @@ commands:
kick:
description: "wyrzuć gracza z swojej wyspy"
parameters: ""
- leader-kicked: "&cLider wyrzucił Cię z jego wyspy."
+ owner-kicked: "&cLider wyrzucił Cię z jego wyspy."
cannot-kick: "&cNie możesz wyrzucić samego siebie."
demote:
description: "degraduj gracza na swojej wyspie do roli"
diff --git a/src/main/resources/locales/vi-VN.yml b/src/main/resources/locales/vi-VN.yml
index 95a5be326..bec016b5f 100644
--- a/src/main/resources/locales/vi-VN.yml
+++ b/src/main/resources/locales/vi-VN.yml
@@ -23,7 +23,7 @@ general:
player-has-no-island: "&cNgười chơi đó không có đảo!"
already-have-island: "&cBạn đã có đảo!"
no-safe-location: "&cKhông có địa điểm an toàn nào trên đảo!"
- not-leader: "&cBạn không phải đội trưởng!"
+ not-owner: "&cBạn không phải đội trưởng!"
not-in-team: "&cNgười chơi không có trong đội!"
offline-player: "&cNgười chơi đang offline hoặc không tồn tại."
unknown-player: "&cNgười chơi không tìm thấy!"
@@ -129,7 +129,7 @@ commands:
description: "loại bỏ 1 người chơi khỏi đảo"
parameters: ""
type-again: "&cHãy đánh lệnh loại bỏ 1 lần nữa để xác nhận"
- leader-kicked: "&cĐội trưởng đã đuổi bạn ra khỏi đội!"
+ owner-kicked: "&cĐội trưởng đã đuổi bạn ra khỏi đội!"
demote:
description: "hạ cấp bậc người chơi"
parameters: ""
diff --git a/src/main/resources/locales/zh-CN.yml b/src/main/resources/locales/zh-CN.yml
index 39b822119..f0a8c6ce5 100644
--- a/src/main/resources/locales/zh-CN.yml
+++ b/src/main/resources/locales/zh-CN.yml
@@ -21,7 +21,7 @@ general:
player-has-no-island: "&c该玩家没有岛屿!"
already-have-island: "&c您已经有岛屿了!"
no-safe-location: "&c岛上没有安全位置!"
- not-leader: "&c您不是您的岛上的队长!"
+ not-owner: "&c您不是您的岛上的队长!"
not-in-team: "&c该玩家不是您的队员!"
offline-player: "&c该玩家不在线或不存在。"
unknown-player: "&c[name] 是未知玩家!"
@@ -54,19 +54,19 @@ commands:
description: "清空所有玩家在这个世界的重制次数"
team:
add:
- parameters: " "
+ parameters: " "
description: "将玩家添加到队长的队伍中"
- name-not-leader: "&c[name] 不是队长"
+ name-not-owner: "&c[name] 不是队长"
name-has-island: "&c[name] 已经有岛屿了。请先注销或删除它们!"
disband:
- parameters: ""
+ parameters: ""
description: "解散队长的队伍"
- user-disband-leader: "&c不是队长!请用 disband [leader]"
+ use-disband-owner: "&c不是队长!请用 disband [owner]"
disbanded: "&c管理员解散了您的队伍!"
kick:
parameters: ""
description: "从队伍中踢走玩家"
- cannot-kick-leader: "&c您不能踢走队长。请先踢走成员"
+ cannot-kick-owner: "&c您不能踢走队长。请先踢走成员"
admin-kicked: "&c管理员将您从队伍中踢了出来。"
setowner:
parameters: ""
@@ -188,7 +188,7 @@ commands:
delete:
parameters: ""
description: "删除玩家的岛屿"
- cannot-delete-team-leader: "&c删除之前必须将所有岛屿成员都踢出岛屿。"
+ cannot-delete-owner: "&c删除之前必须将所有岛屿成员都踢出岛屿。"
deleted-island: "&a位于 &e[xyz] &a的岛屿已经被成功删除。"
why:
parameters: ""
@@ -323,7 +323,7 @@ commands:
kick:
description: "从您的岛屿踢出成员"
parameters: ""
- leader-kicked: "&c队长将您踢出岛屿!"
+ owner-kicked: "&c队长将您踢出岛屿!"
cannot-kick: "&c您不能把自己踢出去!"
demote:
description: "将您岛屿上的玩家降阶"
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommandTest.java
index 5343b1e96..22c9a212f 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/admin/AdminDeleteCommandTest.java
@@ -36,7 +36,6 @@ import world.bentobox.bentobox.managers.IslandsManager;
import world.bentobox.bentobox.managers.LocalesManager;
import world.bentobox.bentobox.managers.PlayersManager;
-
/**
* @author tastybento
*
@@ -162,14 +161,14 @@ public class AdminDeleteCommandTest {
* Test method for {@link AdminDeleteCommand#execute(User, String, java.util.List)
*/
@Test
- public void testExecuteTeamLeader() {
+ public void testExecuteOwner() {
when(im.inTeam(Mockito.any(),Mockito.any())).thenReturn(true);
when(im.getOwner(Mockito.any(), Mockito.any())).thenReturn(notUUID);
String[] name = {"tastybento"};
when(pm.getUUID(Mockito.any())).thenReturn(notUUID);
AdminDeleteCommand itl = new AdminDeleteCommand(ac);
assertFalse(itl.execute(user, itl.getLabel(), Arrays.asList(name)));
- Mockito.verify(user).sendMessage("commands.admin.delete.cannot-delete-team-leader");
+ Mockito.verify(user).sendMessage("commands.admin.delete.cannot-delete-owner");
}
/**
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamAddCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamAddCommandTest.java
index 89c8b751a..1a1cf8b6d 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamAddCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamAddCommandTest.java
@@ -139,7 +139,7 @@ public class AdminTeamAddCommandTest {
AdminTeamAddCommand itl = new AdminTeamAddCommand(ac);
String[] name = {"tastybento", "poslovich"};
- // Unknown leader
+ // Unknown owner
when(pm.getUUID(Mockito.eq("tastybento"))).thenReturn(null);
when(pm.getUUID(Mockito.eq("poslovich"))).thenReturn(notUUID);
assertFalse(itl.execute(user, ac.getLabel(), Arrays.asList(name)));
@@ -193,14 +193,14 @@ public class AdminTeamAddCommandTest {
* Test method for {@link AdminTeamAddCommand#execute(User, String, List)}.
*/
@Test
- public void testExecuteAddNotLeader() {
+ public void testExecuteAddNotOwner() {
AdminTeamAddCommand itl = new AdminTeamAddCommand(ac);
String[] name = {"tastybento", "poslovich"};
when(pm.getUUID(Mockito.eq("tastybento"))).thenReturn(uuid);
when(pm.getUUID(Mockito.eq("poslovich"))).thenReturn(notUUID);
- // Has island, has team, but not a leader
+ // Has island, has team, but not an owner
when(im.hasIsland(Mockito.any(),Mockito.eq(uuid))).thenReturn(true);
when(im.inTeam(Mockito.any(),Mockito.eq(uuid))).thenReturn(true);
when(im.getOwner(Mockito.any(),Mockito.eq(uuid))).thenReturn(notUUID);
@@ -210,7 +210,7 @@ public class AdminTeamAddCommandTest {
when(im.getIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(island);
assertFalse(itl.execute(user, itl.getLabel(), Arrays.asList(name)));
- Mockito.verify(user).sendMessage("commands.admin.team.add.name-not-leader", "[name]", "tastybento");
+ Mockito.verify(user).sendMessage("commands.admin.team.add.name-not-owner", "[name]", "tastybento");
Mockito.verify(island).showMembers(Mockito.eq(plugin), Mockito.any(), Mockito.any());
}
@@ -225,7 +225,7 @@ public class AdminTeamAddCommandTest {
when(pm.getUUID(Mockito.eq("tastybento"))).thenReturn(uuid);
when(pm.getUUID(Mockito.eq("poslovich"))).thenReturn(notUUID);
- // Has island, has team, is leader
+ // Has island, has team, is owner
when(im.hasIsland(Mockito.any(),Mockito.eq(uuid))).thenReturn(true);
when(im.inTeam(Mockito.any(),Mockito.eq(uuid))).thenReturn(true);
when(im.getOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(uuid);
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamDisbandCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamDisbandCommandTest.java
index b2fa62a80..2e2100cd5 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamDisbandCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamDisbandCommandTest.java
@@ -151,7 +151,7 @@ public class AdminTeamDisbandCommandTest {
* Test method for {@link AdminTeamDisbandCommand#execute(User, String, List)}.
*/
@Test
- public void testExecuteDisbandNotLeader() {
+ public void testExecuteDisbandNotOwner() {
when(im.inTeam(Mockito.any(), Mockito.any())).thenReturn(true);
Island is = mock(Island.class);
when(im.getIsland(Mockito.any(), Mockito.any(UUID.class))).thenReturn(is);
@@ -159,11 +159,11 @@ public class AdminTeamDisbandCommandTest {
when(pm.getUUID(Mockito.any())).thenReturn(notUUID);
when(im.getOwner(Mockito.any(), Mockito.eq(notUUID))).thenReturn(uuid);
- when(pm.getName(Mockito.any())).thenReturn("leader");
+ when(pm.getName(Mockito.any())).thenReturn("owner");
AdminTeamDisbandCommand itl = new AdminTeamDisbandCommand(ac);
assertFalse(itl.execute(user, itl.getLabel(), Arrays.asList(name)));
- Mockito.verify(user).sendMessage("commands.admin.team.disband.use-disband-leader", "[leader]", "leader");
+ Mockito.verify(user).sendMessage("commands.admin.team.disband.use-disband-owner", "[owner]", "owner");
}
/**
@@ -176,7 +176,7 @@ public class AdminTeamDisbandCommandTest {
when(im.getIsland(Mockito.any(), Mockito.any(UUID.class))).thenReturn(is);
String[] name = {"tastybento"};
when(pm.getUUID(Mockito.any())).thenReturn(notUUID);
- // Leader
+ // Owner
when(im.getOwner(Mockito.any(), Mockito.eq(notUUID))).thenReturn(notUUID);
// Members
Set members = new HashSet<>();
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamKickCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamKickCommandTest.java
index 8ed0657bf..5d96fc5e7 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamKickCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamKickCommandTest.java
@@ -154,7 +154,7 @@ public class AdminTeamKickCommandTest {
* Test method for {@link AdminTeamKickCommand#execute(User, String, List)} .
*/
@Test
- public void testExecuteKickLeader() {
+ public void testExecuteKickOwner() {
when(im.inTeam(Mockito.any(), Mockito.any())).thenReturn(true);
Island is = mock(Island.class);
when(im.getIsland(Mockito.any(), Mockito.any(UUID.class))).thenReturn(is);
@@ -165,7 +165,7 @@ public class AdminTeamKickCommandTest {
AdminTeamKickCommand itl = new AdminTeamKickCommand(ac);
assertFalse(itl.execute(user, itl.getLabel(), Arrays.asList(name)));
- Mockito.verify(user).sendMessage(Mockito.eq("commands.admin.team.kick.cannot-kick-leader"));
+ Mockito.verify(user).sendMessage(Mockito.eq("commands.admin.team.kick.cannot-kick-owner"));
Mockito.verify(is).showMembers(Mockito.any(), Mockito.any(), Mockito.any());
}
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamSetownerCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamSetownerCommandTest.java
index 7f7d1bb2a..014f997ec 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamSetownerCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/admin/team/AdminTeamSetownerCommandTest.java
@@ -152,7 +152,7 @@ public class AdminTeamSetownerCommandTest {
* Test method for {@link AdminTeamSetownerCommand#execute(User, String, List)}.
*/
@Test
- public void testExecuteMakeLeaderAlreadyLeader() {
+ public void testExecuteMakeOwnerAlreadyOwner() {
when(im.inTeam(Mockito.any(), Mockito.any())).thenReturn(true);
Island is = mock(Island.class);
when(im.getIsland(Mockito.any(), Mockito.any(UUID.class))).thenReturn(is);
@@ -176,7 +176,7 @@ public class AdminTeamSetownerCommandTest {
when(im.getIsland(Mockito.any(), Mockito.any(UUID.class))).thenReturn(is);
String[] name = {"tastybento"};
when(pm.getUUID(Mockito.any())).thenReturn(notUUID);
- // Leader
+ // Owner
when(im.getOwner(Mockito.any(), Mockito.eq(notUUID))).thenReturn(uuid);
when(pm.getName(Mockito.eq(uuid))).thenReturn("owner");
// Members
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandBanCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandBanCommandTest.java
index e4a96de99..80d68ee20 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandBanCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandBanCommandTest.java
@@ -131,7 +131,7 @@ public class IslandBanCommandTest {
// *** Error conditions ***
// Ban without an island
- // Ban as not a team leader
+ // Ban as not an owner
// Ban unknown user
// Ban self
// Ban team mate
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandResetCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandResetCommandTest.java
index 82a9bb7df..ac8410970 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandResetCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandResetCommandTest.java
@@ -122,10 +122,9 @@ public class IslandResetCommandTest {
/**
* Test method for .
- * @throws IOException
*/
@Test
- public void testNoIsland() throws IOException {
+ public void testNoIsland() {
IslandResetCommand irc = new IslandResetCommand(ic);
// Test the reset command
// Does not have island
@@ -134,18 +133,18 @@ public class IslandResetCommandTest {
}
@Test
- public void testNotLeader() throws IOException {
+ public void testNotOwner() {
IslandResetCommand irc = new IslandResetCommand(ic);
- // Now has island, but is not the leader
+ // Now has island, but is not the owner
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
assertFalse(irc.execute(user, irc.getLabel(), new ArrayList<>()));
- Mockito.verify(user).sendMessage("general.errors.not-leader");
+ Mockito.verify(user).sendMessage("general.errors.not-owner");
}
@Test
- public void testHasTeam() throws IOException {
+ public void testHasTeam() {
IslandResetCommand irc = new IslandResetCommand(ic);
- // Now has island, but is not the leader
+ // Now has island, but is not the owner
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
// Now is owner, but still has team
when(im.isOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
@@ -154,9 +153,9 @@ public class IslandResetCommandTest {
}
@Test
- public void testNoResetsLeft() throws IOException {
+ public void testNoResetsLeft() {
IslandResetCommand irc = new IslandResetCommand(ic);
- // Now has island, but is not the leader
+ // Now has island, but is not the owner
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
// Now is owner, but still has team
when(im.isOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
@@ -173,7 +172,7 @@ public class IslandResetCommandTest {
@Test
public void testNoConfirmationRequired() throws IOException {
IslandResetCommand irc = new IslandResetCommand(ic);
- // Now has island, but is not the leader
+ // Now has island, but is not the owner
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
// Now is owner, but still has team
when(im.isOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
@@ -207,7 +206,7 @@ public class IslandResetCommandTest {
@Test
public void testUnlimitedResets() throws IOException {
IslandResetCommand irc = new IslandResetCommand(ic);
- // Now has island, but is not the leader
+ // Now has island, but is not the owner
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
// Now is owner, but still has team
when(im.isOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
@@ -244,7 +243,7 @@ public class IslandResetCommandTest {
@Test
public void testConfirmationRequired() throws IOException {
IslandResetCommand irc = new IslandResetCommand(ic);
- // Now has island, but is not the leader
+ // Now has island, but is not the owner
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
// Now is owner, but still has team
when(im.isOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
@@ -285,7 +284,7 @@ public class IslandResetCommandTest {
@Test
public void testNewIslandError() throws IOException {
IslandResetCommand irc = new IslandResetCommand(ic);
- // Now has island, but is not the leader
+ // Now has island, but is not the owner
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
// Now is owner, but still has team
when(im.isOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(true);
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandUnbanCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandUnbanCommandTest.java
index 66f14c93f..8781e28fa 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandUnbanCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandUnbanCommandTest.java
@@ -128,7 +128,7 @@ public class IslandUnbanCommandTest {
// *** Error conditions ***
// Unban without an island
- // Unban as not a team leader
+ // Unban as not an owner
// Unban unknown user
// Unban self
// Unban someone not banned
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommandTest.java
index f17bac624..7237c978f 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommandTest.java
@@ -1,6 +1,3 @@
-/**
- *
- */
package world.bentobox.bentobox.api.commands.island.team;
import static org.junit.Assert.assertFalse;
@@ -42,7 +39,6 @@ import world.bentobox.bentobox.managers.PlayersManager;
/**
* @author tastybento
- *
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({Bukkit.class, BentoBox.class, User.class })
@@ -142,11 +138,11 @@ public class IslandTeamKickCommandTest {
* Test method for .
*/
@Test
- public void testExecuteNotTeamLeader() {
+ public void testExecuteNotTeamOwner() {
when(im.getOwner(Mockito.any(), Mockito.any())).thenReturn(notUUID);
IslandTeamKickCommand itl = new IslandTeamKickCommand(ic);
assertFalse(itl.execute(user, itl.getLabel(), new ArrayList<>()));
- Mockito.verify(user).sendMessage(Mockito.eq("general.errors.not-leader"));
+ Mockito.verify(user).sendMessage(Mockito.eq("general.errors.not-owner"));
}
/**
diff --git a/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamLeaveCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamLeaveCommandTest.java
index 6388bc620..5fc388c2b 100644
--- a/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamLeaveCommandTest.java
+++ b/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamLeaveCommandTest.java
@@ -1,6 +1,3 @@
-/**
- *
- */
package world.bentobox.bentobox.api.commands.island.team;
import static org.junit.Assert.assertFalse;
@@ -119,7 +116,7 @@ public class IslandTeamLeaveCommandTest {
* Test method for .
*/
@Test
- public void testExecuteInTeamLeader() {
+ public void testExecuteInOwner() {
IslandTeamLeaveCommand itl = new IslandTeamLeaveCommand(ic);
assertFalse(itl.execute(user, itl.getLabel(), new ArrayList<>()));
Mockito.verify(user).sendMessage(Mockito.eq("commands.island.team.leave.cannot-leave"));
@@ -133,7 +130,7 @@ public class IslandTeamLeaveCommandTest {
when(s.isLeaveConfirmation()).thenReturn(false);
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(false);
when(im.isOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(false);
- // Add a team leader - null
+ // Add a team owner - null
when(im.getOwner(Mockito.any(), Mockito.any())).thenReturn(null);
IslandTeamLeaveCommand itl = new IslandTeamLeaveCommand(ic);
@@ -152,7 +149,7 @@ public class IslandTeamLeaveCommandTest {
when(s.getConfirmationTime()).thenReturn(3);
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(false);
when(im.isOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(false);
- // Add a team leader - null
+ // Add a team owner - null
when(im.getOwner(Mockito.any(), Mockito.any())).thenReturn(null);
IslandTeamLeaveCommand itl = new IslandTeamLeaveCommand(ic);
@@ -169,7 +166,7 @@ public class IslandTeamLeaveCommandTest {
when(s.isLeaveConfirmation()).thenReturn(false);
when(im.hasIsland(Mockito.any(), Mockito.eq(uuid))).thenReturn(false);
when(im.isOwner(Mockito.any(), Mockito.eq(uuid))).thenReturn(false);
- // Add a team leader - null
+ // Add a team owner - null
when(im.getOwner(Mockito.any(), Mockito.any())).thenReturn(null);
// Require resets
diff --git a/src/test/java/world/bentobox/bentobox/managers/island/IslandCacheTest.java b/src/test/java/world/bentobox/bentobox/managers/island/IslandCacheTest.java
index 3465b70a5..c33800275 100644
--- a/src/test/java/world/bentobox/bentobox/managers/island/IslandCacheTest.java
+++ b/src/test/java/world/bentobox/bentobox/managers/island/IslandCacheTest.java
@@ -42,7 +42,6 @@ public class IslandCacheTest {
UUID owner = UUID.randomUUID();
Location location;
-
@Before
public void setUp() throws Exception {
plugin = mock(BentoBox.class);
@@ -205,7 +204,7 @@ public class IslandCacheTest {
}
*/
@Test
- public void testgetMembers() {
+ public void testGetMembers() {
// New cache
IslandCache ic = new IslandCache();
ic.addIsland(island);
@@ -217,7 +216,7 @@ public class IslandCacheTest {
}
@Test
- public void testGetTeamLeader() {
+ public void testGetOwner() {
// New cache
IslandCache ic = new IslandCache();
ic.addIsland(island);
@@ -225,8 +224,6 @@ public class IslandCacheTest {
assertEquals(owner, ic.getOwner(world, owner));
assertNull(ic.getOwner(world, null));
assertNull(ic.getOwner(world, UUID.randomUUID()));
-
-
}
@Test