Don't force nethergate.gate to exist
This commit is contained in:
		@@ -1317,7 +1317,7 @@ public class Portal {
 | 
				
			|||||||
					int modZ = Integer.parseInt(split[4]);
 | 
										int modZ = Integer.parseInt(split[4]);
 | 
				
			||||||
					float rotX = Float.parseFloat(split[5]);
 | 
										float rotX = Float.parseFloat(split[5]);
 | 
				
			||||||
					Blox topLeft = new Blox(world, split[6]);
 | 
										Blox topLeft = new Blox(world, split[6]);
 | 
				
			||||||
					Gate gate = (split[7].contains(";")) ? Gate.getGateByName("nethergate.gate") : Gate.getGateByName(split[7]);
 | 
										Gate gate = Gate.getGateByName(split[7]);
 | 
				
			||||||
					if (gate == null) {
 | 
										if (gate == null) {
 | 
				
			||||||
						Stargate.log.info("[Stargate] Gate layout on line " + l + " does not exist [" + split[7] + "]");
 | 
											Stargate.log.info("[Stargate] Gate layout on line " + l + " does not exist [" + split[7] + "]");
 | 
				
			||||||
						continue;
 | 
											continue;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -221,10 +221,6 @@ public class Stargate extends JavaPlugin {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		Gate.loadGates(gateFolder);
 | 
							Gate.loadGates(gateFolder);
 | 
				
			||||||
		// Replace nethergate.gate if it doesn't have an exit point.
 | 
					 | 
				
			||||||
		if (Gate.getGateByName("nethergate.gate") == null || Gate.getGateByName("nethergate.gate").getExit() == null) {
 | 
					 | 
				
			||||||
			Gate.populateDefaults(gateFolder);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		log.info("[Stargate] Loaded " + Gate.getGateCount() + " gate layouts");
 | 
							log.info("[Stargate] Loaded " + Gate.getGateCount() + " gate layouts");
 | 
				
			||||||
		for (World world : getServer().getWorlds()) {
 | 
							for (World world : getServer().getWorlds()) {
 | 
				
			||||||
			Portal.loadAllGates(world);
 | 
								Portal.loadAllGates(world);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user