mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-16 20:31:30 +01:00
Add debug for /npc command
This commit is contained in:
parent
bcf932d616
commit
a591089d3c
@ -233,6 +233,10 @@ public class CommandTrait extends Trait {
|
|||||||
|
|
||||||
public void run(NPC npc, Player clicker) {
|
public void run(NPC npc, Player clicker) {
|
||||||
String interpolatedCommand = Placeholders.replace(command, clicker, npc);
|
String interpolatedCommand = Placeholders.replace(command, clicker, npc);
|
||||||
|
if (Messaging.isDebugging()) {
|
||||||
|
Messaging.debug(
|
||||||
|
"Running command " + interpolatedCommand + " on NPC " + npc.getId() + " clicker " + clicker);
|
||||||
|
}
|
||||||
if (!player) {
|
if (!player) {
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), interpolatedCommand);
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), interpolatedCommand);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user