mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-29 12:37:37 +01:00
Update src/main/java/net/citizensnpcs/Citizens.java
This commit is contained in:
parent
710780a3ff
commit
af81d49565
@ -137,15 +137,14 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
if (!commands.hasCommand(command, modifier) && !modifier.isEmpty()) {
|
||||
return suggestClosestModifier(sender, command.getName(), modifier);
|
||||
}
|
||||
if (!isEnabled())
|
||||
return false;
|
||||
|
||||
NPC npc = selector.getSelected(sender);
|
||||
NPC npc = selector == null ? null : selector.getSelected(sender);
|
||||
// TODO: change the args supplied to a context style system for
|
||||
// flexibility (ie. adding more context in the future without
|
||||
// changing everything)
|
||||
|
||||
return commands.executeSafe(command, args, sender, sender, npc);
|
||||
Object[] methodArgs = {sender, npc};
|
||||
return commands.executeSafe(command, args, sender, methodArgs);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user