diff options
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/location')
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/command/location/SetSeekerLobbyLocation.java | 31 | ||||
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java | 3 |
2 files changed, 33 insertions, 1 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetSeekerLobbyLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetSeekerLobbyLocation.java new file mode 100644 index 0000000..c6c3ccb --- /dev/null +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetSeekerLobbyLocation.java @@ -0,0 +1,31 @@ +package net.tylermurphy.hideAndSeek.command.location; + +import net.tylermurphy.hideAndSeek.command.ICommand; +import net.tylermurphy.hideAndSeek.command.location.util.LocationUtils; +import net.tylermurphy.hideAndSeek.command.location.util.Locations; +import org.bukkit.entity.Player; + +import static net.tylermurphy.hideAndSeek.configuration.Config.*; + +public class SetSeekerLobbyLocation implements ICommand { + + public void execute(Player sender, String[] args) { + LocationUtils.setLocation(sender, Locations.SEEKER, vector -> { + seekerLobbyWorld = sender.getLocation().getWorld().getName(); + seekerLobbyPosition = vector; + }); + } + + public String getLabel() { + return "setseekerlobby"; + } + + public String getUsage() { + return ""; + } + + public String getDescription() { + return "Sets hide and seeks seeker lobby location to current position"; + } + +} 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 index 137bc69..35f74ea 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java @@ -7,7 +7,8 @@ public enum Locations { GAME("spawns.game"), LOBBY("spawns.lobby"), - EXIT("spawns.exit"); + EXIT("spawns.exit"), + SEEKER("spawns.seeker"); private final String path; Locations(String path) { |