Merge pull request #55 in MIN/mineplex from clans_custom_gear to clans-beta
* commit '4e045f438de4603a95994a9856d0c60791ce0314': Prevent fire from burning blocks in spawn areas.
This commit is contained in:
commit
ac3850631f
@ -15,6 +15,7 @@ import org.bukkit.entity.Monster;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockBurnEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
@ -80,6 +81,15 @@ public class Spawn extends MiniPlugin
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onBlockBurn(BlockBurnEvent event)
|
||||
{
|
||||
if (isInSpawn(event.getBlock().getLocation()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent {@link ItemFrame}s from being broken inside Spawn.
|
||||
* @param event
|
||||
|
Loading…
Reference in New Issue
Block a user