diff options
author | Tyler Murphy <tylermurphy534@gmail.com> | 2022-05-13 13:42:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 13:42:26 -0400 |
commit | 7d152668d753c611c2f1b553332e257283fadcd6 (patch) | |
tree | 3c8ae0fc7edfac96191d80a31d38e8afc57a6113 /src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java | |
parent | parallel change on master (diff) | |
parent | typos: fix typos in CONTRIBUTING.md (diff) | |
download | kenshinshideandseek-7d152668d753c611c2f1b553332e257283fadcd6.tar.gz kenshinshideandseek-7d152668d753c611c2f1b553332e257283fadcd6.tar.bz2 kenshinshideandseek-7d152668d753c611c2f1b553332e257283fadcd6.zip |
Merge pull request #53 from bobby29831/1.4.3
Implement better coding practices
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java')
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java b/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java index 14a5d6f..ec932d8 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java @@ -19,15 +19,14 @@ package net.tylermurphy.hideAndSeek.command; +import net.tylermurphy.hideAndSeek.Main; import net.tylermurphy.hideAndSeek.game.Game; import org.bukkit.command.CommandSender; -import net.tylermurphy.hideAndSeek.Main; +import java.io.File; import static net.tylermurphy.hideAndSeek.configuration.Config.*; - -import java.io.File; -import static net.tylermurphy.hideAndSeek.configuration.Localization.*; +import static net.tylermurphy.hideAndSeek.configuration.Localization.message; public class Setup implements ICommand { @@ -36,30 +35,30 @@ public class Setup implements ICommand { String msg = message("SETUP").toString(); int count = 0; - if(spawnPosition.getBlockX() == 0 && spawnPosition.getBlockY() == 0 && spawnPosition.getBlockZ() == 0) { + if (spawnPosition.getBlockX() == 0 && spawnPosition.getBlockY() == 0 && spawnPosition.getBlockZ() == 0) { msg = msg + "\n" + message("SETUP_GAME"); count++; } - if(lobbyPosition.getBlockX() == 0 && lobbyPosition.getBlockY() == 0 && lobbyPosition.getBlockZ() == 0) { + if (lobbyPosition.getBlockX() == 0 && lobbyPosition.getBlockY() == 0 && lobbyPosition.getBlockZ() == 0) { msg = msg + "\n" + message("SETUP_LOBBY"); count++; } - if(exitPosition.getBlockX() == 0 && exitPosition.getBlockY() == 0 && exitPosition.getBlockZ() == 0) { + if (exitPosition.getBlockX() == 0 && exitPosition.getBlockY() == 0 && exitPosition.getBlockZ() == 0) { msg = msg + "\n" + message("SETUP_EXIT"); count++; } - if(saveMinX == 0 || saveMinZ == 0 || saveMaxX == 0 || saveMaxZ == 0) { + if (saveMinX == 0 || saveMinZ == 0 || saveMaxX == 0 || saveMaxZ == 0) { msg = msg + "\n" + message("SETUP_BOUNDS"); count++; } - if(mapSaveEnabled) { + if (mapSaveEnabled) { File destenation = new File(Main.root + File.separator + Game.getGameWorld()); if (!destenation.exists()) { msg = msg + "\n" + message("SETUP_SAVEMAP"); count++; } } - if(count < 1) { + if (count < 1) { sender.sendMessage(messagePrefix + message("SETUP_COMPLETE")); } else { sender.sendMessage(msg); |