fix ghost LaborRecord entries for non-working prisoners on escape

This commit is contained in:
NotEvil
2026-04-16 14:36:45 +02:00
parent f4aa5ffdc5
commit 27c86bc831
2 changed files with 11 additions and 2 deletions

View File

@@ -113,6 +113,14 @@ public class PrisonerManager extends SavedData {
return laborRecords.computeIfAbsent(playerId, id -> new LaborRecord());
}
/**
* Get labor record only if one exists. Does not create ghost entries.
*/
@Nullable
public LaborRecord getLaborRecordIfExists(UUID playerId) {
return laborRecords.get(playerId);
}
/**
* Set the labor record for a player.
*/