LevelledMobs icon indicating copy to clipboard operation
LevelledMobs copied to clipboard

Add ability for other plugins to disable name tag system affecting certain mobs

Open lokka30 opened this issue 3 years ago • 8 comments

Can use a PersistentDataContainer value, or even Metadata. Other plugins should be able to set this value on specific mobs, and LM will not change the name tag of mobs which have this value set to true, e.g. LM_NoNametag or something like that - make sure it matches the format of the other PDC names, I haven't checked those in a long time.

lokka30 avatar Jul 27 '21 23:07 lokka30

added to 3.2.0 b511

stumper66 avatar Sep 08 '21 02:09 stumper66

I need to document this before it's solved

lokka30 avatar Sep 08 '21 08:09 lokka30

@lokka30 Updated the MobPrelevelEvent with a new function: https://github.com/lokka30/LevelledMobs/blob/3.2-dev/src/main/java/me/lokka30/levelledmobs/events/MobPreLevelEvent.java#L100

public void setShowLM_Nametag(final boolean doRemove)

stumper66 avatar Sep 08 '21 13:09 stumper66

Just realized the variable name doesn't make sense, so will update that on the next build

stumper66 avatar Sep 08 '21 13:09 stumper66

@stumper66

Please could you rename the method to public void setShouldShowLevelledNametag(final boolean state)?

also state being my suggested variable name since the method name already implies what the boolean is :)

lokka30 avatar Sep 08 '21 13:09 lokka30

I need to document this before it is closed

lokka30 avatar Oct 13 '21 22:10 lokka30

In LM 4 there will be a method in the LevelledMob class that allows plugins to just set a PDC value on the mob.

lokka30 avatar Jan 09 '22 03:01 lokka30

Need to add the PDC value for this in LM 4 and I also need to add an API method for it

lokka30 avatar Jan 18 '22 03:01 lokka30

Almost implemented in LM4, just need to make the label systems factor in if a mob has the denied label stamp.

lokka30 avatar Nov 03 '22 03:11 lokka30

done

lokka30 avatar Nov 05 '22 14:11 lokka30