SteamWar/BauSystem2.0
Archiviert
12
0

Fix script calling other command without expression replacement
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-12-25 00:14:50 +01:00
Ursprung 77e38d6d99
Commit 675d0d616e

Datei anzeigen

@ -156,15 +156,15 @@ public final class ScriptExecutor {
continue;
}
// Variable Replaces in commands.
command = String.join(" ", strings);
PlayerCommandPreprocessEvent preprocessEvent = new PlayerCommandPreprocessEvent(player, "/" + (specialCommand != null && command.startsWith(specialCommand) ? "script:" : "") + command);
Bukkit.getServer().getPluginManager().callEvent(preprocessEvent);
if (preprocessEvent.isCancelled()) {
continue;
}
// Variable Replaces in commands.
command = String.join(" ", strings);
Bukkit.getLogger().log(Level.INFO, player.getName() + " dispatched command: " + command);
if (!strings[0].equals("select") && hasFAWE && WorldEditListener.isWorldEditCommand("/" + strings[0])) {
EditSession editSession = WorldEditUtils.getEditSession(player.getWorld());