From ecd0fdd6f60c896ee7cd3d6d60ed6e640193a1aa Mon Sep 17 00:00:00 2001 From: stijnb1234 Date: Sat, 22 Feb 2020 19:00:27 +0100 Subject: [PATCH] Updated tabcompleter --- .../V10Lift/Commands/V10LiftTabCompleter.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/main/lombok/nl/SBDeveloper/V10Lift/Commands/V10LiftTabCompleter.java b/src/main/lombok/nl/SBDeveloper/V10Lift/Commands/V10LiftTabCompleter.java index 81c75fa..b51b65b 100644 --- a/src/main/lombok/nl/SBDeveloper/V10Lift/Commands/V10LiftTabCompleter.java +++ b/src/main/lombok/nl/SBDeveloper/V10Lift/Commands/V10LiftTabCompleter.java @@ -25,21 +25,16 @@ public class V10LiftTabCompleter implements TabCompleter { returns.add("add"); returns.add("del"); returns.add("rename"); - } else if (args[0].equalsIgnoreCase("input")) { + } else if (args[0].equalsIgnoreCase("input") || args[0].equalsIgnoreCase("offline") || args[0].equalsIgnoreCase("whitelist") || args[0].equalsIgnoreCase("rope")) { returns.add("add"); returns.add("del"); - } else if (args[0].equalsIgnoreCase("offline")) { - returns.add("add"); - returns.add("del"); - } else if (args[0].equalsIgnoreCase("whitelist")) { - returns.add("add"); - returns.add("del"); - } else if (args[0].equalsIgnoreCase("rope")) { - returns.add("add"); - returns.add("del"); - } else if (args[0].equalsIgnoreCase("edit")) { + } else if (args[0].equalsIgnoreCase("edit") || args[0].equalsIgnoreCase("start") || args[0].equalsIgnoreCase("stop")) { returns.addAll(DataManager.getLifts().keySet()); } + } else if (args.length == 3) { + if (args[0].equalsIgnoreCase("start")) { + returns.addAll(DataManager.getLift(args[1]).getFloors().keySet()); + } } Collections.sort(returns);