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:
parent
7ab0d700cc
commit
f9de4171d4
@ -1,5 +1,6 @@
|
|||||||
package org.mcteam.factions.listeners;
|
package org.mcteam.factions.listeners;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
@ -24,6 +25,10 @@ public class FactionsBlockListener extends BlockListener {
|
|||||||
if (!event.canBuild()) {
|
if (!event.canBuild()) {
|
||||||
return;
|
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")) {
|
if ( ! this.playerCanBuildDestroyBlock(event.getPlayer(), event.getBlock(), "build")) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user