From 134444243a491a5b22c2cc4219e8fdd361ce2693 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Fri, 6 May 2022 12:22:04 -0400 Subject: option to disable mapsave --- src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java') 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")); -- cgit v1.2.3-freya