Allay
Allay copied to clipboard
feat: add a way to freeze registry
Currently, all the registries in Allay are always editable. For example, item registry can still be edited by plugin unexpectedly after players joined, which will led to an unknown behavior. According to this, we should have a way to lock these registry to prevent unexpected modifications after all things are registered.
I suggest implementing registration via an event — there will be some kind of ItemRegistryEvent in which items can be registered, and outside of it, an exception should be thrown