mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-24 19:46:15 +01:00
Allow selected NPC redefinition in all cases
This commit is contained in:
parent
1a8d4fe7f8
commit
f62e536473
@ -117,7 +117,7 @@ public class CommandManager {
|
|||||||
NPC npc = (NPC) methodArgs[2];
|
NPC npc = (NPC) methodArgs[2];
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
if (cmdRequirements.selected() && npc == null) {
|
if (cmdRequirements.selected()) {
|
||||||
boolean canRedefineSelected = context.hasValueFlag("id")
|
boolean canRedefineSelected = context.hasValueFlag("id")
|
||||||
&& sender.hasPermission("npc.select");
|
&& sender.hasPermission("npc.select");
|
||||||
String error = "You must have an NPC selected to execute that command.";
|
String error = "You must have an NPC selected to execute that command.";
|
||||||
@ -126,6 +126,7 @@ public class CommandManager {
|
|||||||
if (npc == null)
|
if (npc == null)
|
||||||
error += " Couldn't find any NPC with ID " + context.getFlagInteger("id") + ".";
|
error += " Couldn't find any NPC with ID " + context.getFlagInteger("id") + ".";
|
||||||
}
|
}
|
||||||
|
if (npc == null)
|
||||||
throw new RequirementMissingException(error);
|
throw new RequirementMissingException(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user