special case added to block placement check, so flint&steel isn't prevented due to placing fire (as Bukkit sees it)

This commit is contained in:
Brettflan 2011-06-10 14:16:14 -05:00
parent 7ab0d700cc
commit f9de4171d4

View File

@ -1,5 +1,6 @@
package org.mcteam.factions.listeners;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockBreakEvent;
@ -24,6 +25,10 @@ public class FactionsBlockListener extends BlockListener {
if (!event.canBuild()) {
return;
}
// special case for flint&steel, which should only be prevented by DenyUsage list
if (event.getBlockPlaced().getType() == Material.FIRE) {
return;
}
if ( ! this.playerCanBuildDestroyBlock(event.getPlayer(), event.getBlock(), "build")) {
event.setCancelled(true);