mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 15:17:36 +01:00
Bugfixes for bonemeal and minecarts.
This commit is contained in:
parent
f2d7135fc5
commit
886b279da6
@ -723,7 +723,16 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|
|||||||
if (item.getTypeId() == ItemID.INK_SACK
|
if (item.getTypeId() == ItemID.INK_SACK
|
||||||
&& item.getData() != null) {
|
&& item.getData() != null) {
|
||||||
if (item.getData().getData() == 15 // bonemeal
|
if (item.getData().getData() == 15 // bonemeal
|
||||||
&& type == BlockID.GRASS) {
|
&& (type == BlockID.GRASS
|
||||||
|
|| type == BlockID.SAPLING
|
||||||
|
|| type == BlockID.CROPS
|
||||||
|
|| type == BlockID.BROWN_MUSHROOM
|
||||||
|
|| type == BlockID.RED_MUSHROOM
|
||||||
|
|| type == BlockID.PUMPKIN_STEM
|
||||||
|
|| type == BlockID.MELON_STEM
|
||||||
|
|| type == BlockID.POTATOES
|
||||||
|
|| type == BlockID.CARROTS
|
||||||
|
|| type == BlockID.COCOA_PLANT)) {
|
||||||
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
||||||
&& !set.canBuild(localPlayer)) {
|
&& !set.canBuild(localPlayer)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -841,7 +850,10 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BlockType.isRailBlock(type) && item.getTypeId() == ItemID.MINECART) {
|
if (BlockType.isRailBlock(type)
|
||||||
|
&& (item.getTypeId() == ItemID.MINECART
|
||||||
|
|| item.getTypeId() == ItemID.POWERED_MINECART
|
||||||
|
|| item.getTypeId() == ItemID.STORAGE_MINECART)) {
|
||||||
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
|
||||||
&& !set.canBuild(localPlayer)
|
&& !set.canBuild(localPlayer)
|
||||||
&& !set.allows(DefaultFlag.PLACE_VEHICLE, localPlayer)) {
|
&& !set.allows(DefaultFlag.PLACE_VEHICLE, localPlayer)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user