From aa0863e726643dcef25591b652aa7ce481b8b8f2 Mon Sep 17 00:00:00 2001 From: rayzsyt Date: Wed, 30 Jul 2025 22:16:32 +0200 Subject: [PATCH] Fix missing notification on /pl or /ver --- .../de/rayzs/pat/plugin/modules/events/ExecuteCommand.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/rayzs/pat/plugin/modules/events/ExecuteCommand.java b/src/main/java/de/rayzs/pat/plugin/modules/events/ExecuteCommand.java index aaa37fc2..06ab6a59 100644 --- a/src/main/java/de/rayzs/pat/plugin/modules/events/ExecuteCommand.java +++ b/src/main/java/de/rayzs/pat/plugin/modules/events/ExecuteCommand.java @@ -42,6 +42,7 @@ public class ExecuteCommand extends ExecuteCommandEvent { event.setBlocked(true); event.setCancelled(true); + event.setDoesNotify(true); return; } @@ -55,6 +56,7 @@ public class ExecuteCommand extends ExecuteCommandEvent { event.setBlocked(true); event.setCancelled(true); + event.setDoesNotify(true); return; } @@ -91,6 +93,7 @@ public class ExecuteCommand extends ExecuteCommandEvent { final String unmodifiable = command; final String firstArgUnmodifiable = StringUtils.getFirstArg(unmodifiable); + if (commands.stream().noneMatch(c -> StringUtils.getFirstArg(c).equalsIgnoreCase(firstArgUnmodifiable))) { return true; } @@ -107,8 +110,9 @@ public class ExecuteCommand extends ExecuteCommandEvent { StringUtils.getFirstArg(s).equalsIgnoreCase(firstArgUnmodifiable) && s.contains("%") ).toList(); - if (!placeholderCommands.isEmpty()) + if (!placeholderCommands.isEmpty()) { command = SubArgsModule.replacePlaceholders(command); + } String cpyCommand; for (String c : commands) {