summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2021-08-23 13:57:50 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2021-08-23 13:57:50 -0400
commit93dd4cfcc4e89448eb69d00b9a55145121467aa5 (patch)
treee73e8ad0eb3bb61cd358c2f93c65d65188c2e49c /src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java
parentsevere give items bug fix (diff)
downloadkenshinshideandseek-93dd4cfcc4e89448eb69d00b9a55145121467aa5.tar.gz
kenshinshideandseek-93dd4cfcc4e89448eb69d00b9a55145121467aa5.tar.bz2
kenshinshideandseek-93dd4cfcc4e89448eb69d00b9a55145121467aa5.zip
refactoring, command restructure, bug fixes, glow rewrite
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/commands/EnableBorder.java49
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";
- }
-
-}