Emotecraft bukkit

Emotecraft bukkit

16.2k Downloads

emotecraft_emote_map.json path error

okada-laboratory opened this issue ยท 1 comments

commented

I'm using emotecraft-2.1.3-SNAPSHOT-16c705d-bukkit.jar with purpur-1.19.1-1749.jar.
Maybe "configPath.resolve" should be "configPath.resolveSibling" in AbstractServerEmotePlay.java.

server log:
[Server thread/INFO]: [emotecraft] Enabling emotecraft v2.1.3-SNAPSHOT-16c705d
[Server thread/WARN]: java.nio.file.FileSystemException: config/emotecraft.json/emotecraft_emote_map.json: (translated it is not a directory)
...

diff --git a/emotesServer/src/main/java/io/github/kosmx/emotes/server/network/AbstractServerEmotePlay.java b/emotesServer/src/main/java/io/github/kosmx/emotes/server/network/AbstractServerEmotePlay.java
index 82bb6c2..ae00c57 100644
--- a/emotesServer/src/main/java/io/github/kosmx/emotes/server/network/AbstractServerEmotePlay.java
+++ b/emotesServer/src/main/java/io/github/kosmx/emotes/server/network/AbstractServerEmotePlay.java
@@ -52,7 +52,7 @@ public abstract class AbstractServerEmotePlay<P> extends ServerEmoteAPI {
     }

     public void initMappings(Path configPath) throws IOException{
-        Path filePath = configPath.resolve("emotecraft_emote_map.json");
+        Path filePath = configPath.resolveSibling("emotecraft_emote_map.json");
         if(filePath.toFile().isFile()){
             BufferedReader reader = Files.newBufferedReader(filePath);
             try {

commented

Noted.
Thanks!