mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-24 03:25:13 +01:00
Sanity check
This commit is contained in:
parent
670711f109
commit
5f6014d87d
@ -193,10 +193,13 @@ public class LinearWaypointProvider implements WaypointProvider {
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
if (event.getPlayer() == null || !event.getPlayer().equals(player)
|
||||
|| event.getAction() == Action.PHYSICAL)
|
||||
if (npc == null) {
|
||||
end();
|
||||
return;
|
||||
if (!npc.isSpawned() || event.getPlayer().getWorld() != npc.getBukkitEntity().getWorld())
|
||||
}
|
||||
if (!event.getPlayer().equals(player) || event.getAction() == Action.PHYSICAL)
|
||||
return;
|
||||
if (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