개인 자료란 (JE)

  서버 커뮤니티

Profile 업로드 대표칭호 없음

Upload18 4e03df7f25d64f6db683ff448ef5875f

Profile

질문하기 플러그인

Error occurred while enabling

2023.02.02 조회 수 200 추천 수 0
이해도 중급자 
게임버전 (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: ㅇㅇ



1개의 댓글

qsef1256
2023.02.02

getCommand("투표")가 null 인 것 같네요, 명령어가 제대로 로드되지 않으면 null을 리턴한다는 데 솔직히 코드에서 큰 문제점을 발견하진 않았거든요. 한글 대신 영어로 한번 해보세요.

뉴스 및 창작물
/files/thumbnails/761/908/003/262x150.crop.jpg?20241025153749

건축

서울 숭례문(崇禮門) 4

KHC

2024-10-25

2

/files/thumbnails/578/899/003/262x150.crop.jpg?20241010142350

건축

경주 월정교 1

KHC

2024-10-10

2

/files/thumbnails/219/899/003/262x150.crop.jpg?20241009200950

건축

송전탑+도시 2

dbasd12

2024-10-09

2

/files/thumbnails/246/898/003/262x150.crop.jpg?20241008102328

레드스톤

단다단 - 오토노케(オトノケ) | 마인크래프트 노트블럭 커버

노트블럭전문가

2024-10-08

1

/files/thumbnails/348/896/003/262x150.crop.jpg?20241006103035

디도스/봇테러등등을 낚는 방법 4

물귀신

2024-10-06

3