123456789101112131415161718192021222324 |
- package me.km.plots;
- import me.km.api.Module;
- import net.minecraft.util.math.BlockPos;
- import net.minecraftforge.event.world.ExplosionEvent;
- import net.minecraftforge.fml.common.eventhandler.EventPriority;
- import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
- public class ProtectionExplosion extends Protection
- {
- public ProtectionExplosion(Module m)
- {
- super(m);
- }
-
- @SubscribeEvent(priority = EventPriority.HIGHEST)
- public void BlockExplosionProtection(ExplosionEvent.Start e)
- {
- if(!this.getProtectionBank().hasTag(e.getWorld(), new BlockPos(e.getExplosion().getPosition()), "TNT"))
- {
- e.setCanceled(true);
- }
- }
- }
|