use of reborncore.shields.json.ShieldJsonFile in project RebornCore by TechReborn.
the class ShieldTextureStore method load.
public static void load() {
ShieldJsonFile file = ShieldJsonLoader.shieldJsonFile;
if (file != null) {
for (ShieldUser user : file.userList) {
boolean isCustomTexture = false;
String name = user.username;
if (!user.textureName.isEmpty()) {
name = user.textureName;
isCustomTexture = true;
}
if (isCustomTexture) {
ShieldTexture texture;
if (customTextures.containsKey(name)) {
texture = customTextures.get(name);
} else {
texture = new ShieldTexture(RebornCore.WEB_URL + "reborncore/textures/" + name + ".png");
customTextures.put(name, texture);
}
textures.put(user.username, texture);
} else {
textures.put(user.username, new ShieldTexture(RebornCore.WEB_URL + "reborncore/textures/" + user.username + ".png"));
}
}
}
}
Aggregations