mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Minor trigger performance improvement
This commit is contained in:
parent
f1176c2605
commit
35e083042a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user