mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-02 14:38:56 +00:00
Command changes & greater tp restrictions
This commit is contained in:
1 parent
a0d44d19e9
commit
c658158cf5
6 files changed
+243
-63
No files matched your search
@@ -27,6 +27,8 @@ public class RaidTabCompletion implements TabCompleter {
|
||||
completions.add("abandon");
|
||||
completions.add("list");
|
||||
completions.add("help");
|
||||
completions.add("join");
|
||||
completions.add("leave");
|
||||
return completions;
|
||||
} else if (args.length == 2) {
|
||||
if (args[0].equalsIgnoreCase("start")) {
|
||||
@@ -43,6 +45,20 @@ public class RaidTabCompletion implements TabCompleter {
|
||||
}
|
||||
return completions;
|
||||
}
|
||||
} else if (args[0].equalsIgnoreCase("join")) {
|
||||
if (!WarCommands.wars.isEmpty()) {
|
||||
for (War war : WarCommands.wars) {
|
||||
completions.add(war.getName());
|
||||
}
|
||||
return completions;
|
||||
}
|
||||
} else if (args[0].equalsIgnoreCase("leave")) {
|
||||
if (!WarCommands.wars.isEmpty()) {
|
||||
for (War war : WarCommands.wars) {
|
||||
completions.add(war.getName());
|
||||
}
|
||||
return completions;
|
||||
}
|
||||
}
|
||||
} else if (args.length == 3) {
|
||||
if (args[0].equalsIgnoreCase("start")) {
|
||||
@@ -52,8 +68,24 @@ public class RaidTabCompletion implements TabCompleter {
|
||||
}
|
||||
return completions;
|
||||
}
|
||||
} else if (args[0].equalsIgnoreCase("join")) {
|
||||
if (!TownyAPI.getInstance().getTowns().isEmpty()) {
|
||||
for (Town town : TownyAPI.getInstance().getTowns()) {
|
||||
completions.add(town.getName());
|
||||
}
|
||||
return completions;
|
||||
}
|
||||
} else if (args[0].equalsIgnoreCase("leave")) {
|
||||
if (!TownyAPI.getInstance().getTowns().isEmpty()) {
|
||||
for (Town town : TownyAPI.getInstance().getTowns()) {
|
||||
completions.add(town.getName());
|
||||
}
|
||||
return completions;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user