Skip to content

Commit

Permalink
Add 'player left clicks' world event.
Browse files Browse the repository at this point in the history
  • Loading branch information
aufdemrand committed May 23, 2013
1 parent eb38b5c commit 9af4374
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -239,6 +239,10 @@ public void playerInteract(PlayerInteractEvent event) {
event.setCancelled(true);
}

determination = doEvent("player left clicks", null, event.getPlayer(), context);
if (determination.toUpperCase().startsWith("CANCELLED"))
event.setCancelled(true);

determination = doEvent("player swings arm in air", null, event.getPlayer(), context);
if (determination.toUpperCase().startsWith("CANCELLED"))
event.setCancelled(true);
Expand All @@ -260,10 +264,15 @@ else if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
event.setCancelled(true);
}

determination = doEvent("player left clicks", null, event.getPlayer(), context);
if (determination.toUpperCase().startsWith("CANCELLED"))
event.setCancelled(true);

determination = doEvent("player hits block", null, event.getPlayer(), context);

if (determination.toUpperCase().startsWith("CANCELLED"))
event.setCancelled(true);

}

if (event.getAction() == Action.RIGHT_CLICK_AIR) {
Expand Down

0 comments on commit 9af4374

Please sign in to comment.