randombyte-developer / holograms

A Sponge plugin
https://ore.spongepowered.org/RandomByte/Holograms
GNU General Public License v2.0
6 stars 2 forks source link

Bungeecord/variable integration #9

Closed Yorkforce closed 6 years ago

Yorkforce commented 7 years ago

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?

randombyte-developer commented 7 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?

Yorkforce commented 7 years ago

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

randombyte-developer commented 7 years ago

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.

Eufranio commented 7 years ago

So, are you going to port/create PlaceholderAPI?

Eufranio commented 7 years ago

Hmmm, looks like there is already one: https://ore.spongepowered.org/rojo8399/PlaceholderAPI You just need to add compatibility.

randombyte-developer commented 7 years ago

Yeah, I wasn't sure if it will be developed further. I'll see how the development goes on and then add compatibility.

randombyte-developer commented 7 years ago

@Eufranio @Yorkforce I am awaiting a response: https://forums.spongepowered.org/t/notebook-placeholderapi-a-hub-for-your-placeholders/16200/27?u=randombyte

randombyte-developer commented 7 years ago

https://github.com/rojo8399/PlaceholderAPI/issues/12

linkinkov commented 7 years ago

How about add PlaceholderAPI compatibility?

randombyte-developer commented 7 years ago

I might do it in the future.

randombyte-developer commented 6 years ago

@linkinkov @Eufranio @Yorkforce

Resolved by this plugin, which hooks into Holograms: https://ore.spongepowered.org/happyzlife/HologramsPlus