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:
		@@ -210,6 +210,10 @@ public class GateHandler {
 | 
			
		||||
            Stargate.logSevere(String.format(failString, "Gates must have exactly 2 control points."));
 | 
			
		||||
            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)) {
 | 
			
		||||
            Stargate.logSevere(String.format(failString, "Gate button must be a type of button."));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user