Adds condition to require exactly one exit point
Note that Legacy didn't have a check because the actual exits were calculated based on the bottom opening blocks in order to center a leaving player. A warning would instead be displayed upon teleportation when a player tried to teleport to a Stargate with no exit.
This commit is contained in:
@@ -211,6 +211,10 @@ public class GateHandler {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gate.getLayout().getExit() == null) {
|
||||||
|
Stargate.logSevere(String.format(failString, "Gates must have one specified exit point"));
|
||||||
|
}
|
||||||
|
|
||||||
if (checkMaterialPredicateFail(gate.getPortalButtonMaterials(), MaterialHelper::isButtonCompatible)) {
|
if (checkMaterialPredicateFail(gate.getPortalButtonMaterials(), MaterialHelper::isButtonCompatible)) {
|
||||||
Stargate.logSevere(String.format(failString, "Gate button must be a type of button."));
|
Stargate.logSevere(String.format(failString, "Gate button must be a type of button."));
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user