Skip to content

Commit

Permalink
修复了掉落物控制不生效问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdeZhang committed Mar 24, 2024
1 parent caee0c6 commit c9b5214
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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.12.0-beta</version>
<version>1.12.1-beta</version>
<packaging>jar</packaging>

<name>Dominion</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.EntityDropItemEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.player.PlayerInteractEvent;
Expand Down Expand Up @@ -81,7 +82,7 @@ public void onLiquidFlowIn(BlockFromToEvent event) {
}

@EventHandler(priority = EventPriority.HIGHEST) // mob_drop_item
public void onMobDropItem(EntityDropItemEvent event) {
public void onMobDropItem(EntityDeathEvent event) {
Entity entity = event.getEntity();
if (entity instanceof Player) {
return;
Expand All @@ -93,7 +94,7 @@ public void onMobDropItem(EntityDropItemEvent event) {
if (dom.getMobDropItem()) {
return;
}
event.setCancelled(true);
event.getDrops().clear();
}

@EventHandler(priority = EventPriority.HIGHEST) // tnt_explode
Expand Down

0 comments on commit c9b5214

Please sign in to comment.