Skip to content

Commit

Permalink
Merge branch 'Slimefun:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
WalshyDev committed Jan 2, 2024
2 parents ac33037 + dad6020 commit df07565
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -11,6 +11,7 @@
import javax.annotation.ParametersAreNonnullByDefault;

import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
Expand Down Expand Up @@ -240,7 +241,9 @@ private void dropItems(BlockBreakEvent e, List<ItemStack> drops) {
for (ItemStack drop : drops) {
// Prevent null or air from being dropped
if (drop != null && drop.getType() != Material.AIR) {
e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation(), drop);
if (e.getPlayer().getGameMode() != GameMode.CREATIVE || Slimefun.getCfg().getBoolean("options.drop-block-creative")) {
e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation(), drop);
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Expand Up @@ -22,6 +22,7 @@ options:
burn-players-when-radioactive: true
drop-excess-sf-give-items: false
backup-data: true
drop-block-creative: true

guide:
show-vanilla-recipes: true
Expand Down

0 comments on commit df07565

Please sign in to comment.