diff options
author | Tyler Murphy <tylermurphy534@gmail.com> | 2021-08-24 18:09:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 18:09:31 -0400 |
commit | e45c39faf085a1dd517b92762581d3d8c2d2bbaf (patch) | |
tree | e73e8ad0eb3bb61cd358c2f93c65d65188c2e49c /src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java | |
parent | fixed keep inv and death messages (diff) | |
parent | refactoring, command restructure, bug fixes, glow rewrite (diff) | |
download | kenshinshideandseek-e45c39faf085a1dd517b92762581d3d8c2d2bbaf.tar.gz kenshinshideandseek-e45c39faf085a1dd517b92762581d3d8c2d2bbaf.tar.bz2 kenshinshideandseek-e45c39faf085a1dd517b92762581d3d8c2d2bbaf.zip |
Merge pull request #6 from tylermurphy534/dev
merge fix
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java')
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java b/src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java deleted file mode 100644 index 6c925e2..0000000 --- a/src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java +++ /dev/null @@ -1,49 +0,0 @@ -package net.tylermurphy.hideAndSeek.commands; - -import org.bukkit.command.CommandSender; - -import net.tylermurphy.hideAndSeek.ICommand; -import net.tylermurphy.hideAndSeek.manager.WorldborderManager; - -import static net.tylermurphy.hideAndSeek.Store.*; - -public class EnableBorder implements ICommand { - - public void execute(CommandSender sender, String[] args) { - if(!status.equals("Standby") && !status.equals("Setup")) { - sender.sendMessage(errorPrefix + "Game is currently in session"); - return; - } - if(worldborderPosition == null) { - sender.sendMessage(errorPrefix + "Please setup worldborder info before enabling"); - return; - } - boolean bool; - try { bool = Boolean.parseBoolean(args[0]); } catch (Exception e) { - sender.sendMessage(errorPrefix + "Please enter true or false"); - return; - } - if(spawnPosition != null && worldborderPosition != null && spawnPosition.distance(worldborderPosition) > 100) { - sender.sendMessage(errorPrefix + "Cannot enable worldborder, spawn position is outside 100 blocks from worldborder"); - return; - } - sender.sendMessage(messagePrefix + "Set worldborder to "+args[0]); - getConfig().set("borderEnabled", bool); - worldborderEnabled = bool; - saveConfig(); - WorldborderManager.reset(); - } - - public String getLabel() { - return "enableBorder"; - } - - public String getUsage() { - return "<true/false>"; - } - - public String getDescription() { - return "Enables or disables worldborder"; - } - -} |