Upload18 4e03df7f25d64f6db683ff448ef5875f
이해도 | 중급자 |
---|---|
게임버전 (JE) | 1.18.2 |
게임버전 (BE) | 관련없음 |
플러그인을 만들고 적용시켜 실행 시켰으나 Error occurred while enabling라며 플러그인이 비활성화 됩니다.
아래는 오류 전문입니다.
[01:12:34 ERROR]: Error occurred while enabling VoteSystem v0.1 (Is it up to date?)
java.lang.NullPointerException: null
at java.util.Objects.requireNonNull(Objects.java:208) ~[?:?]
at com.upload18.votesystem.VoteSystem.onEnable(VoteSystem.java:15) ~[VoteSystem.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:541) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:560) ~[paper-1.18.2.jar:git-Paper-379]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:474) ~[paper-1.18.2.jar:git-Paper-379]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.reload(CraftServer.java:1016) ~[paper-1.18.2.jar:git-Paper-379]
at org.bukkit.Bukkit.reload(Bukkit.java:909) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:54) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906) ~[paper-1.18.2.jar:git-Paper-379]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2307) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2118) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2099) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.2.jar:git-Paper-379]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1400) ~[paper-1.18.2.jar:git-Paper-379]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[paper-1.18.2.jar:git-Paper-379]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1377) ~[paper-1.18.2.jar:git-Paper-379]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1370) ~[paper-1.18.2.jar:git-Paper-379]
at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[?:?]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1504) ~[paper-1.18.2.jar:git-Paper-379]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1226) ~[paper-1.18.2.jar:git-Paper-379]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.18.2.jar:git-Paper-379]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
VoteSystem.java입니다.
package com.upload18.votesystem; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; import java.util.Objects; public final class VoteSystem extends JavaPlugin { @Override public void onEnable() { getLogger().info("┌------------------------------------------┐"); getLogger().info("Upload18 - VoteSystem has load successfully"); getLogger().info("└------------------------------------------┘"); Objects.requireNonNull(getCommand("투표")).setExecutor(new OpenUI()); Bukkit.getPluginManager().registerEvents(new ClickVote(), this); } @Override public void onDisable() { // Plugin shutdown logic } }
plugin.yml입니다.
name: VoteSystem version: 0.1 main: com.upload18.votesystem.VoteSystem api-version: 1.18 commands: 투표: description: ㅇㅇ
qsef1256
2023.02.02getCommand("투표")가 null 인 것 같네요, 명령어가 제대로 로드되지 않으면 null을 리턴한다는 데 솔직히 코드에서 큰 문제점을 발견하진 않았거든요. 한글 대신 영어로 한번 해보세요.