Hey guys, (no, this is not the issue tracker for EssentialsPE, I know.) So @dktapps has been updating PM, and I tried to update EssentialsPE and make it properly working (it doesn't crash anymore, thats a good thing) but I have a problem. I watched the commits and if I'm right DATA_SHOW_NAMETAG has to be changed to DATA_FLAG_CAN_SHOW_NAMETAG. After doing this the stuff kind of started working again, but instead of hiding the nametag as it's supposed to when using the /vanish command, it just leaves the nametag visible. Did I do something wrong? Or is it just a bug in PM which is left to be fixed? Any help would be very much appreciated! Code: https://github.com/Sandertv/EssentialsPE/blob/patch-1/src/EssentialsPE/BaseFiles/BaseAPI.php#L2154
DATA_FLAG_CAN_SHOW_NAMETAG is a flag, DATA_NAMETAG is the flag holder so you have to set DATA_NAMETAG to DATA_FLAG_CAN_SHOW_NAMETAG or DATA_FLAG_ALWAYS_SHOW_NAMETAG https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/entity/Entity.php#L363
Problem is... It used to be DATA_SHOW_NAMETAG, which seems to be removed now. Do I use DATA_NAMETAG for that now? Nevermind, thanks for pointing at that line!
Most metadata properties that were just true/false became flags in this update. New API methods setNameTagVisible() and setNameTagAlwaysVisible() have been added for your convenience. NOTE: Playing with entity metadata directly is DEPRECATED, please use the provided API methods where possible. Entity metadata implementation will be rewritten in the future.