summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java
diff options
context:
space:
mode:
authortylermurphy534 <tylermurphy534@gmail.com>2022-10-30 21:40:59 -0400
committertylermurphy534 <tylermurphy534@gmail.com>2022-10-30 21:40:59 -0400
commit1325e042a6e7af37669bcd32e9d7a133f2ae22e6 (patch)
treee6703c90dcdbefac6954a1f2023b78892c0dc788 /src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java
parentstart adding multi map support (diff)
downloadkenshinshideandseek-1325e042a6e7af37669bcd32e9d7a133f2ae22e6.tar.gz
kenshinshideandseek-1325e042a6e7af37669bcd32e9d7a133f2ae22e6.tar.bz2
kenshinshideandseek-1325e042a6e7af37669bcd32e9d7a133f2ae22e6.zip
finish beta build of multi map support
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java
index 4eb5462..84e1109 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java
@@ -22,8 +22,12 @@ 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 net.tylermurphy.hideAndSeek.configuration.Maps;
import org.bukkit.entity.Player;
+import java.util.List;
+import java.util.stream.Collectors;
+
import static net.tylermurphy.hideAndSeek.configuration.Config.*;
public class SetLobbyLocation implements ICommand {
@@ -39,11 +43,18 @@ public class SetLobbyLocation implements ICommand {
}
public String getUsage() {
- return "";
+ return "<map>";
}
public String getDescription() {
return "Sets hide and seeks lobby location to current position";
}
+ public List<String> autoComplete(String parameter) {
+ if(parameter != null && parameter.equals("map")) {
+ return Maps.getAllMaps().stream().map(net.tylermurphy.hideAndSeek.configuration.Map::getName).collect(Collectors.toList());
+ }
+ return null;
+ }
+
}