forked from virt-mirrors/Sit
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
|
@ -1,6 +1,5 @@
|
|||
package one.oth3r.sit.file;
|
||||
|
||||
import net.minecraft.entity.decoration.DisplayEntity;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import one.oth3r.sit.utl.Data;
|
||||
import one.oth3r.sit.utl.Utl;
|
||||
|
@ -57,27 +56,6 @@ public class FileData {
|
|||
return playerSettings.getOrDefault(player, sittingConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* loads all config files to memory
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue