NEZNAMY / TAB

"That" TAB plugin.
Apache License 2.0
897 stars 243 forks source link

Disconnection of player on bungeecord #172

Closed Elikill58 closed 4 years ago

Elikill58 commented 4 years ago

Server version 1.8.9 (v1_8_R3)

Plugin version ("latest" is not a version) 5.7.7 (download 10 minutes ago)

Describe the bug I'm using Bungeecord. I have a plugin on spigot which add a scoreboard. With TabAPI, some player can be kicked 30 seconds after they connect to the spigot player.

How to reproduce I'm using this API: https://github.com/SamaGames/SamaGamesAPI/blob/master/src/main/java/net/samagames/tools/scoreboards/

Question I'm currently using my own Scoreboard API. But i don't know which scoreboard system is compatible with TabAPI system, so if you know one of them, tell me ! Finally, will you add a Scoreboard API in your plugin ? :)

Additional info (errors, screenshots, ...) This is the error (on bungeecord) :

[Eliocrafteur] <-> DownstreamBridge <-> [MyServer] - encountered exception java.lang.IllegalArgumentException: Objective sidebar1 already exists in this scoreboard at com.google.common.base.Preconditions.checkArgument(Preconditions.java:191) at net.md_5.bungee.api.score.Scoreboard.addObjective(Scoreboard.java:55) at net.md_5.bungee.connection.DownstreamBridge.handle(DownstreamBridge.java:149) at net.md_5.bungee.protocol.packet.ScoreboardObjective.handle(ScoreboardObjective.java:67) at net.md_5.bungee.netty.HandlerBoss.channelRead(HandlerBoss.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:748)

NEZNAMY commented 4 years ago

Objective sidebar1 already exists in this scoreboard this name does not come from TAB. Plugin has scoreboard API.

Elikill58 commented 4 years ago

yes, my plugin create the scoreboard named "sidebar" (then a number according to player). Really ? I didn't find it (and it's not see in spigotmc main page) (Just, I'm talking to the scoreboard on the right)

(And thanks you for quick reply !)

NEZNAMY commented 4 years ago

TABAPI.createScoreboard(String title, List lines) Then you can use methods in the interface it returns.

Elikill58 commented 4 years ago

Ok thanks you ! What is the update time recommanded ? each 10 ticks ?

NEZNAMY commented 4 years ago

10 ticks is fine. Make sure you set 10 ticks not milliseconds.

Elikill58 commented 4 years ago

I have an error while calling TABAPI.createScoreboard : Task #2 for MyPlugin v1.0.1 generated an exception java.lang.NullPointerException at me.neznamy.tab.api.TABAPI.createScoreboard(TABAPI.java:238) ~[?:?]

NEZNAMY commented 4 years ago

Are you sure you have scoreboard feature enabled?

Elikill58 commented 4 years ago

Oh, sorry I forget it. Now i have a new problem. There is a "method" refresh, but we cannot send easily the new lines. Like i'm sure that i don't need to use reflection, how can I update lines ? I tried to update the list, but in the source code, it see to be copied so ...

NEZNAMY commented 4 years ago

The scoreboard API is very limited as everyone who requested it somehow got lost. I will add more in the future.

Elikill58 commented 4 years ago

So there is no real way to update it ?

NEZNAMY commented 4 years ago

Use placeholders. Their output can be controlled.

Elikill58 commented 4 years ago

Thanks you ! It works very well :) I close the issue :)