Elytrium / FastMOTD

A MOTD plugin for Velocity that caches network packets. This helps it be the fastest one of the MOTD plugins.
GNU Affero General Public License v3.0
63 stars 13 forks source link

Error when using multiple MOTD #3

Closed KungfuEpt closed 2 years ago

KungfuEpt commented 2 years ago

The version I used:

1.0.1 for jdk 17. Velocity the last version.

The problem:

After switching from 1.0.0 to 1.0.1, I got an error:

[00:12:42 ERROR]: Exception in task net.elytrium.fastmotd.FastMOTD$$Lambda$528/0x0000000801007510@6659d37c by plugin FastMOTD
java.lang.NullPointerException: Cannot invoke "net.elytrium.fastmotd.holder.MOTDHolder.replaceOnline(int, int)" because "holder" is null
        at net.elytrium.fastmotd.utils.MOTDGenerator.update(MOTDGenerator.java:125) ~[?:?]
        at net.elytrium.fastmotd.FastMOTD.updateMOTD(FastMOTD.java:198) ~[?:?]
        at com.velocitypowered.proxy.scheduler.VelocityScheduler$VelocityTask.lambda$run$1(VelocityScheduler.java:229) ~[velocity-161.jar:3.1.2-SNAPSHOT (git-e8bf6ab5-b161)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

After researching, I found out that this error gets out when using more than 1 motds.