Bugfix: new gates do not work when opening them.
This commit is contained in:
		| @@ -46,8 +46,19 @@ public class CommandOpen extends BaseCommand | ||||
| 	public void perform()  | ||||
| 	{ | ||||
| 		try { | ||||
|             boolean needsGateManagerUpdate = false; | ||||
|  | ||||
| 			if (gate.getGateBlockLocations().isEmpty()) { | ||||
|                 needsGateManagerUpdate = true; | ||||
|             } | ||||
|  | ||||
|             gate.setOpen(true); | ||||
|             GateBlockChangeSender.updateGateBlocks(gate); | ||||
|  | ||||
|             if (needsGateManagerUpdate) { | ||||
|                 Plugin.getPlugin().getGatesManager().handleGateLocationChange(gate, null, null, null); | ||||
|             } | ||||
|  | ||||
| 			sendMessage(ChatColor.GREEN + "The gate was opened."); | ||||
| 		}  | ||||
| 		catch (Exception e) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tobias Ottenweller
					Tobias Ottenweller