BungeeTabListPlus
BungeeTabListPlus copied to clipboard
Weird errors while loading tablists
18:21:21 [WARNING] [BungeeTabListPlus] There have been 65 warnings while loading plugins/BungeeTabListPlus/tabLists/tab.yml WARNING: Error in placeholder ${viewer arenaAttackingPlayers-1}: Unknown placeholder in 'reader', line 209, column 10: - {text: "${viewer arenaAttackingPlayers-1}"} ^
Whats that? Newest build Config with tab: components:
- {text: "${viewer arenaAttackingPlayers-1}"}
If that placeholder actually works then the plugin will remember that after the first time someone visits the server with that placeholder and you won't see the warning again.
@CodeCrafter47 ye I think it works but why the warning?
I want to print warning when people misspell placeholders. Unfortunately the plugins doesn't know about all of the placeholders when loading the config - so there might be some false warnings. However any placeholders from the bridge plugin and PlaceholderAPI which the plugin figures out to actually work it will remember and not print the warning anymore next time you restart the server.
@CodeCrafter47 can you tell me what to change exactly so i can refresh variables every 3 seconds for example? Why do you need task every 2 ticks? Also how do you determine playerset from redis now?
The bukkit bridge refreshes variables every second: https://github.com/CodeCrafter47/BungeeTabListPlus/blob/master/bukkit/src/main/java/codecrafter47/bungeetablistplus/bukkitbridge/BukkitBridge.java#L132.
Redis code is all in https://github.com/CodeCrafter47/BungeeTabListPlus/blob/master/bungee/src/main/java/codecrafter47/bungeetablistplus/managers/RedisPlayerManager.java.
@CodeCrafter47 it updates variable immedietely... how to check what playercount is getting from redisbungee or global?
it updates variable immedietely...
If you think somethings wrong please describe in detail the behavior you observe.
how to check what playercount is getting from redisbungee or global?
You want to do that for debugging or to display it on the tab list? For debugging I recommend using commands provided by BungeeCord and RedisBungee. To display it on the tab list - have a look at the wiki page on displaying player counts and use the redisbunge proxy id placeholder to create the player sets you need.
@CodeCrafter47 where is the code from getting playercount from redis or global? It was before in Placeholder class When I change to 60 ticks variables still updates right away..
Player counts are updated whenever a player joins/ leaves the server. Note that the plugin only updates the slot where you display the player count. So it is very efficient.
Also a large chunk of code has been moved to the following repository: https://github.com/CodeCrafter47/TabOverlayCommon/.
Code keeping track of players is in the following package: https://github.com/CodeCrafter47/TabOverlayCommon/tree/master/src/main/java/de/codecrafter47/taboverlay/config/player
The code for parsing the player set placeholder is in https://github.com/CodeCrafter47/TabOverlayCommon/blob/master/src/main/java/de/codecrafter47/taboverlay/config/placeholder/PlayerSetPlaceholderResolver.java
@CodeCrafter47 I want to create custom placeholder to get playcount from redis how can I do that can you tell me? BTW. Variables refresh too fast even with ticks set to 60.
If you display a player count as explained on the following wiki page it will include all players on other proxies (assuming your RedisBungee is set up correctly): https://github.com/CodeCrafter47/BungeeTabListPlus/wiki/Configuration-Basics-Part-4---Player-sets.
Variables refresh too fast even with ticks set to 60
Which ones? How do you notice looking at the tab list or do you have some debug output in your custom variable code (if that's what you're doing)?
@CodeCrafter47 i'm looking at the tablist and custom variables created by bukkit plugins. How to create variable like that but with player count? https://github.com/CodeCrafter47/BungeeTabListPlus/blob/4688e62d6a990aae7321214a218c45b6a89fc74a/bungee/src/main/java/codecrafter47/bungeetablistplus/data/BTLPBungeeDataKeys.java#L39
@CodeCrafter47 i'm looking at the tablist and custom variables created by bukkit plugins.
That shouldn't be the case. I'll check it out tomorrow.
How to create variable like that but with player count?
Just don't. Use ${playerset:all_players size}
to display the number of players. This works with RedisBungee.
@CodeCrafter47 I'm creating a little bit complicated thing and this system isn't working for me, is there a way to create 1 variable specifically for redisbungee player count?
I'm fairly certain the system would work for you - but if you must do you own thing I won't stop you. BungeeTabListPlus has an API for adding custom variables on BungeeCord which works quite similar to the one on Bukkit. You can use that.
@CodeCrafter47
java.lang.NoClassDefFoundError: codecrafter47/bungeetablistplus/api/bungee/ServerVariable
Caused by: java.lang.ClassNotFoundException: codecrafter47.bungeetablistplus.api.bungee.ServerVariable
BungeeTabListPlusAPI.registerVariable(this, new PlayerCountVariable("redis-player-count"));
Please follow the instructions on the wiki on using the API: https://github.com/CodeCrafter47/BungeeTabListPlus/wiki/Developers#bungee-side-api.
@CodeCrafter47 22:26:55 [WARNING] Circular dependency detected: RedisBungee -> BungeeTabListPlus -> RedisBungee 22:26:55 [WARNING] BungeeTabListPlus (required by RedisBungee) is unavailable 22:26:55 [WARNING] Failed to enable RedisBunge
I think the error message there is kind of self explanatory.
@CodeCrafter47 not really, can you tell how to fix that? Addind depends to Redisbungee or BTLP doesn't work. It shows this warning or ClassNotFoundException
That's because BTLP depends on RedisBungee. Thus RedisBungee cannot depend on BTLP. If you make RedisBungee depend on BTLP then you got a circular dependency. Which BungeeCord even explains to you with this illustration: RedisBungee -> BungeeTabListPlus -> RedisBungee
.
A dependency declaration is used to tell BungeeCord which plugin to load first. If RedisBungee needs to be loaded before BTLP and BTLP needs to be loaded before RedisBungee, then that's kind of a problem, which BungeeCord solves by not loading redisbungee.
I've just tested the update interval of variables registered using the BukkitBridge API. I've created a variable that displays the result of System.currentTimeMillis
. Since that changes every millisecond it's easy to observe how often it is updated on the tab list. I've tried this with both the player and the server variables. In both cases the variable was updated once every second.
public String getReplacement(Player player) {
return System.currentTimeMillis()+"";
}
@CodeCrafter47 ye I solved that by adding this to another plugin. Every second, if you change in bukkit to 60 ticks it still updates too fast.
I've just tested that too. If I change the period in the line I've indicated to you to 60 ticks it updates exactly every 3 seconds.
@CodeCrafter47 it works for me too now.
@CodeCrafter47 java.lang.IllegalArgumentException: Unsupported size 80
Can you give me a bit more context. What are doing? Which version of minecraft?
@CodeCrafter47 how to change refresh time of bungee variables?
https://github.com/CodeCrafter47/BungeeTabListPlus/blob/master/bungee/src/main/java/codecrafter47/bungeetablistplus/managers/DataManager.java#L90