Skip to content

Instantly share code, notes, and snippets.

View FireInstall's full-sized avatar
💭
I may be slow to respond course studys takes me over.

FireInstall FireInstall

💭
I may be slow to respond course studys takes me over.
View GitHub Profile
@Machine-Maker
Machine-Maker / lifecycle-event-system.md
Last active January 9, 2024 21:42
Lifecycle Event System

Lifecycle Event System

Pull Request

What is this?

A new event system for plugins to register handlers for specific events that relate to the startup or reload of servers.

Why is this needed?

We already have an event system, why do we need another one? Fair question. The answer is in the lifecycle part of the name. Some of these events fire well before JavaPlugin instances are created, before the MinecraftServer instance is created, right at the very start of server startup, even before all the registries have been initialized which is like the 2nd thing to happen on a vanilla server. The existing Bukkit event system is not designed to exist at this time, and modifying it to support this environment is more trouble than just having a separate system for specific events that can fire during this early initialization.

@Machine-Maker
Machine-Maker / registry-modification-api.md
Last active January 3, 2024 15:35
Registry Modification

Registry Modification API

The Registry Modification API is a framework for adding future API which easily allows mutating or adding entries into both the built-in registries and the data-driven registries.

There are several definitions to cover first:

Definitions

Built-in Registry: A registry that is unmodifiable by datapacks. They are created/loaded via static initializers