Closed Yorkforce closed 6 years ago
How I think the best way to generalise and realise would be:
There is a plugin called PlaceholderAPI. Plugins can provide values to the PAPI . In this case there would be a bungecoord plugin that counts all players. The data provided to PAPI would be like "bungeeOnlinePlayers" -> "42"
.
Then you can define a hologram text that uses a placeholder, here bungeeOnlinePlayers
. This placeholder gets resolved by the PAPI in an interval, like 5 seconds, and the hologram text is updated.
This way the whole idea is generalised and is extensible. The problem seems that PAPI doesn't receive further development, so I am thinking about creating a thing like that. This will be time consuming. I am going to update this issue what I am doing about it.
Thanks for the suggestion.
What do you mean by name tag?
That would be great if you could (regarding bungeecord hooks)
I am no doubt you are aware of the holograms plugin from bukkit? We used it extensively on our 1.7 network hub to display all sorts of things, welcome message, holograms above portals that displayed player counts, online status etc, we also had a hologram that listed all servers active on the network and the status of said servers, it was informative to the players and allowed us to relay all sorts of information.
In regards to the name tag, on the welcome message we used we had a 'Welcome {player}' entry which would display the name of the player who was looking at it This is basically all the variables that were included with that: https://dev.bukkit.org/projects/holographic-displays/pages/variables
Ah, on the page you linked above both entries with "requires ProtocolLib" won't work with pure Sponge. That plugin sends packets to the clients manually and can because of this modify it in knowledge of the receiver. This isn't intended to be possible in Sponge because packets often break on Minecraft updates. There is a somewhat protocol lib for sponge https://forums.spongepowered.org/t/utilities-a-collection-of-apis-to-make-coding-faster-and-simpler/14740 . It luckily has a hologram module for spawning holograms easily and it can even display GIFs. The problem I see is that it requires a specific minecraft version, it's the opposite Sponge wants to achieve. Sponge tries to make plugins keep working regardless of the minecraft version.
I am thinking about it.
So, are you going to port/create PlaceholderAPI?
Hmmm, looks like there is already one: https://ore.spongepowered.org/rojo8399/PlaceholderAPI You just need to add compatibility.
Yeah, I wasn't sure if it will be developed further. I'll see how the development goes on and then add compatibility.
@Eufranio @Yorkforce I am awaiting a response: https://forums.spongepowered.org/t/notebook-placeholderapi-a-hub-for-your-placeholders/16200/27?u=randombyte
How about add PlaceholderAPI compatibility?
I might do it in the future.
@linkinkov @Eufranio @Yorkforce
Resolved by this plugin, which hooks into Holograms: https://ore.spongepowered.org/happyzlife/HologramsPlus
Not an issue but a request
Any chance we could get hooks into bungeecord so we can add online/player counts text into the holograms? Also the ability to add {name} tags and such?