From 1325e042a6e7af37669bcd32e9d7a133f2ae22e6 Mon Sep 17 00:00:00 2001 From: tylermurphy534 Date: Sun, 30 Oct 2022 21:40:59 -0400 Subject: finish beta build of multi map support --- .../java/net/tylermurphy/hideAndSeek/command/SaveMap.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/SaveMap.java') diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/SaveMap.java b/src/main/java/net/tylermurphy/hideAndSeek/command/SaveMap.java index 4758666..ca2532c 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/command/SaveMap.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/SaveMap.java @@ -27,6 +27,9 @@ import org.bukkit.World; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; +import java.util.List; +import java.util.stream.Collectors; + import static net.tylermurphy.hideAndSeek.configuration.Config.*; import static net.tylermurphy.hideAndSeek.configuration.Localization.message; @@ -82,5 +85,12 @@ public class SaveMap implements ICommand { public String getDescription() { return "Saves current map for the game. May lag server."; } - + + public List 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; + } + } -- cgit v1.2.3-freya