SteamWar/BauSystem2.0
Archiviert
12
0

Update CustomCommandListener

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-07-10 15:10:35 +02:00
Ursprung 10af2079d4
Commit 6a86a3cf3b

Datei anzeigen

@ -48,8 +48,7 @@ public class CustomCommandListener implements Listener {
private final BookMeta bookMeta;
private final String[] args;
public boolean execute(PlayerCommandPreprocessEvent e) {
String[] command = e.getMessage().split(" ");
public boolean execute(String[] command, PlayerCommandPreprocessEvent e) {
if (args.length != command.length) {
return false;
}
@ -128,7 +127,8 @@ public class CustomCommandListener implements Listener {
return;
}
customCommands.stream().map(customCommand -> customCommand.execute(e)).filter(b -> !b).findFirst();
String[] command = e.getMessage().split(" ");
customCommands.stream().map(customCommand -> customCommand.execute(command, e)).filter(b -> !b).findFirst();
}
private boolean isNoBook(ItemStack item) {