diff options
author | bobby29831 <bobby29831@gmail.com> | 2022-05-13 12:01:31 -0500 |
---|---|---|
committer | bobby29831 <bobby29831@gmail.com> | 2022-05-13 12:01:31 -0500 |
commit | 2f4ca0d0f949f38f1d4c1512edeb9b32b80171f7 (patch) | |
tree | b2ee6a9f40f2b0bf997b933b75a220d728a2f354 /src/main/java/net/tylermurphy/hideAndSeek/command/SetSpawnLocation.java | |
parent | refactor: break apart over saturated EventListener.java (diff) | |
download | kenshinshideandseek-2f4ca0d0f949f38f1d4c1512edeb9b32b80171f7.tar.gz kenshinshideandseek-2f4ca0d0f949f38f1d4c1512edeb9b32b80171f7.tar.bz2 kenshinshideandseek-2f4ca0d0f949f38f1d4c1512edeb9b32b80171f7.zip |
refactor: general improvements, fix spacing inconsistencies
Diffstat (limited to '')
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/command/SetSpawnLocation.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/SetSpawnLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/command/SetSpawnLocation.java index 83e0145..6a9b572 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/command/SetSpawnLocation.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/SetSpawnLocation.java @@ -33,28 +33,28 @@ import static net.tylermurphy.hideAndSeek.configuration.Localization.message; public class SetSpawnLocation implements ICommand { public void execute(CommandSender sender, String[] args) { - if(Game.status != Status.STANDBY) { + if (Game.status != Status.STANDBY) { sender.sendMessage(errorPrefix + message("GAME_INPROGRESS")); return; } Vector newSpawnPosition = new Vector(); Player player = (Player) sender; - if(player.getLocation().getBlockX() == 0 || player.getLocation().getBlockZ() == 0 || player.getLocation().getBlockY() == 0){ + if (player.getLocation().getBlockX() == 0 || player.getLocation().getBlockZ() == 0 || player.getLocation().getBlockY() == 0) { sender.sendMessage(errorPrefix + message("NOT_AT_ZERO")); return; } newSpawnPosition.setX(player.getLocation().getBlockX()); newSpawnPosition.setY(player.getLocation().getBlockY()); newSpawnPosition.setZ(player.getLocation().getBlockZ()); - if(worldborderEnabled && newSpawnPosition.distance(worldborderPosition) > 100) { + if (worldborderEnabled && newSpawnPosition.distance(worldborderPosition) > 100) { sender.sendMessage(errorPrefix + message("WORLDBORDER_POSITION")); return; } World world = player.getLocation().getWorld(); - if(world == null){ + if (world == null) { throw new RuntimeException("Unable to get world: " + spawnWorld); } - if(mapSaveEnabled && !world.getName().equals(spawnWorld)){ + if (mapSaveEnabled && !world.getName().equals(spawnWorld)) { Game.worldLoader.unloadMap(); Game.worldLoader = new WorldLoader(world.getName()); } |