Update CustomCommandListener
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
10af2079d4
Commit
6a86a3cf3b
@ -48,8 +48,7 @@ public class CustomCommandListener implements Listener {
|
|||||||
private final BookMeta bookMeta;
|
private final BookMeta bookMeta;
|
||||||
private final String[] args;
|
private final String[] args;
|
||||||
|
|
||||||
public boolean execute(PlayerCommandPreprocessEvent e) {
|
public boolean execute(String[] command, PlayerCommandPreprocessEvent e) {
|
||||||
String[] command = e.getMessage().split(" ");
|
|
||||||
if (args.length != command.length) {
|
if (args.length != command.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -128,7 +127,8 @@ public class CustomCommandListener implements Listener {
|
|||||||
return;
|
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) {
|
private boolean isNoBook(ItemStack item) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren