mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-27 05:05:20 +01:00
Merge selection fix
This commit is contained in:
parent
bc946e0892
commit
b019763675
@ -101,7 +101,8 @@ public class EventListen implements Listener {
|
||||
|
||||
NPC npc = npcManager.getNPC(event.getEntity());
|
||||
Player player = (Player) event.getTarget();
|
||||
if (player.getMetadata("selected").size() == 0 || player.getMetadata("selected").get(0).asInt() != npc.getId()) {
|
||||
if (!player.hasMetadata("selected") || player.getMetadata("selected").size() == 0
|
||||
|| player.getMetadata("selected").get(0).asInt() != npc.getId()) {
|
||||
if (player.getItemInHand().getTypeId() == Setting.SELECTION_ITEM.asInt()
|
||||
&& (npc.getTrait(Owner.class).getOwner().equals(player.getName()) || player
|
||||
.hasPermission("citizens.admin"))) {
|
||||
|
Loading…
Reference in New Issue
Block a user