WolfyScript / CustomCrafting

Spigot based plugin to create your own custom Recipes & Items. Designed to be easy to use with in-game GUI and tons of configuration possibilities.
https://modrinth.com/plugin/customcrafting
GNU General Public License v3.0
113 stars 36 forks source link

The plugin does not work well in Windows system #205

Closed xiaofan7520 closed 1 year ago

xiaofan7520 commented 1 year ago

What happened?

If the recipe file is not in the root path, any form of reload will cause the plugin to crash. Only on Windows system.

How can the bug be reproduced?

1,Create a recipe using a clean configuration file, for example: data/"Your namespace"/recipes/"Any file name"/"Any recipe".conf 2,Start the server using a Windows system.

Expected Behaviour?

Normal loading

Plugin version

customcrafting-spigot-4.16.3.2

Server software

paper 1.19.3-367

Relevant log output

[20:17:32] [Server thread/INFO]: [CustomCrafting] Enabling CustomCrafting v4.16.3.2
[20:17:32] [Server thread/INFO]: [CustomCrafting] ____ _  _ ____ ___ ____ _  _ ____ ____ ____ ____ ___ _ _  _ ____ 
[20:17:32] [Server thread/INFO]: [CustomCrafting] |    |  | [__   |  |  | |\/| |    |__/ |__| |___  |  | |\ | | __ 
[20:17:32] [Server thread/INFO]: [CustomCrafting] |___ |__| ___]  |  |__| |  | |___ |  \ |  | |     |  | | \| |__]
[20:17:32] [Server thread/INFO]: [CustomCrafting]     Version    | v4.16.3.2
[20:17:32] [Server thread/INFO]: [CustomCrafting]     WolfyUtils | v4.16.9.6
[20:17:32] [Server thread/INFO]: [CustomCrafting]     Bukkit     | git-Paper-367 (MC: 1.19.3)(API: 1.19.3-R0.1-SNAPSHOT)
[20:17:32] [Server thread/INFO]: [NBTAPI] [NBTAPI] Found Spigot: v1_19_R2! Trying to find NMS support
[20:17:32] [Server thread/INFO]: [NBTAPI] [NBTAPI] NMS support 'MC1_19_R2' loaded!
[20:17:32] [Server thread/INFO]: [NBTAPI] [NBTAPI] Found Gson: class com.google.gson.Gson
[20:17:32] [Server thread/INFO]: [CustomCrafting] 
[20:17:32] [Server thread/INFO]: [CustomCrafting] Special thanks to my Patrons for supporting this project: 
[20:17:32] [Server thread/INFO]: [CustomCrafting] Omarlatif, Nat R, Apprehentice, Junye Zhou, PwassonDoDouce, Mr_Mint_
[20:17:32] [Server thread/INFO]: [CustomCrafting] Mithran, Isabel Maskrey, Spunkerz, Teddy
[20:17:32] [Server thread/INFO]: [CustomCrafting] ------------------------------------------------------------------------
[20:17:32] [Server thread/INFO]: [CustomCrafting] Loaded fallback language "en_US" v6.1.0 translated by WolfyScript
[20:17:32] [Dynmap Render Thread/INFO]: [dynmap] Finish marker initialization
[20:17:32] [Server thread/INFO]: [CustomCrafting] Loaded active language "zh_CN" v6.0.0 translated by 肆零肆E
[20:17:32] [Server thread/INFO]: [CustomCrafting] Data destination: LOCAL
[20:17:32] [Server thread/INFO]: [CustomCrafting] 启动库存GUI
[20:17:32] [Server thread/INFO]: [CustomCrafting] Register ItemCreator Tabs
[20:17:33] [Thread-28/INFO]: [NBTAPI] [NBTAPI] The NBT-API seems to be up-to-date!
[20:17:33] [Server thread/INFO]: [CustomCrafting] ________[加载 配方/物品]________
[20:17:33] [Server thread/INFO]: [CustomCrafting] - - - - [Local Storage] - - - -
[20:17:33] [Server thread/INFO]: [CustomCrafting] [LOCAL] Looking through data folder...
[20:17:33] [Server thread/INFO]: [CustomCrafting] [LOCAL] ---------[物品]---------
[20:17:33] [Dynmap Render Thread/INFO]: [dynmap] Loading default resource pack
[20:17:33] [Server thread/INFO]: [CustomCrafting] [LOCAL] --------[配方]--------
[20:17:33] [Server thread/ERROR]: Error occurred while enabling CustomCrafting v4.16.3.2 (Is it up to date?)
java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9/._-]: lunatea/omnivision\1
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220) ~[guava-31.1-jre.jar:?]
    at me.wolfyscript.utilities.util.NamespacedKey$Key.<init>(NamespacedKey.java:249) ~[wolfyutils-spigot-4.16.9.6.jar:?]
    at me.wolfyscript.utilities.util.NamespacedKey.<init>(NamespacedKey.java:95) ~[wolfyutils-spigot-4.16.9.6.jar:?]
    at me.wolfyscript.customcrafting.handlers.LocalStorageLoader.keyFromFile(LocalStorageLoader.java:118) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.handlers.LocalStorageLoader$NewDataLoader.lambda$loadRecipesInNamespace$0(LocalStorageLoader.java:254) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.handlers.LocalStorageLoader$NamespaceFileVisitor.visitFile(LocalStorageLoader.java:393) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.handlers.LocalStorageLoader$NamespaceFileVisitor.visitFile(LocalStorageLoader.java:381) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at java.nio.file.Files.walkFileTree(Files.java:2810) ~[?:?]
    at java.nio.file.Files.walkFileTree(Files.java:2881) ~[?:?]
    at me.wolfyscript.customcrafting.handlers.LocalStorageLoader.readFiles(LocalStorageLoader.java:143) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.handlers.LocalStorageLoader$NewDataLoader.loadRecipesInNamespace(LocalStorageLoader.java:253) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.handlers.LocalStorageLoader$NewDataLoader.load(LocalStorageLoader.java:246) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.handlers.LocalStorageLoader.load(LocalStorageLoader.java:76) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.handlers.ResourceLoader.load(ResourceLoader.java:61) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.handlers.DataHandler.load(DataHandler.java:116) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.handlers.DataHandler.loadRecipesAndItems(DataHandler.java:126) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at me.wolfyscript.customcrafting.CustomCrafting.onEnable(CustomCrafting.java:355) ~[customcrafting-spigot-4.16.3.2.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:371) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:544) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugin(CraftServer.java:578) ~[paper-1.19.3.jar:git-Paper-367]
    at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugins(CraftServer.java:492) ~[paper-1.19.3.jar:git-Paper-367]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:635) ~[paper-1.19.3.jar:git-Paper-367]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:434) ~[paper-1.19.3.jar:git-Paper-367]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:301) ~[paper-1.19.3.jar:git-Paper-367]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.19.3.jar:git-Paper-367]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.19.3.jar:git-Paper-367]
    at java.lang.Thread.run(Thread.java:1589) ~[?:?]
[20:17:33] [Server thread/INFO]: [CustomCrafting] Disabling CustomCrafting v4.16.3.2

Submit issue