fixed explosions
This commit is contained in:
parent
930cfa5cb8
commit
1026a2ae22
@ -26,6 +26,7 @@ import org.bukkit.event.block.BlockFadeEvent;
|
||||
import org.bukkit.event.block.BlockSpreadEvent;
|
||||
import org.bukkit.event.block.LeavesDecayEvent;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
@ -63,6 +64,7 @@ import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.elo.EloManager;
|
||||
import mineplex.core.energy.Energy;
|
||||
import mineplex.core.explosion.Explosion;
|
||||
import mineplex.core.explosion.ExplosionEvent;
|
||||
import mineplex.core.gadget.gadgets.OutfitTeam;
|
||||
import mineplex.core.gadget.types.Gadget;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
@ -1559,4 +1561,23 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
{
|
||||
_requiredRank = rank;
|
||||
}
|
||||
|
||||
@EventHandler(priority=EventPriority.LOWEST)
|
||||
public void explosionCancel(EntityExplodeEvent event)
|
||||
{
|
||||
if (GetGame() == null || !GetGame().InProgress())
|
||||
{
|
||||
event.blockList().clear();
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void explosionCancel(ExplosionEvent event)
|
||||
{
|
||||
if (GetGame() == null || !GetGame().InProgress())
|
||||
{
|
||||
event.GetBlocks().clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user