Improves some code formatting in the portal open method
This commit is contained in:
parent
af693bddd2
commit
681014a431
@ -371,15 +371,19 @@ public class Portal {
|
|||||||
// Call the StargateOpenEvent
|
// Call the StargateOpenEvent
|
||||||
StargateOpenEvent event = new StargateOpenEvent(openFor, this, force);
|
StargateOpenEvent event = new StargateOpenEvent(openFor, this, force);
|
||||||
Stargate.server.getPluginManager().callEvent(event);
|
Stargate.server.getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) return false;
|
if (event.isCancelled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
force = event.getForce();
|
force = event.getForce();
|
||||||
|
|
||||||
if (isOpen() && !force) return false;
|
if (isOpen() && !force) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Material openType = gate.getPortalOpenBlock();
|
Material openType = gate.getPortalOpenBlock();
|
||||||
Axis ax = openType == Material.NETHER_PORTAL ? rot : null;
|
Axis axis = openType == Material.NETHER_PORTAL ? rot : null;
|
||||||
for (BlockLocation inside : getEntrances()) {
|
for (BlockLocation inside : getEntrances()) {
|
||||||
Stargate.blockPopulatorQueue.add(new BloxPopulator(inside, openType, ax));
|
Stargate.blockPopulatorQueue.add(new BloxPopulator(inside, openType, axis));
|
||||||
}
|
}
|
||||||
|
|
||||||
isOpen = true;
|
isOpen = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user