mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45:51 +00:00
Reverted
This commit is contained in:
parent
349d4f7e90
commit
d9f5442351
@ -28,9 +28,7 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
@ -171,32 +169,4 @@ public class AncientAltarListener implements Listener {
|
|||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler (priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
|
||||||
public void onBlockBreak(BlockBreakEvent e) {
|
|
||||||
Block b = e.getBlock();
|
|
||||||
SlimefunItem item = BlockStorage.check(b);
|
|
||||||
if(item == null) return;
|
|
||||||
if(item.getID().equalsIgnoreCase("ANCIENT_PEDESTAL")) {
|
|
||||||
Item stack = findItem(b);
|
|
||||||
if(stack == null) return;
|
|
||||||
b.getWorld().dropItem(b.getLocation(), fixItemStack(stack.getItemStack(), stack.getCustomName()));
|
|
||||||
stack.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler (priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
|
||||||
public void onBlockExplode(EntityExplodeEvent e) {
|
|
||||||
for(Block b:e.blockList()) {
|
|
||||||
SlimefunItem item = BlockStorage.check(b);
|
|
||||||
if(item == null) continue;
|
|
||||||
if(item.getID().equalsIgnoreCase("ANCIENT_PEDESTAL")) {
|
|
||||||
Item stack = findItem(b);
|
|
||||||
if(stack == null) return;
|
|
||||||
if(SlimefunStartup.getCfg().getBoolean("options.drop-item-when-ancient-pedestal-explodes"))
|
|
||||||
b.getWorld().dropItem(b.getLocation(), fixItemStack(stack.getItemStack(), stack.getCustomName()));
|
|
||||||
stack.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user