summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2021-08-27 17:20:07 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2021-08-27 17:20:07 -0400
commit0154a34f1dc240652908810314167a44638c847e (patch)
tree4f4e4a7dac2581ee8b32644cb30c3f852a1b8e8d /src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java
parent1.3.0 beta 2, bug fixes, added more block settings, added more config options (diff)
downloadkenshinshideandseek-0154a34f1dc240652908810314167a44638c847e.tar.gz
kenshinshideandseek-0154a34f1dc240652908810314167a44638c847e.tar.bz2
kenshinshideandseek-0154a34f1dc240652908810314167a44638c847e.zip
add world rollback and other stuff
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java
index 89b6baf..18e3703 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java
@@ -19,12 +19,15 @@ public class SetSpawnLocation implements ICommand {
newSpawnPosition.setX(player.getLocation().getBlockX());
newSpawnPosition.setY(player.getLocation().getBlockY());
newSpawnPosition.setZ(player.getLocation().getBlockZ());
+ if(!status.equals("Standby")) {
+ sender.sendMessage(errorPrefix + "Game is currently in session");
+ return;
+ }
if(worldborderEnabled && spawnPosition.distance(worldborderPosition) > 100) {
sender.sendMessage(errorPrefix + "Spawn position must be 100 from worldborder center");
return;
}
spawnPosition = newSpawnPosition;
- status = "Standby";
sender.sendMessage(messagePrefix + "Set spawn position to current location");
Map<String, Object> temp = new HashMap<String,Object>();
temp.put("x", spawnPosition.getX());