From 177aaf1c24495f9e61121c518ebec024104816b2 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 10 Jul 2021 22:24:42 +0200 Subject: [PATCH] Add SWCommandUtils SteamWarUser tabcomplete --- SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java index e6e0ee4..64c735d 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java @@ -19,6 +19,7 @@ package de.steamwar.command; +import de.steamwar.sql.SteamwarUser; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.command.Command; @@ -69,6 +70,7 @@ public class SWCommandUtils { if (s.equals("a") || s.equals("adventure") || s.equals("2")) return GameMode.ADVENTURE; return null; }, s -> Arrays.asList("s", "survival", "0", "c", "creative", "1", "sp", "spectator", "3", "a", "adventure", "2"))); + MAPPER_FUNCTIONS.put(SteamwarUser.class.getTypeName(), createMapper(SteamwarUser::get, s -> Bukkit.getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList()))); } private static void addMapper(Class clazz, Class alternativeClazz, TypeMapper mapper) {