Skip to content

Commit

Permalink
修复了由于调用了paper特殊api导致在spigot下有概率报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdeZhang committed Jul 5, 2024
1 parent 6a3f9fb commit f08e0f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>cn.lunadeer</groupId>
<artifactId>Dominion</artifactId>
<version>1.35.3-beta</version>
<version>1.35.4-beta</version>
<packaging>jar</packaging>

<name>Dominion</name>
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/cn/lunadeer/dominion/events/PlayerEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void onBeaconUse(InventoryOpenEvent event) {

@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();
Expand Down Expand Up @@ -165,7 +165,7 @@ public static boolean onBreak(Player player, Location location) {

@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();
Expand All @@ -182,7 +182,7 @@ public void onButton(PlayerInteractEvent event) {

@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();
Expand Down Expand Up @@ -280,7 +280,7 @@ public void onCraft(InventoryOpenEvent event) {

@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();
Expand All @@ -298,7 +298,7 @@ public void comparerChange(PlayerInteractEvent event) {

@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();
Expand Down Expand Up @@ -340,7 +340,7 @@ public void dyeEvent(PlayerInteractEntityEvent event) {

@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();
Expand Down Expand Up @@ -444,7 +444,7 @@ public void onHarvest(BlockBreakEvent event) {

@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();
Expand Down Expand Up @@ -502,7 +502,7 @@ public void onPlayerIgnite(BlockIgniteEvent event) {

@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();
Expand Down

0 comments on commit f08e0f5

Please sign in to comment.