fixed bug preventing removal of gates without from location
This commit is contained in:
parent
6bb50672a5
commit
a474963666
@ -95,7 +95,7 @@ public class Gate {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Uncomment lines below to have the old Portal open functionality back.
|
// Uncomment lines below to have the old Portal open functionality back.
|
||||||
|
|
||||||
// This is not to do an effect
|
// This is not to do an effect
|
||||||
// It is to stop portalblocks from destroyingthemself as they cant rely on non created blocks :P
|
// It is to stop portalblocks from destroyingthemself as they cant rely on non created blocks :P
|
||||||
@ -110,12 +110,14 @@ public class Gate {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close() {
|
public void close()
|
||||||
Set<Block> blocks = FloodUtil.getGateFrameBlocks(from.getBlock());
|
{
|
||||||
|
if (from != null)
|
||||||
// Uncomment lines below to have the old Portal open functionality back.
|
{
|
||||||
for (Block block : blocks) {
|
Set<Block> blocks = FloodUtil.getGateFrameBlocks(from.getBlock());
|
||||||
block.setType(Material.AIR);
|
|
||||||
|
for (Block block : blocks)
|
||||||
|
block.setType(Material.AIR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user