summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-07-30 18:12:47 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-07-30 18:12:47 -0400
commit000219a5ff183e469129e5804d0a6090d6b47b26 (patch)
tree5217465c967796680cc03b11359490f638d6b78c /src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java
parentMerge branch 'main' of ssh://g.tylerm.dev:21/tylermurphy534/KenshinsHideAndSe... (diff)
downloadkenshinshideandseek-000219a5ff183e469129e5804d0a6090d6b47b26.tar.gz
kenshinshideandseek-000219a5ff183e469129e5804d0a6090d6b47b26.tar.bz2
kenshinshideandseek-000219a5ff183e469129e5804d0a6090d6b47b26.zip
1.7.5 rc4
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java b/src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java
deleted file mode 100644
index 5e4afb5..0000000
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package net.tylermurphy.hideAndSeek.command.location;
-
-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