Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package net.crankedpvp.chattitles.data;
|
||||
|
||||
import net.crankedpvp.chattitles.ChatTitlesPlugin;
|
||||
import net.crankedpvp.storageutils.StorageUtils;
|
||||
import net.crankedpvp.storageutils.utils.SaveLoadManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
public class TitlePlayerManager extends SaveLoadManager<TitlePlayer> {
|
||||
public TitlePlayerManager(ChatTitlesPlugin plugin) {
|
||||
super(plugin, StorageUtils.getInstance().getGson(), "data/", TitlePlayer.class);
|
||||
}
|
||||
|
||||
public TitlePlayer getTitlePlayer(UUID uuid) {
|
||||
if (!containsKey(uuid.toString())) {
|
||||
TitlePlayer titlePlayer = new TitlePlayer(uuid, new ArrayList<>(), null);
|
||||
addToCache(titlePlayer);
|
||||
}
|
||||
return getFromCache(uuid.toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user