From 55f8a1f75cf22f258e80aac3e18f2f2bc1988ebe Mon Sep 17 00:00:00 2001 From: fullwall Date: Thu, 30 Jun 2022 16:10:16 +0800 Subject: [PATCH] Fix say in /npc command --- main/src/main/java/net/citizensnpcs/trait/CommandTrait.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java b/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java index 2f56260cf..ec9e4a415 100644 --- a/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java +++ b/main/src/main/java/net/citizensnpcs/trait/CommandTrait.java @@ -474,8 +474,8 @@ public class CommandTrait extends Trait { if (command.startsWith("say")) { cmd = "npc speak " + command.replaceFirst("say", "").trim() + " --target

"; } - if ((command.startsWith("npc ") || command.startsWith("waypoints ") || command.startsWith("wp ")) - && !command.contains("--id ")) { + if ((cmd.startsWith("npc ") || cmd.startsWith("waypoints ") || cmd.startsWith("wp ")) + && !cmd.contains("--id ")) { cmd += " --id "; } String interpolatedCommand = Placeholders.replace(cmd, clicker, npc);