java.lang.IllegalArgumentException: Plugin already initialized. What's going on?

后端 未结 3 957
生来不讨喜
生来不讨喜 2021-01-29 08:50

When I\'m testing my new plugin an exception keeps getting thrown: java.lang.IllegalArgumentException: Plugin already initialized! Please help! Here\'s the code:



        
3条回答
  •  有刺的猬
    2021-01-29 09:37

    I would really recommend you to put your event handler in a separate class.

    Try removing the below line

    getServer().getPluginManager().registerEvents(new Main(), this);
    

    and please don't ask your question several times.

提交回复
热议问题