summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2021-10-17 22:52:57 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2021-10-17 22:52:57 -0400
commitd37ad3fc4500cf4d35db718bdaf964bad03840e4 (patch)
treeee3506b113bf347e64dfac50930b688eed781453 /src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java
parentfixed possible exception on player join (diff)
downloadkenshinshideandseek-d37ad3fc4500cf4d35db718bdaf964bad03840e4.tar.gz
kenshinshideandseek-d37ad3fc4500cf4d35db718bdaf964bad03840e4.tar.bz2
kenshinshideandseek-d37ad3fc4500cf4d35db718bdaf964bad03840e4.zip
lobby bug fixes, titles, game time
Diffstat (limited to '')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java b/src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java
index fd2eeac..149e9ac 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java
@@ -2,6 +2,7 @@ package net.tylermurphy.hideAndSeek.util;
import static net.tylermurphy.hideAndSeek.Store.*;
+import java.io.File;
import java.util.ArrayList;
import java.util.List;
@@ -137,7 +138,6 @@ public class Functions {
SeekerTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.FOR_OTHER_TEAMS);
else
SeekerTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.NEVER);
- SeekerTeam.setAllowFriendlyFire(false);
try { mainBoard.registerNewTeam("Hider");} catch(Exception e) {}
HiderTeam = mainBoard.getTeam("Hider");
@@ -146,13 +146,11 @@ public class Functions {
HiderTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.FOR_OWN_TEAM);
else
HiderTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.NEVER);
- HiderTeam.setAllowFriendlyFire(false);
try { mainBoard.registerNewTeam("Spectator");} catch(Exception e) {}
SpectatorTeam = mainBoard.getTeam("Spectator");
SpectatorTeam.setColor(ChatColor.GRAY);
SpectatorTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.NEVER);
- SpectatorTeam.setAllowFriendlyFire(false);
board = mainBoard;
}
@@ -166,5 +164,25 @@ public class Functions {
player.sendMessage(message);
}
}
+
+ public static boolean setup() {
+
+ if(spawnPosition.getBlockX() == 0 && spawnPosition.getBlockY() == 0 && spawnPosition.getBlockZ() == 0) {
+ return false;
+ }
+ if(lobbyPosition.getBlockX() == 0 && lobbyPosition.getBlockY() == 0 && lobbyPosition.getBlockZ() == 0) {
+ return false;
+ }
+ if(exitPosition.getBlockX() == 0 && exitPosition.getBlockY() == 0 && exitPosition.getBlockZ() == 0) {
+ return false;
+ }
+ File destenation = new File(Main.root+File.separator+"hideandseek_"+spawnWorld);
+ if(!destenation.exists()) {
+ return false;
+ }
+
+ return true;
+
+ }
} \ No newline at end of file