Animated-TabList

Animated-TabList

65.2k Downloads

Scoreboard objective of PingTab is already exists

Aadi-mone opened this issue ยท 12 comments

commented

Type of bug

Error in console

TabList version

the latest version u just launched today

Software version

PapperMC 1.16.5

Relevant plugins

just that plugin

Console error (if applicable)

No response

TabList configuration files

i didn't change anything installed and started the server and got the error

Bug description

[19:03:19 WARN]: [TabList] Plugin TabList v5.5.7 generated an exception while executing task 3328
java.lang.IllegalArgumentException: An objective of name 'PingTab' already exists
        at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:47) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:84) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:62) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:30) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:20) ~[patched_1.16.5.jar:git-Paper-786]
        at hu.montlikadani.tablist.bukkit.Objects.lambda$startTask$2(Objects.java:82) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.5.jar:git-Paper-786]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.5.jar:git-Paper-786]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
        at java.lang.Thread.run(Thread.java:831) [?:?]
[19:03:19 WARN]: [TabList] Plugin TabList v5.5.7 generated an exception while executing task 3329
java.lang.IllegalArgumentException: An objective of name 'PingTab' already exists
        at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:47) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:84) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:62) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:30) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:20) ~[patched_1.16.5.jar:git-Paper-786]
        at hu.montlikadani.tablist.bukkit.Objects.lambda$startTask$2(Objects.java:82) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.5.jar:git-Paper-786]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.5.jar:git-Paper-786]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
        at java.lang.Thread.run(Thread.java:831) [?:?]
[19:03:19 WARN]: [TabList] Plugin TabList v5.5.7 generated an exception while executing task 3330
java.lang.IllegalArgumentException: An objective of name 'PingTab' already exists
        at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:47) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:84) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:62) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:30) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scoreboard.CraftScoreboard.registerNewObjective(CraftScoreboard.java:20) ~[patched_1.16.5.jar:git-Paper-786]
        at hu.montlikadani.tablist.bukkit.Objects.lambda$startTask$2(Objects.java:82) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.16.5.jar:git-Paper-786]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.5.jar:git-Paper-786]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.5.jar:git-Paper-786]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
        at java.lang.Thread.run(Thread.java:831) [?:?]
commented

thank you for helping and adding the version to spigot.

commented

Disable tablist objectives option temporarily in config file.

commented

can you say which part? or thing itself.

commented

tablist-object-type:
enable: true

commented

Keep this issue opened, this exception still was not fixed for others. We need to investigate this, but without reproduction I can't do too much thing. I also don't understand how this exception thrown (even it is checked that the scoreboard objective is exist or not).

commented

okay, but is there anything in which I can help?
or I leave this thread, and you'll take care?

commented

If you're a developer, you can open a PR at any time, if you have any fix for the current TL code.

Anyway, the exception is refers to this line:

Objective object = getObject(player.getScoreboard()).orElse(null);
if (object == null) {
object = player.getScoreboard().registerNewObjective(ConfigValues.getObjectType().objectName,
"dummy");

As it can be seen that the scoreboard objective registration is called once if the objective is not exists, if exist it will not registers a new one with the corresponding name. But the player's scoreboard somehow returns that the objective is not registered, so it returns null.

commented

I'm not a java developer ๐Ÿ˜…
and as a normal human, this plugin has a scoreboard also? if yes I think it's not needed.
and if you know the problem is on the code it self then you can remove that part?
and sorry if I am wrong as I don't know java.
thanking you
Adarsh.

commented

The above attached commit will "hopefully" fixes this issue. You will be able to test in the next release.

commented

nice, what about #291

commented

It is not related to this issue

commented

ok i'll talk there