diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptExecutor.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptExecutor.java index 1c50aa9d..110b2a13 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptExecutor.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptExecutor.java @@ -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());