See the current TODO comment in the menus variable of MenuManager. Furthermore, this may remove the need for using register and unregister methods at all.
This probably won't work well because with the current implementation of using a WeakReference<Inventory>, a NPE is thrown if the menu or inventory is referenced while the inventory isn't being viewed by anyone
See the current TODO comment in the
menus
variable ofMenuManager
. Furthermore, this may remove the need for usingregister
andunregister
methods at all.