diff options
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java')
| -rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java deleted file mode 100644 index 18e3703..0000000 --- a/src/main/java/net/tylermurphy/hideAndSeek/commands/SetSpawnLocation.java +++ /dev/null @@ -1,53 +0,0 @@ -package net.tylermurphy.hideAndSeek.commands; - -import static net.tylermurphy.hideAndSeek.Store.*; - -import java.util.HashMap; -import java.util.Map; - -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.util.Vector; - -import net.tylermurphy.hideAndSeek.util.ICommand; - -public class SetSpawnLocation implements ICommand { - - public void execute(CommandSender sender, String[] args) { - Vector newSpawnPosition = new Vector(); - Player player = (Player) sender; - newSpawnPosition.setX(player.getLocation().getBlockX()); - newSpawnPosition.setY(player.getLocation().getBlockY()); - newSpawnPosition.setZ(player.getLocation().getBlockZ()); - if(!status.equals("Standby")) { - sender.sendMessage(errorPrefix + "Game is currently in session"); - return; - } - if(worldborderEnabled && spawnPosition.distance(worldborderPosition) > 100) { - sender.sendMessage(errorPrefix + "Spawn position must be 100 from worldborder center"); - return; - } - spawnPosition = newSpawnPosition; - sender.sendMessage(messagePrefix + "Set spawn position to current location"); - Map<String, Object> temp = new HashMap<String,Object>(); - temp.put("x", spawnPosition.getX()); - temp.put("y", spawnPosition.getY()); - temp.put("z", spawnPosition.getZ()); - temp.put("world", player.getLocation().getWorld().getName()); - addToSection("spawn",temp); - saveConfig(); - } - - public String getLabel() { - return "setspawn"; - } - - public String getUsage() { - return ""; - } - - public String getDescription() { - return "Sets hide and seeks spawn location to current position"; - } - -} |