Skip to content

Commit

Permalink
new skin cache structure
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverSchlueter committed Nov 23, 2024
1 parent 915c114 commit ee37e9c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/de/oliver/fancynpcs/skins/cache/SkinCache.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package de.oliver.fancynpcs.skins.cache;

import java.util.List;

public interface SkinCache {

List<SkinCacheData> load();
SkinCacheData getSkin(String identifier);

void addSkin(SkinCacheData skin);

void upsert(SkinCacheData skinData, boolean onlyIfExists);
void removeSkin(String identifier);

}
17 changes: 16 additions & 1 deletion src/main/java/de/oliver/fancynpcs/skins/cache/SkinCacheYaml.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ private static YamlConfiguration loadYaml() {
}

@Override
public SkinCacheData getSkin(String identifier) {

return null;
}

@Override
public void addSkin(SkinCacheData skin) {

}

@Override
public void removeSkin(String identifier) {

}


public List<SkinCacheData> load() {
YamlConfiguration yaml = loadYaml();
if (yaml == null) {
Expand Down Expand Up @@ -69,7 +85,6 @@ public List<SkinCacheData> load() {
return cache;
}

@Override
public void upsert(SkinCacheData skinData, boolean onlyIfExists) {
YamlConfiguration yaml = loadYaml();
if (yaml == null) {
Expand Down

0 comments on commit ee37e9c

Please sign in to comment.