mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 18:45:29 +01:00
fix?
This commit is contained in:
parent
922cf2444b
commit
b85a378a7d
@ -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