HorseNuggets / TerminatorPlus

the epic plugin
Eclipse Public License 2.0
148 stars 53 forks source link

[Bug]: Something returning null #37

Open HyperSkys opened 3 years ago

HyperSkys commented 3 years ago

What happened?

Also fire damage is a crap ton faster than normal and also the bot is still there for a few seconds so it'll spam the death message like 5 times.

Error Code: [13:33:35] [Craft Scheduler Thread - 3/WARN]: [TerminatorPlus] Plugin TerminatorPlus v3.0-BETA generated an exception while executing task 356 java.util.ConcurrentModificationException: null at java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) ~[?:?] at java.util.HashMap$KeyIterator.next(HashMap.java:1516) ~[?:?] at net.nuggetmc.tplus.bot.BotManager.getBot(BotManager.java:156) ~[?:?] at net.nuggetmc.tplus.bot.agent.Agent.lambda$onBotKilledByPlayer$1(Agent.java:80) ~[?:?] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:81) ~[server.jar:3096-Spigot-9fb885e-296df56] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [server.jar:3096-Spigot-9fb885e-296df56] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:834) [?:?]

Plugin Version

3.0-BETA

Server Version

Spigot 1.16.5

Relevant log output

[13:33:35] [Craft Scheduler Thread - 3/WARN]: [TerminatorPlus] Plugin TerminatorPlus v3.0-BETA generated an exception while executing task 356
java.util.ConcurrentModificationException: null
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) ~[?:?]
        at java.util.HashMap$KeyIterator.next(HashMap.java:1516) ~[?:?]
        at net.nuggetmc.tplus.bot.BotManager.getBot(BotManager.java:156) ~[?:?]
        at net.nuggetmc.tplus.bot.agent.Agent.lambda$onBotKilledByPlayer$1(Agent.java:80) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:81) ~[server.jar:3096-Spigot-9fb885e-296df56]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [server.jar:3096-Spigot-9fb885e-296df56]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

[13:33:51] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:51] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:51] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:51] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:52] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:52] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:34:02] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:34:02] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys

Additional Context

No response

Checklist

HyperSkys commented 3 years ago

The fire damage stuff was on another thread but I had to mention that because it only sent 3 spam death messages every time they died just because of fire.

Legit4K commented 3 years ago

You can test my #35 PR, I fixed the fire damage, idk about the death msg part tho

Badbird5907 commented 3 years ago

I did mention fire damage on #24, you said you were using 3.0-BETA, can you try the newest one, 3.1-BETA

Badbird5907 commented 3 years ago

actually, try the newest update/commit and tell me if you still can reproduce the bug: https://cdn.badbird5907.net/TerminatorPlus-3.1-BETA-NEW.jar

HyperSkys commented 3 years ago

I tried it, it fixed the fire damage being very fast but the death message still sends about 2-5 times

HyperSkys commented 3 years ago

depends on the tps...

Badbird5907 commented 2 years ago

can't believe I didn't see this: ConcurrentModificationException... not a NPE