Disable obsidian dropping after breaking THE BLOCK

This commit is contained in:
phobia 2016-05-07 19:51:19 +10:00
parent 57fca2a8d0
commit 38f22b1577

View File

@ -17,6 +17,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
import org.bukkit.event.entity.EntityDamageEvent;
@ -891,7 +892,17 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
recipients.clear();
}
@EventHandler
public void disableObsidian(BlockBreakEvent event)
{
if(event.getBlock().getType().equals(Material.OBSIDIAN))
{
event.setCancelled(true);
event.getBlock().setType(Material.AIR);
}
}
@EventHandler
public void onSignChange(SignChangeEvent event)
{