SongodaCore/Core
Christian Koop 638b793040
Introduce a new hook system (right now only with Hologram support)
My plans with this hook system are to make it easier to understand and maintain – Hopefully it is also more flexible

Hooks now have a dedicated activation-life-cycle – I think this allows it to contain all the logic to do what
it needs to do but also provide some helper methods like `#canBeActivated`.
The activation should be used by the hooks to reduce the memory and performancec impact when not used.
The de-activation also allows hooks to clean up themselves and not rely on the plugins used by the hook or
the plugin using the hook to clean up.

For example:
You can see that the `DecentHologramsHook` has few class variables and they are kept as
small as possible and reasonable when not activated.
In `#deactivate` I call `#removeAll` to remove all holograms that still exist and I call `ArrayList#trimToSize` to reduce it's size again.
This has a similar effect to setting the class varaible null or to a new List but with this I can make that field *final*.

The exact implementation details and capabilities vary on the third-party plugins being supported by hooks,
so it needs to be flexible and easy to understand, so we can easily add support for more plugins and especially
new plugin categories like Maps (dynmap, BlueMap, PlexMap, ...).
2024-01-30 19:43:30 +01:00
..
src Introduce a new hook system (right now only with Hologram support) 2024-01-30 19:43:30 +01:00
pom.xml Add minimessage and utility class for it 2024-01-30 17:14:58 +01:00