13
0

Fix SchematicCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-01-11 21:58:02 +01:00
Ursprung 604e683362
Commit 6f93130fe6

Datei anzeigen

@ -284,13 +284,12 @@ public class SchematicCommand extends SWCommand {
predicates.add(node -> node.getItem().equalsIgnoreCase(query[finalI + 1]));
break;
case "-owner":
try {
SteamwarUser steamwarUser = SteamwarUser.get(query[finalI + 1]);
predicates.add(node -> node.getOwner() == steamwarUser.getId());
} catch (Exception e) {
SteamwarUser steamwarUser = SteamwarUser.get(query[finalI + 1]);
if (steamwarUser == null) {
player.sendMessage(SchematicSystem.PREFIX + "§cDer Spieler §e" + query[finalI + 1] + " §cexistiert nicht");
return;
}
predicates.add(node -> node.getOwner() == steamwarUser.getId());
}
i++;
}
@ -660,7 +659,10 @@ public class SchematicCommand extends SWCommand {
@Override
public List<String> tabCompletes(CommandSender commandSender, String[] strings, String s) {
if (strings.length == 0) {
return Collections.singletonList(s);
List<String> list = new ArrayList<>();
list.add(s);
list.addAll(searchMapper.keySet());
return list;
}
String last = strings[strings.length - 1];
if (searchMapper.containsKey(last)) {