summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/location/util
diff options
context:
space:
mode:
authortylermurphy534 <tylermurphy534@gmail.com>2022-11-02 07:18:00 -0400
committertylermurphy534 <tylermurphy534@gmail.com>2022-11-02 07:18:00 -0400
commitbb254145ed0bb56d0482f6ba34e05cb728a7c8cc (patch)
tree9e2c645f417a1a1d77855e068b213fe4369fd056 /src/main/java/net/tylermurphy/hideAndSeek/command/location/util
parent1.7.0 beta 1 (diff)
downloadkenshinshideandseek-bb254145ed0bb56d0482f6ba34e05cb728a7c8cc.tar.gz
kenshinshideandseek-bb254145ed0bb56d0482f6ba34e05cb728a7c8cc.tar.bz2
kenshinshideandseek-bb254145ed0bb56d0482f6ba34e05cb728a7c8cc.zip
1.7.0 beta 2
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/location/util')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/location/util/LocationUtils.java53
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java26
2 files changed, 0 insertions, 79 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/LocationUtils.java b/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/LocationUtils.java
deleted file mode 100644
index 69d7c26..0000000
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/LocationUtils.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package net.tylermurphy.hideAndSeek.command.location.util;
-
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.configuration.Map;
-import net.tylermurphy.hideAndSeek.configuration.Maps;
-import net.tylermurphy.hideAndSeek.game.util.Status;
-import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
-
-import java.util.function.Consumer;
-
-import static net.tylermurphy.hideAndSeek.configuration.Config.*;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
-
-/**
- * @author bobby29831
- */
-public class LocationUtils {
-
- public static void setLocation(@NotNull Player player, @NotNull Locations place, String mapName, @NotNull Consumer<Map> consumer) {
-
- if (Main.getInstance().getGame().getStatus() != Status.STANDBY) {
- player.sendMessage(errorPrefix + message("GAME_INPROGRESS"));
- return;
- }
-
- if (player.getLocation().getBlockX() == 0 || player.getLocation().getBlockZ() == 0 || player.getLocation().getBlockY() == 0){
- player.sendMessage(errorPrefix + message("NOT_AT_ZERO"));
- return;
- }
-
- Map map = null;
- if(mapName != null) {
- map = Maps.getMap(mapName);
- if (map == null) {
- player.sendMessage(errorPrefix + message("INVALID_MAP"));
- return;
- }
- }
-
- try {
- consumer.accept(map);
- } catch (Exception e) {
- player.sendMessage(errorPrefix + e.getMessage());
- return;
- }
-
- if(map != null)
- Maps.setMap(mapName, map);
- player.sendMessage(messagePrefix + message(place.message()));
- }
-
-} \ No newline at end of file
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java b/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java
deleted file mode 100644
index 35f74ea..0000000
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package net.tylermurphy.hideAndSeek.command.location.util;
-
-/**
- * @author bobby29831
- */
-public enum Locations {
-
- GAME("spawns.game"),
- LOBBY("spawns.lobby"),
- EXIT("spawns.exit"),
- SEEKER("spawns.seeker");
-
- private final String path;
- Locations(String path) {
- this.path = path;
- }
-
- public String message() {
- return this + "_SPAWN";
- }
-
- public String path(String additive) {
- return path + "." + additive;
- }
-
-} \ No newline at end of file