mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-01 14:08:08 +01:00
Test
This commit is contained in:
parent
67da06d14b
commit
670711f109
@ -15,7 +15,6 @@ import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.api.persistence.PersistenceLoader;
|
||||
import net.citizensnpcs.api.util.DataKey;
|
||||
import net.citizensnpcs.editor.Editor;
|
||||
import net.citizensnpcs.trait.CurrentLocation;
|
||||
import net.citizensnpcs.trait.waypoint.triggers.TriggerEditPrompt;
|
||||
import net.citizensnpcs.util.Messages;
|
||||
import net.citizensnpcs.util.Messaging;
|
||||
@ -194,11 +193,10 @@ public class LinearWaypointProvider implements WaypointProvider {
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
if (event.getPlayer() == null)
|
||||
if (event.getPlayer() == null || !event.getPlayer().equals(player)
|
||||
|| event.getAction() == Action.PHYSICAL)
|
||||
return;
|
||||
if (!event.getPlayer().equals(player) || event.getAction() == Action.PHYSICAL)
|
||||
return;
|
||||
if (event.getPlayer().getWorld() != npc.getTrait(CurrentLocation.class).getWorld())
|
||||
if (!npc.isSpawned() || event.getPlayer().getWorld() != npc.getBukkitEntity().getWorld())
|
||||
return;
|
||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.LEFT_CLICK_AIR) {
|
||||
if (event.getClickedBlock() == null)
|
||||
|
Loading…
Reference in New Issue
Block a user