From f08e0f51e230458707c4aa8e8c7129d520f356c7 Mon Sep 17 00:00:00 2001 From: zhangyuheng Date: Fri, 5 Jul 2024 11:53:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E7=94=B1=E4=BA=8E?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E4=BA=86paper=E7=89=B9=E6=AE=8Aapi=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E5=9C=A8spigot=E4=B8=8B=E6=9C=89=E6=A6=82=E7=8E=87?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../lunadeer/dominion/events/PlayerEvents.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 0d3cce5..a0f5fa0 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ cn.lunadeer Dominion - 1.35.3-beta + 1.35.4-beta jar Dominion diff --git a/src/main/java/cn/lunadeer/dominion/events/PlayerEvents.java b/src/main/java/cn/lunadeer/dominion/events/PlayerEvents.java index 3d21d3d..9e64d40 100644 --- a/src/main/java/cn/lunadeer/dominion/events/PlayerEvents.java +++ b/src/main/java/cn/lunadeer/dominion/events/PlayerEvents.java @@ -103,7 +103,7 @@ public class PlayerEvents implements Listener { @EventHandler(priority = EventPriority.HIGHEST) // bed public void onBedUse(PlayerInteractEvent event) { - if (!event.getAction().isRightClick()) { + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { return; } Player bukkitPlayer = event.getPlayer(); @@ -165,7 +165,7 @@ public class PlayerEvents implements Listener { @EventHandler(priority = EventPriority.HIGHEST) // button public void onButton(PlayerInteractEvent event) { - if (!event.getAction().isRightClick()) { + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { return; } Player player = event.getPlayer(); @@ -182,7 +182,7 @@ public class PlayerEvents implements Listener { @EventHandler(priority = EventPriority.HIGHEST) // cake public void eatCake(PlayerInteractEvent event) { - if (!event.getAction().isRightClick()) { + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { return; } Block block = event.getClickedBlock(); @@ -280,7 +280,7 @@ public class PlayerEvents implements Listener { @EventHandler(priority = EventPriority.HIGHEST) // comparer public void comparerChange(PlayerInteractEvent event) { - if (!event.getAction().isRightClick()) { + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { return; } Block block = event.getClickedBlock(); @@ -298,7 +298,7 @@ public class PlayerEvents implements Listener { @EventHandler(priority = EventPriority.HIGHEST) // door public void doorUse(PlayerInteractEvent event) { - if (!event.getAction().isRightClick()) { + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { return; } Block block = event.getClickedBlock(); @@ -340,7 +340,7 @@ public class PlayerEvents implements Listener { @EventHandler(priority = EventPriority.HIGHEST) // edit sign public void onSignOpen(PlayerInteractEvent event) { - if (!event.getAction().isRightClick()) { + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { return; } Player player = event.getPlayer(); @@ -444,7 +444,7 @@ public class PlayerEvents implements Listener { @EventHandler(priority = EventPriority.HIGHEST) // honey public void honeyInteractive(PlayerInteractEvent event) { - if (!event.getAction().isRightClick()) { + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { return; } Block block = event.getClickedBlock(); @@ -502,7 +502,7 @@ public class PlayerEvents implements Listener { @EventHandler(priority = EventPriority.HIGHEST) // lever public void onLever(PlayerInteractEvent event) { - if (!event.getAction().isRightClick()) { + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) { return; } Block block = event.getClickedBlock();