static public void setMissionControlPort ( int port ) { if ( port != AddressHelper . missionControlPort ) { AddressHelper . missionControlPort = port ; // Also update our metadata, for displaying to the user: ModMetadata md = Loader . instance ( ) . activeModContainer ( ) . getMetadata ( ) ; if ( port != - 1 ) md . description = "Talk to this Mod using port " + TextFormatting . GREEN + port ; else md . description = TextFormatting . RED + "ERROR: No mission control port - check configuration" ; // See if changing the port should lead to changing the login details: //AuthenticationHelper.update(MalmoMod.instance.getModPermanentConfigFile()); } }
Set the actual port used for mission control - not persisted could be different each time the Mod is run .