CosimoTiger / plugin-utilities

A library with essential utilities for developing Spigot plugins.
MIT License
0 stars 1 forks source link

Look into using WeakHashMap in MenuManager #17

Open CosimoTiger opened 2 weeks ago

CosimoTiger commented 2 weeks ago

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.

CosimoTiger commented 2 weeks ago

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