diff --git a/src/main/java/us/tastybento/bskyblock/api/commands/User.java b/src/main/java/us/tastybento/bskyblock/api/commands/User.java index e1e3fe567..88c0ea322 100644 --- a/src/main/java/us/tastybento/bskyblock/api/commands/User.java +++ b/src/main/java/us/tastybento/bskyblock/api/commands/User.java @@ -72,12 +72,12 @@ public class User { users.remove(player.getUniqueId()); } - private final Player player; - - private final UUID playerUUID; + // ---------------------------------------------------- private final BSkyBlock plugin = BSkyBlock.getInstance(); + private final Player player; + private final UUID playerUUID; private final CommandSender sender; private User(CommandSender sender) { @@ -139,7 +139,7 @@ public class User { * @return true if permission is empty or if the player has that permission */ public boolean hasPermission(String permission) { - return permission.isEmpty() ? true : sender.hasPermission(permission); + return permission.isEmpty() || sender.hasPermission(permission); } public boolean isOnline() { @@ -159,7 +159,7 @@ public class User { public String getTranslation(String reference, String... variables) { String translation = plugin.getLocalesManager().get(this, reference); if (variables.length > 1) { - for (int i = 0; i < variables.length; i+=2) { + for (int i = 0; i < variables.length; i += 2) { translation = translation.replace(variables[i], variables[i+1]); } } diff --git a/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java b/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java index c566b6cd9..73fb1c2e9 100644 --- a/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java +++ b/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java @@ -468,8 +468,7 @@ public class IslandBuilder { // Place a helpful sign in front of player placeSign(x, islandHeight + 5, z + 3); // Place the chest - no need to use the safe spawn function - // because we - // know what this island looks like + // because we know what this island looks like placeChest(x, islandHeight + 5, z + 1); } @@ -479,7 +478,7 @@ public class IslandBuilder { if (this.playerUUID != null) { Sign sign = (Sign) blockToChange.getState(); User user = User.getInstance(playerUUID); - for (int i=0; i<4; i++) { + for (int i = 0; i < 4; i++) { sign.setLine(i, user.getTranslation("island.sign.line" + i, "[player]", playerName)); } ((org.bukkit.material.Sign) sign.getData()).setFacingDirection(BlockFace.NORTH);