Minor trigger performance improvement

This commit is contained in:
Daniel Saukel 2020-05-06 23:57:45 +02:00
parent f1176c2605
commit 35e083042a

View File

@ -57,6 +57,9 @@ public class TriggerListener implements Listener {
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.RIGHT_CLICK_AIR) {
return;
}
Player player = event.getPlayer();
if (DPlayerListener.isCitizensNPC(player)) {
return;
@ -66,10 +69,6 @@ public class TriggerListener implements Listener {
return;
}
if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.RIGHT_CLICK_AIR) {
return;
}
ItemStack item = event.getItem();
if (item == null) {
return;