summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2022-05-06 12:22:04 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2022-05-06 12:22:04 -0400
commit134444243a491a5b22c2cc4219e8fdd361ce2693 (patch)
tree911f4e84daeb86db739cbd61dd8986bcb0eb5326 /src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
parentadd empty space to titles (diff)
downloadkenshinshideandseek-134444243a491a5b22c2cc4219e8fdd361ce2693.tar.gz
kenshinshideandseek-134444243a491a5b22c2cc4219e8fdd361ce2693.tar.bz2
kenshinshideandseek-134444243a491a5b22c2cc4219e8fdd361ce2693.zip
option to disable mapsave
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java b/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
index 74c29bf..14a5d6f 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
@@ -19,6 +19,7 @@
package net.tylermurphy.hideAndSeek.command;
+import net.tylermurphy.hideAndSeek.game.Game;
import org.bukkit.command.CommandSender;
import net.tylermurphy.hideAndSeek.Main;
@@ -51,10 +52,12 @@ public class Setup implements ICommand {
msg = msg + "\n" + message("SETUP_BOUNDS");
count++;
}
- File destenation = new File(Main.root+File.separator+"hideandseek_"+spawnWorld);
- if(!destenation.exists()) {
- msg = msg + "\n" + message("SETUP_SAVEMAP");
- count++;
+ 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) {
sender.sendMessage(messagePrefix + message("SETUP_COMPLETE"));