mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-05 02:10:10 +01:00
fix?
This commit is contained in:
parent
cdb89f4572
commit
7a6b80ca58
@ -84,13 +84,10 @@ public class EventListen implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onEntityTarget(EntityTargetEvent event) {
|
||||
if (npcManager.isNPC(event.getTarget()))
|
||||
if (event.isCancelled() || !npcManager.isNPC(event.getEntity()) || !(event.getTarget() instanceof Player))
|
||||
return;
|
||||
if (event.isCancelled() || !npcManager.isNPC(event.getEntity()) || !(event.getTarget() instanceof Player))
|
||||
return;
|
||||
|
||||
NPC npc = npcManager.getNPC(event.getEntity());
|
||||
if (npc == null)
|
||||
return;
|
||||
Player player = (Player) event.getTarget();
|
||||
if (!npcManager.npcIsSelectedByPlayer(player, npc)) {
|
||||
if (player.hasPermission("citizens.npc.select")
|
||||
|
Loading…
Reference in New Issue
Block a user