Makes sure to only remove buttons from always-on portals if the block is a type of button
This commit is contained in:
parent
901f9c555c
commit
2a17714e8d
@ -295,7 +295,7 @@ public final class PortalFileHelper {
|
|||||||
BlockData buttonData = buttonLocation.getBlock().getBlockData();
|
BlockData buttonData = buttonLocation.getBlock().getBlockData();
|
||||||
if (portal.getOptions().isAlwaysOn()) {
|
if (portal.getOptions().isAlwaysOn()) {
|
||||||
//Clear button if not already air or water
|
//Clear button if not already air or water
|
||||||
if (buttonData.getMaterial() != Material.AIR && buttonData.getMaterial() != Material.WATER) {
|
if (MaterialHelper.isButtonCompatible(buttonData.getMaterial())) {
|
||||||
Material newMaterial = decideRemovalMaterial(buttonLocation, portal);
|
Material newMaterial = decideRemovalMaterial(buttonLocation, portal);
|
||||||
Stargate.addBlockChangeRequest(new BlockChangeRequest(buttonLocation, newMaterial, null));
|
Stargate.addBlockChangeRequest(new BlockChangeRequest(buttonLocation, newMaterial, null));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user