Add debug for /npc command

This commit is contained in:
fullwall 2020-06-12 19:35:30 +08:00
parent bcf932d616
commit a591089d3c

View File

@ -233,6 +233,10 @@ public class CommandTrait extends Trait {
public void run(NPC npc, Player clicker) {
String interpolatedCommand = Placeholders.replace(command, clicker, npc);
if (Messaging.isDebugging()) {
Messaging.debug(
"Running command " + interpolatedCommand + " on NPC " + npc.getId() + " clicker " + clicker);
}
if (!player) {
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), interpolatedCommand);
return;