Skip to content

Commit

Permalink
Update player activity on PlayerInteractEvent.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andronachi-Marian authored and SupaHam committed Oct 22, 2017
1 parent 90feb99 commit e6fc459
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -584,27 +584,25 @@ public void onPlayerInteract(final PlayerInteractEvent event) {
player.sendMessage(tl("bedSet", player.getLocation().getWorld().getName(), player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ()));
}
}
break;
break;
case LEFT_CLICK_AIR:
if (event.getPlayer().isFlying()) {
final User user = ess.getUser(event.getPlayer());
if (user.isFlyClickJump()) {
useFlyClickJump(user);
return;
}
}
break;
case LEFT_CLICK_BLOCK:
if (event.getItem() != null && event.getItem().getType() != Material.AIR) {
final User user = ess.getUser(event.getPlayer());
user.updateActivity(true);
if (user.hasPowerTools() && user.arePowerToolsEnabled() && usePowertools(user, event.getItem().getTypeId())) {
event.setCancelled(true);
}
}
break;
default:
break;
break;
}
ess.getUser(event.getPlayer()).updateActivity(true);
}

// This method allows the /jump lock feature to work, allows teleporting while flying #EasterEgg
Expand Down

0 comments on commit e6fc459

Please sign in to comment.