Using PLAYER_ENTERING_WORLD could mean you are setting those on every initial login, and on every UI reload. In most cases, PLAYER_LOGIN is the preferred event to hook, as it fires once.
There are exceptions, like my own HideMinimapWorldButton addon, which only sets on PEW, although I can unregister the even as soon as the UI element is set.
|