From b02177e1d0c91b82abdc23f00cd27ca6ae62d5ad Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Fri, 2 Apr 2021 23:20:39 +0200 Subject: [PATCH] Add tab completion for gamemode flag --- .../core/plot/flag/implementations/GamemodeFlag.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GamemodeFlag.java b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GamemodeFlag.java index 52fd4dfa6..a1a0d2319 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GamemodeFlag.java +++ b/Core/src/main/java/com/plotsquared/core/plot/flag/implementations/GamemodeFlag.java @@ -32,6 +32,9 @@ import com.sk89q.worldedit.world.gamemode.GameMode; import com.sk89q.worldedit.world.gamemode.GameModes; import org.checkerframework.checker.nullness.qual.NonNull; +import java.util.Arrays; +import java.util.Collection; + public class GamemodeFlag extends PlotFlag { public static final GameMode DEFAULT = new GameMode("default"); @@ -115,4 +118,9 @@ public class GamemodeFlag extends PlotFlag { } } + @Override + public Collection getTabCompletions() { + return Arrays.asList("survival", "creative", "adventure", "spectator"); + } + }