SteamWar/FightSystem
Archiviert
13
1

Fix double item drops
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2023-10-27 23:38:31 +02:00
Ursprung 7ad5a1dc22
Commit 61eb28f78e

Datei anzeigen

@ -37,7 +37,6 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDispenseEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
@ -153,14 +152,6 @@ public class Permanent implements Listener {
e.setCancelled(true);
}
@SuppressWarnings("deprecation")
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockBreak(BlockBreakEvent e) {
Block block = e.getBlock();
for(ItemStack stack : block.getDrops(e.getPlayer().getItemInHand()))
Config.world.dropItemNaturally(block.getLocation(), stack);
}
@EventHandler
public void onDropPickup(PlayerPickupItemEvent e) {
if(!(Config.ArenaRegion.inRegion(e.getItem().getLocation())))