move entity spawning to the server loop to fix C2ME crash

move checkplayers to Data from FileData
This commit is contained in:
Oth3r 2024-08-17 13:27:26 -05:00
commit 757ee9668a
5 changed files with 56 additions and 26 deletions

View file

@ -78,23 +78,6 @@ public class FileData {
return new HashMap<>(sitEntities);
}
/**
* a list of players who just joined, to check if they are mounted to a Sit! entity
*/
private static final HashMap<ServerPlayerEntity, Integer> checkPlayers = new HashMap<>();
public static void setCheckPlayer(ServerPlayerEntity player, Integer time) {
checkPlayers.put(player, time);
}
public static void removeCheckPlayer(ServerPlayerEntity player) {
checkPlayers.remove(player);
}
public static HashMap<ServerPlayerEntity, Integer> getCheckPlayers() {
return new HashMap<>(checkPlayers);
}
/**
* loads all config files to memory
* @param tryLegacy try to load the legacy file, usually only used on server startup