fix ghost LaborRecord entries for non-working prisoners on escape
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user