mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-10-05 01:57:28 +02:00
Remove attachment check because it doesn't really make sense.
This commit is contained in:
parent
bf97e41697
commit
2c1d1ef0a3
@ -76,7 +76,6 @@ public class WorldConfiguration {
|
|||||||
/* Configuration data start */
|
/* Configuration data start */
|
||||||
public boolean summaryOnStart;
|
public boolean summaryOnStart;
|
||||||
public boolean opPermissions;
|
public boolean opPermissions;
|
||||||
public boolean checkAttached;
|
|
||||||
public boolean fireSpreadDisableToggle;
|
public boolean fireSpreadDisableToggle;
|
||||||
public boolean itemDurability;
|
public boolean itemDurability;
|
||||||
public boolean simulateSponge;
|
public boolean simulateSponge;
|
||||||
@ -308,8 +307,6 @@ private void loadConfiguration() {
|
|||||||
summaryOnStart = getBoolean("summary-on-start", true);
|
summaryOnStart = getBoolean("summary-on-start", true);
|
||||||
opPermissions = getBoolean("op-permissions", true);
|
opPermissions = getBoolean("op-permissions", true);
|
||||||
|
|
||||||
checkAttached = getBoolean("internal.check-attached-blocks", false);
|
|
||||||
|
|
||||||
itemDurability = getBoolean("protection.item-durability", true);
|
itemDurability = getBoolean("protection.item-durability", true);
|
||||||
removeInfiniteStacks = getBoolean("protection.remove-infinite-stacks", false);
|
removeInfiniteStacks = getBoolean("protection.remove-infinite-stacks", false);
|
||||||
disableExpDrops = getBoolean("protection.disable-xp-orb-drops", false);
|
disableExpDrops = getBoolean("protection.disable-xp-orb-drops", false);
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
import com.sk89q.worldedit.blocks.BlockType;
|
import com.sk89q.worldedit.blocks.BlockType;
|
||||||
import com.sk89q.worldedit.blocks.ItemType;
|
import com.sk89q.worldedit.blocks.ItemType;
|
||||||
import com.sk89q.worldguard.LocalPlayer;
|
import com.sk89q.worldguard.LocalPlayer;
|
||||||
import com.sk89q.worldguard.internal.Blocks;
|
|
||||||
import com.sk89q.worldguard.internal.Events;
|
import com.sk89q.worldguard.internal.Events;
|
||||||
import com.sk89q.worldguard.internal.cause.Causes;
|
import com.sk89q.worldguard.internal.cause.Causes;
|
||||||
import com.sk89q.worldguard.internal.event.BlockInteractEvent;
|
import com.sk89q.worldguard.internal.event.BlockInteractEvent;
|
||||||
@ -142,13 +141,6 @@ public void onBlockBreak(BlockBreakEvent event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Events.fireToCancel(event, new BlockInteractEvent(event, Causes.create(event.getPlayer()), Interaction.BREAK, target));
|
Events.fireToCancel(event, new BlockInteractEvent(event, Causes.create(event.getPlayer()), Interaction.BREAK, target));
|
||||||
|
|
||||||
if (wcfg.checkAttached) {
|
|
||||||
Block attachedTo = Blocks.getAttachesTo(target);
|
|
||||||
if (attachedTo != null) {
|
|
||||||
Events.fireToCancel(event, new BlockInteractEvent(event, Causes.create(event.getPlayer()), Interaction.BREAK, attachedTo));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -477,13 +469,6 @@ public void onBlockPlace(BlockPlaceEvent event) {
|
|||||||
|
|
||||||
Events.fireToCancel(event, new BlockInteractEvent(event, Causes.create(event.getPlayer()), Interaction.PLACE, target));
|
Events.fireToCancel(event, new BlockInteractEvent(event, Causes.create(event.getPlayer()), Interaction.PLACE, target));
|
||||||
|
|
||||||
if (wcfg.checkAttached) {
|
|
||||||
Block attachedTo = Blocks.getAttachesTo(event.getBlockPlaced());
|
|
||||||
if (attachedTo != null) {
|
|
||||||
Events.fireToCancel(event, new BlockInteractEvent(event, Causes.create(event.getPlayer()), Interaction.BREAK, attachedTo));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wcfg.simulateSponge && target.getType() == Material.SPONGE) {
|
if (wcfg.simulateSponge && target.getType() == Material.SPONGE) {
|
||||||
if (wcfg.redstoneSponges && target.isBlockIndirectlyPowered()) {
|
if (wcfg.redstoneSponges && target.isBlockIndirectlyPowered()) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user