WindCharge -> AbstractWindCharge

This commit is contained in:
Brokkonaut 2024-06-25 21:38:22 +02:00 committed by Joo200
parent 8aa37e389d
commit 83298796ab
2 changed files with 4 additions and 4 deletions

View File

@ -65,6 +65,7 @@
import org.bukkit.block.data.BlockData; import org.bukkit.block.data.BlockData;
import org.bukkit.block.data.Waterlogged; import org.bukkit.block.data.Waterlogged;
import org.bukkit.block.data.type.Dispenser; import org.bukkit.block.data.type.Dispenser;
import org.bukkit.entity.AbstractWindCharge;
import org.bukkit.entity.AreaEffectCloud; import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.entity.Creeper; import org.bukkit.entity.Creeper;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
@ -79,7 +80,6 @@
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.entity.Tameable; import org.bukkit.entity.Tameable;
import org.bukkit.entity.ThrownPotion; import org.bukkit.entity.ThrownPotion;
import org.bukkit.entity.WindCharge;
import org.bukkit.entity.minecart.HopperMinecart; import org.bukkit.entity.minecart.HopperMinecart;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.Event; import org.bukkit.event.Event;
@ -359,7 +359,7 @@ public void onEntityChangeBlock(EntityChangeBlockEvent event) {
@EventHandler(ignoreCancelled = true) @EventHandler(ignoreCancelled = true)
public void onEntityExplode(EntityExplodeEvent event) { public void onEntityExplode(EntityExplodeEvent event) {
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (entity instanceof WindCharge) { if (entity instanceof AbstractWindCharge) {
Iterator<Block> it = event.blockList().iterator(); Iterator<Block> it = event.blockList().iterator();
while (it.hasNext()) { while (it.hasNext()) {
Block block = it.next(); Block block = it.next();

View File

@ -44,6 +44,7 @@
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockState; import org.bukkit.block.BlockState;
import org.bukkit.entity.AbstractWindCharge;
import org.bukkit.entity.ArmorStand; import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Creeper; import org.bukkit.entity.Creeper;
import org.bukkit.entity.EnderCrystal; import org.bukkit.entity.EnderCrystal;
@ -60,7 +61,6 @@
import org.bukkit.entity.Projectile; import org.bukkit.entity.Projectile;
import org.bukkit.entity.TNTPrimed; import org.bukkit.entity.TNTPrimed;
import org.bukkit.entity.Tameable; import org.bukkit.entity.Tameable;
import org.bukkit.entity.WindCharge;
import org.bukkit.entity.Wither; import org.bukkit.entity.Wither;
import org.bukkit.entity.WitherSkull; import org.bukkit.entity.WitherSkull;
import org.bukkit.entity.Wolf; import org.bukkit.entity.Wolf;
@ -523,7 +523,7 @@ public void onEntityExplode(EntityExplodeEvent event) {
} }
} }
} }
} else if (ent instanceof WindCharge) { } else if (ent instanceof AbstractWindCharge) {
if (wcfg.useRegions) { if (wcfg.useRegions) {
for (Block block : event.blockList()) { for (Block block : event.blockList()) {
if (!WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery().getApplicableRegions(BukkitAdapter.adapt(block.getLocation())).testState(null, Flags.WIND_CHARGE_BURST)) { if (!WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery().getApplicableRegions(BukkitAdapter.adapt(block.getLocation())).testState(null, Flags.WIND_CHARGE_BURST)) {