Attempt to improve profile unloading in singleplayer

This commit is contained in:
Aria 2023-02-27 22:50:01 -07:00
parent e50238e37e
commit 579b6ca344
3 changed files with 11 additions and 2 deletions

View file

@ -5,5 +5,5 @@ org.gradle.daemon=false
mc_version=1.18.2
forge_version=40.2.1
myversion=1.0.5.0227232216
myversion=1.0.5.0227232249
parchment_version=2022.11.06

View file

@ -4,6 +4,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@ -87,6 +88,14 @@ public class LibZontreck {
public void onServerStopping(final ServerStoppingEvent ev)
{
ALIVE=false;
Iterator<Profile> iProfile = PROFILES.values().iterator();
while(iProfile.hasNext())
{
Profile prof = iProfile.next();
iProfile.remove();
prof=null;
}
}
}

View file

@ -19,7 +19,7 @@ modId="libzontreck" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
# see the associated build.gradle script for how to populate this completely automatically during a build
version="1.0.5.0227232216" #mandatory
version="1.0.5.0227232249" #mandatory
# A display name for the mod
displayName="LibZontreck" #mandatory
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/