mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Implement more suggestions
This commit is contained in:
parent
ff634c0f5c
commit
7afb9b9791
@ -41,6 +41,7 @@ import me.mrCookieSlime.Slimefun.api.Slimefun;
|
||||
*
|
||||
* @author TheBusyBiscuit
|
||||
* @author Linox
|
||||
* @author Patbox
|
||||
*
|
||||
* @see BlockPlaceHandler
|
||||
* @see BlockBreakHandler
|
||||
@ -59,12 +60,15 @@ public class BlockListener implements Listener {
|
||||
// While this can cause ghost blocks it also prevents them from replacing grass
|
||||
// or saplings etc...
|
||||
Block block = e.getBlock();
|
||||
SlimefunItem sfItem = BlockStorage.check(block);
|
||||
|
||||
if (sfItem != null) {
|
||||
if (e.getBlockReplacedState().getType().isAir()) {
|
||||
if (e.getBlockReplacedState().getType().isAir()) {
|
||||
SlimefunItem sfItem = BlockStorage.check(block);
|
||||
|
||||
if (sfItem != null) {
|
||||
for (ItemStack item : sfItem.getDrops()) {
|
||||
if (item != null && !item.getType().isAir()) { block.getWorld().dropItemNaturally(block.getLocation(), item); }
|
||||
if (!item.getType().isAir()) {
|
||||
block.getWorld().dropItemNaturally(block.getLocation(), item);
|
||||
}
|
||||
}
|
||||
BlockStorage.clearBlockInfo(block);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user