mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-06 07:21:52 +01:00
Minor code smells and code format fixes
This commit is contained in:
parent
bfe059f191
commit
ac4611e66f
@ -35,7 +35,6 @@ public class IslandGoCommand extends CompositeCommand {
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
|
||||
if (getIslands().getIsland(getWorld(), user.getUniqueId()) == null) {
|
||||
user.sendMessage(ChatColor.RED + "general.errors.no-island");
|
||||
return false;
|
||||
@ -43,7 +42,7 @@ public class IslandGoCommand extends CompositeCommand {
|
||||
if (!args.isEmpty() && NumberUtils.isDigits(args.get(0))) {
|
||||
int homeValue = Integer.valueOf(args.get(0));
|
||||
int maxHomes = Util.getPermValue(user.getPlayer(), "island.maxhomes", getIWM().getMaxHomes(getWorld()));
|
||||
if (homeValue > 1 && homeValue <= maxHomes) {
|
||||
if (homeValue > 1 && homeValue <= maxHomes) {
|
||||
getIslands().homeTeleport(getWorld(), user.getPlayer(), homeValue);
|
||||
user.sendMessage("commands.island.go.tip", TextVariables.LABEL, getTopLabel());
|
||||
return true;
|
||||
|
@ -43,7 +43,6 @@ public class SafeSpotTeleport {
|
||||
// Locations
|
||||
private Location bestSpot;
|
||||
|
||||
|
||||
private BSkyBlock plugin;
|
||||
private List<Pair<Integer, Integer>> chunksToScan;
|
||||
|
||||
@ -81,7 +80,6 @@ public class SafeSpotTeleport {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Get chunks to scan
|
||||
chunksToScan = getChunksToScan();
|
||||
|
||||
@ -124,7 +122,7 @@ public class SafeSpotTeleport {
|
||||
} else if (entity instanceof Player && !failureMessage.isEmpty()) {
|
||||
// Failed, no safe spot
|
||||
entity.sendMessage(failureMessage);
|
||||
if (entity instanceof Player && ((Player)entity).getGameMode().equals(GameMode.SPECTATOR)) {
|
||||
if (((Player)entity).getGameMode().equals(GameMode.SPECTATOR)) {
|
||||
if (plugin.getIWM().inWorld(entity.getLocation())) {
|
||||
((Player)entity).setGameMode(plugin.getIWM().getDefaultGameMode(entity.getWorld()));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user