summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2022-05-13 13:42:26 -0400
committerGitHub <noreply@github.com>2022-05-13 13:42:26 -0400
commit7d152668d753c611c2f1b553332e257283fadcd6 (patch)
tree3c8ae0fc7edfac96191d80a31d38e8afc57a6113 /src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java
parentparallel change on master (diff)
parenttypos: fix typos in CONTRIBUTING.md (diff)
downloadkenshinshideandseek-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/SetLobbyLocation.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java
index 69e5e52..a9351fd 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java
@@ -19,8 +19,6 @@
package net.tylermurphy.hideAndSeek.command;
-import static net.tylermurphy.hideAndSeek.configuration.Config.*;
-
import net.tylermurphy.hideAndSeek.game.Game;
import net.tylermurphy.hideAndSeek.util.Status;
import org.bukkit.World;
@@ -28,18 +26,19 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.*;
+import static net.tylermurphy.hideAndSeek.configuration.Config.*;
+import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
public class SetLobbyLocation 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 newLobbyPosition = 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;
}
@@ -47,7 +46,7 @@ public class SetLobbyLocation implements ICommand {
newLobbyPosition.setY(player.getLocation().getBlockY());
newLobbyPosition.setZ(player.getLocation().getBlockZ());
World world = player.getLocation().getWorld();
- if(world == null){
+ if (world == null) {
throw new RuntimeException("Unable to get world: " + spawnWorld);
}
lobbyWorld = world.getName();