mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 21:22:05 -07:00
@@ -170,6 +170,25 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see Fluid
|
||||
*/
|
||||
Registry<Fluid> FLUID = new SimpleRegistry<>(Fluid.class);
|
||||
/**
|
||||
* Game events.
|
||||
*
|
||||
* @see GameEvent
|
||||
*/
|
||||
Registry<GameEvent> GAME_EVENT = new Registry<GameEvent>() {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Iterator iterator() {
|
||||
return GameEvent.values().iterator();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public GameEvent get(@NotNull NamespacedKey key) {
|
||||
return GameEvent.getByKey(key);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the object by its key.
|
||||
|
Reference in New Issue
Block a user