mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 08:23:20 +02:00
move sitEntities list to Data from FileData
This commit is contained in:
parent
8f89a049f9
commit
09f5e31544
6 changed files with 30 additions and 33 deletions
|
@ -101,4 +101,25 @@ public class Data {
|
|||
public static HashMap<ServerPlayerEntity, DisplayEntity.TextDisplayEntity> getSpawnList() {
|
||||
return new HashMap<>(spawnList);
|
||||
}
|
||||
|
||||
/**
|
||||
* a list of every Sit! entity in the server, bound to the player
|
||||
*/
|
||||
private static final HashMap<ServerPlayerEntity, DisplayEntity.TextDisplayEntity> sitEntities = new HashMap<>();
|
||||
|
||||
public static void addSitEntity(ServerPlayerEntity player, DisplayEntity.TextDisplayEntity entity) {
|
||||
sitEntities.put(player, entity);
|
||||
}
|
||||
|
||||
public static void removeSitEntity(DisplayEntity.TextDisplayEntity entity) {
|
||||
sitEntities.values().remove(entity);
|
||||
}
|
||||
|
||||
public static DisplayEntity.TextDisplayEntity getSitEntity(ServerPlayerEntity player) {
|
||||
return sitEntities.get(player);
|
||||
}
|
||||
|
||||
public static HashMap<ServerPlayerEntity, DisplayEntity.TextDisplayEntity> getSitEntities() {
|
||||
return new HashMap<>(sitEntities);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue