diff --git a/api/src/main/java/de/oliver/fancynpcs/api/skins/SkinData.java b/api/src/main/java/de/oliver/fancynpcs/api/skins/SkinData.java index 28049803..3a29b102 100644 --- a/api/src/main/java/de/oliver/fancynpcs/api/skins/SkinData.java +++ b/api/src/main/java/de/oliver/fancynpcs/api/skins/SkinData.java @@ -54,6 +54,6 @@ public void setTextureSignature(String textureSignature) { public enum SkinVariant { AUTO, SLIM, - DEFAULT + CLASSIC } } diff --git a/src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java b/src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java index 4d0efc73..7cd3105d 100644 --- a/src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java +++ b/src/main/java/de/oliver/fancynpcs/NpcManagerImpl.java @@ -283,7 +283,7 @@ public void loadNpcs() { String signature = npcConfig.getString("npcs." + id + ".skin.signature"); if (value != null && !value.isEmpty() && signature != null && !signature.isEmpty()) { - SkinData oldSkin = new SkinData(skinIdentifier, SkinData.SkinVariant.DEFAULT, value, signature); + SkinData oldSkin = new SkinData(skinIdentifier, SkinData.SkinVariant.CLASSIC, value, signature); FancyNpcs.getInstance().getSkinManagerImpl().getFileCache().addSkin(oldSkin); FancyNpcs.getInstance().getSkinManagerImpl().getMemCache().addSkin(oldSkin); } diff --git a/src/main/java/de/oliver/fancynpcs/skins/SkinManagerImpl.java b/src/main/java/de/oliver/fancynpcs/skins/SkinManagerImpl.java index c5b29334..77b25361 100644 --- a/src/main/java/de/oliver/fancynpcs/skins/SkinManagerImpl.java +++ b/src/main/java/de/oliver/fancynpcs/skins/SkinManagerImpl.java @@ -105,7 +105,7 @@ public SkinData getByUUID(UUID uuid, SkinData.SkinVariant variant) { SkinData skinData = new SkinData( uuid.toString(), - SkinData.SkinVariant.DEFAULT, + SkinData.SkinVariant.CLASSIC, skinInfo.texture().data().value(), skinInfo.texture().data().signature() ); @@ -133,7 +133,7 @@ public SkinData getByUsername(String username, SkinData.SkinVariant variant) { SkinData skinData = new SkinData( uuid.toString(), - SkinData.SkinVariant.DEFAULT, + SkinData.SkinVariant.CLASSIC, skinInfo.texture().data().value(), skinInfo.texture().data().signature() ); @@ -166,7 +166,7 @@ public SkinData getByURL(String url, SkinData.SkinVariant variant) { SkinData skinData = new SkinData( url, - SkinData.SkinVariant.DEFAULT, + SkinData.SkinVariant.CLASSIC, skinInfo.texture().data().value(), skinInfo.texture().data().signature() ); @@ -198,7 +198,7 @@ public SkinData getByFile(String filePath, SkinData.SkinVariant variant) { SkinData skinData = new SkinData( filePath, - SkinData.SkinVariant.DEFAULT, + SkinData.SkinVariant.CLASSIC, skinInfo.texture().data().value(), skinInfo.texture().data().signature() ); diff --git a/src/main/java/de/oliver/fancynpcs/skins/cache/SkinCacheFile.java b/src/main/java/de/oliver/fancynpcs/skins/cache/SkinCacheFile.java index 93745a9a..056526ed 100644 --- a/src/main/java/de/oliver/fancynpcs/skins/cache/SkinCacheFile.java +++ b/src/main/java/de/oliver/fancynpcs/skins/cache/SkinCacheFile.java @@ -11,7 +11,7 @@ public class SkinCacheFile implements SkinCache { private final JDB storage; public SkinCacheFile() { - this.storage = new JDB("plugins/FancyNpcs/.skinCache"); + this.storage = new JDB("plugins/FancyNpcs/.cache"); } @Override diff --git a/src/main/java/de/oliver/fancynpcs/tests/impl/api/skin/SkinManagerTest.java b/src/main/java/de/oliver/fancynpcs/tests/impl/api/skin/SkinManagerTest.java index a1334e45..bd86d9b6 100644 --- a/src/main/java/de/oliver/fancynpcs/tests/impl/api/skin/SkinManagerTest.java +++ b/src/main/java/de/oliver/fancynpcs/tests/impl/api/skin/SkinManagerTest.java @@ -28,7 +28,7 @@ public void testSkinByUUID(Player player) { expect(skin).toBeDefined(); expect(skin.getIdentifier()).toEqual(player.getUniqueId().toString()); - expect(skin.getVariant()).toEqual(SkinData.SkinVariant.DEFAULT); + expect(skin.getVariant()).toEqual(SkinData.SkinVariant.CLASSIC); expect(skin.getTextureValue()).toBeDefined(); expect(skin.getTextureValue().length()).toBeGreaterThan(0); expect(skin.getTextureSignature()).toBeDefined(); @@ -41,7 +41,7 @@ public void testSkinByUsername(Player player) { expect(skin).toBeDefined(); expect(skin.getIdentifier()).toEqual(player.getName()); - expect(skin.getVariant()).toEqual(SkinData.SkinVariant.DEFAULT); + expect(skin.getVariant()).toEqual(SkinData.SkinVariant.CLASSIC); expect(skin.getTextureValue()).toBeDefined(); expect(skin.getTextureValue().length()).toBeGreaterThan(0); expect(skin.getTextureSignature()).toBeDefined(); @@ -53,7 +53,7 @@ public void testSkinByURL(Player player) { expect(skin).toBeDefined(); expect(skin.getIdentifier()).toEqual("https://s.namemc.com/i/de7d8a3ffd1f584c.png"); - expect(skin.getVariant()).toEqual(SkinData.SkinVariant.DEFAULT); + expect(skin.getVariant()).toEqual(SkinData.SkinVariant.CLASSIC); expect(skin.getTextureValue()).toBeDefined(); expect(skin.getTextureValue().length()).toBeGreaterThan(0); expect(skin.getTextureSignature()).toBeDefined(); @@ -67,7 +67,7 @@ public void testSkinByFile(Player player) { expect(skin).toBeDefined(); expect(skin.getIdentifier()).toEqual("plugins/FancyNpcs/testskin.png"); - expect(skin.getVariant()).toEqual(SkinData.SkinVariant.DEFAULT); + expect(skin.getVariant()).toEqual(SkinData.SkinVariant.CLASSIC); expect(skin.getTextureValue()).toBeDefined(); expect(skin.getTextureValue().length()).toBeGreaterThan(0); expect(skin.getTextureSignature()).toBeDefined(); @@ -75,15 +75,4 @@ public void testSkinByFile(Player player) { new File("plugins/FancyNpcs/testskin.png").delete(); } - - @FNTest(name = "Test get skin") - public void testGetSkin(Player player) { - SkinData skin = skinFetcher.get("skinname", "value", "signature", SkinData.SkinVariant.AUTO); - - expect(skin).toBeDefined(); - expect(skin.getIdentifier()).toEqual("skinname"); - expect(skin.getVariant()).toEqual(SkinData.SkinVariant.DEFAULT); - expect(skin.getTextureValue()).toEqual("value"); - expect(skin.getTextureSignature()).toEqual("signature"); - } }