ArcanePlugins / LevelledMobs

Level-up mobs on your Spigot/Paper server, RPG-style!
https://www.spigotmc.org/resources/levelledmobs.74304/
GNU Affero General Public License v3.0
213 stars 43 forks source link

Add 'primary label' system to LM4 API #415

Open lokka30 opened 2 years ago

lokka30 commented 2 years ago

On the ArcanePlugins Discord Server, there is a discussion on how this will be implemented.

This will provide compatibility for ItemsAdder (https://github.com/PluginBugs/Issues-ItemsAdder/issues/1116) and also some plugins by AlonsoAliaga, among others we are unaware of.

- action: 'set-packet-label'
  formula: 'Lvl.%entity-level% %entity-name%'
  primary: true
- action: 'set-boss-bar-label'
  formula: 'Lvl.%entity-level% %entity-name%'
 #primary: false
lokka30 commented 1 year ago

Done. However, this will not suffice for plugins like ItemsAdder – I will need to make them able to retrieve the formatted version of the primary label, not just the formula it uses. I've listed this as a to-do in #345.

LoneDev6 commented 1 year ago

Hello @lokka30 , is this still relevant https://github.com/PluginBugs/Issues-ItemsAdder/issues/1116 ?

lokka30 commented 1 year ago

Hello @lokka30 , is this still relevant PluginBugs/Issues-ItemsAdder#1116 ?

Hi @LoneDev6, absolutely - although no progress on this issue since the last comment.

Whilst you're here - is it all good if LevelledMobs gives you a way to access the current Adventure component (in JSON format) of the name tag / label it is displaying?

On another note, recently we switched to using a packet listener approach, where we modify outgoing packets instead of sending them periodically. Could this cause any issues with ItemsAdder?

Re-opening this issue, since I forgot to transfer it to another to-do list. Issue management is hard when re-writing large projects!

LoneDev6 commented 1 year ago

On another note, recently we switched to using a packet listener approach, where we modify outgoing packets instead of sending them periodically. Could this cause any issues with ItemsAdder?

I don't see how, so I won't bother

Anyway I think that this issue can be closed since no one uses the old itemsadder mobs creation method. The new method to create mobs doesn't allow adding display names on mobs so the issue won't be reproducible anymore, I think.

The old issue, if I recall, was about the fact that levelled mobs nametag was visible underground, so people can spot mobs like they would do with an xray mod.

lokka30 commented 1 year ago

On another note, recently we switched to using a packet listener approach, where we modify outgoing packets instead of sending them periodically. Could this cause any issues with ItemsAdder?

I don't see how, so I won't bother

Anyway I think that this issue can be closed since no one uses the old itemsadder mobs creation method. The new method to create mobs doesn't allow adding display names on mobs so the issue won't be reproducible anymore, I think.

The old issue, if I recall, was about the fact that levelled mobs nametag was visible underground, so people can spot mobs like they would do with an xray mod.

Ok - we can close the issue on the ItemsAdder repository, though this one will still be implemented since it has been requested by another developer as well.