Fabricio20 / HubBasics

Bukkit Plugin For Hub Owners
GNU Lesser General Public License v3.0
22 stars 11 forks source link

Add Placeholder support to holograms #132

Open aj-rom opened 4 years ago

aj-rom commented 4 years ago

This allows PlaceholderAPI to hook onto the player adding/creating a hologram to register it before creation.

Fabricio20 commented 4 years ago

Hey, thanks for the contribution. I don't think this is going to work however.

Holograms are not rendered per-player, they are global, so the placeholder will be replaced upon creation and then will be visible for everyone else exactly the same (which won't make sense).

You can test this by creating a hologram with the player name placeholder (with your patch) and having a friend join (he will see your name instead of his).

aj-rom commented 4 years ago

Hey thanks for getting back so fast.

Do you know of any way to register a placeholder via the PlaceholderAPI using the Minecraft server?

The reason I forked was to allow our server to use %bungee_total% and some other server unique placeholders.

Although I don’t think there is currently a way to only register placeholder messages to a server and not a player. I did test this out and it’s working from what I can tell.

aj-rom commented 4 years ago

For example I know %player_name% would show up as whoever added a line or created the hologram, but having the ability to add other server placeholders might be useful.