이해도 | 초보자 |
---|---|
게임버전 (JE) | 관련없음 |
게임버전 (BE) | 관련없음 |
로그 :
Error occurred while enabling weaponforge v0.1+alpha_1.21.1 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.bukkit.Server.getPluginCommand(String)" is null
at Weaponforge-0.1+alpha_1.21.1.jar/me.bestnice.weaponforge.user.controller.Management.registerCommands(Management.java:49) ~[Weaponforge-0.1+alpha_1.21.1.jar:?]
at Weaponforge-0.1+alpha_1.21.1.jar/me.bestnice.weaponforge.user.controller.Management.<init>(Management.java:36) ~[Weaponforge-0.1+alpha_1.21.1.jar:?]
at Weaponforge-0.1+alpha_1.21.1.jar/me.bestnice.weaponforge.Weaponforge.onEnable(Weaponforge.java:17) ~[Weaponforge-0.1+alpha_1.21.1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:640) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:589) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:753) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:515) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:329) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1214) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
프로젝트 생성할 때는 Intellij 플러그인을 사용했습니다(Minecraft Development 1.8.2(Old Wizard 아님)), (페이퍼 1.21.1) (인텔리제이 2024.2.3)
이 코드의 작동 방식은 대충 알고 있는데, 왜 이런 일이 생기는지는 모르겠네요. 빌드할 때도 별다른 거 안 뜨고 Successfull 떴는데... paper-plugin.yml파일도 잘 작성해주었습니다. (4번째 사진)
+ 추가
[17:57:03 ERROR]: Error occurred while disabling weaponforge v0.1+alpha_1.21.1
java.lang.NullPointerException: Cannot invoke "me.bestnice.weaponforge.user.controller.Management.saveUserData()" because "me.bestnice.weaponforge.Weaponforge.management" is null
at Weaponforge-0.1+alpha_1.21.1.jar/me.bestnice.weaponforge.Weaponforge.onDisable(Weaponforge.java:27) ~[Weaponforge-0.1+alpha_1.21.1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:291) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:237) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugin(PaperPluginManagerImpl.java:114) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:550) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:206) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:640) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:589) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:753) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:515) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:329) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1214) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.1.jar:1.21.1-122-4430e96]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
제가 이 플러그인의 HashMap 데이터를 Configuration API를 이용해서 저장하는 방식을 사용했는데, 여기서도 오류가 나네요...
노을넴
2024.10.181.13때 새로 추가된 Mojang Brigadier라는 명령어 API를 사용해 보시는건 어떨까욘? https://docs.papermc.io/paper/dev/command-api/commands
클리어고딕
2024.10.18기존에 쓰는 명령어 API와는 무슨 차이가 있죠? 제가 입문한지 1달 정도밖에 안 된 학생이라서;;
노을넴
2024.10.18일단 저 Bukkit 명령어 API는 Beta 1.5_02부터 쓰던 아주 오래된 API이고, 현재는 잘 사용되지 않는 것이에욘
노을넴
2024.10.19Mojang Brigadier는 빌더 형태로 명령어를 쉽게 작성할 수 있는 API인 것이에욘
클리어고딕
29 일 전Config에는 무슨 문제가 있어서 오류가 뜬 거죠? 일단 Command는 수정해보겠슴당