修复了无法产生掉落物的问题
All checks were successful
Java CI-CD with Maven / build (push) Successful in 17m12s

This commit is contained in:
ZhangYuheng 2024-09-19 22:58:16 +08:00
parent 198c4dd426
commit 7fd8f8450c
2 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<groupId>cn.lunadeer</groupId>
<artifactId>LiteWorldEdit</artifactId>
<version>2.4.3.7</version>
<version>2.4.3.8</version>
<packaging>jar</packaging>
<name>LiteWorldEdit</name>

View File

@ -45,9 +45,10 @@ public class Remove extends Job {
BlockBreakEvent event = new BlockBreakEvent(raw_block, _creator);
Bukkit.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
Material block_type = raw_block.getType();
raw_block.setType(Material.AIR);
if (LiteWorldEdit.instance.getConfigMgr().isDropItems()) {
raw_block.getWorld().dropItemNaturally(raw_block.getLocation(), new ItemStack(raw_block.getType()));
raw_block.getWorld().dropItemNaturally(raw_block.getLocation(), new ItemStack(block_type));
}
// 损坏镐
if (!_creator.isOp() && _creator.getGameMode() != GameMode.CREATIVE) {