SPIGOT-7011, SPIGOT-7065: Overhaul of structures

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
Bukkit/Spigot
2022-07-01 20:41:02 +10:00
parent 515ae6f2cc
commit 24ea881685
11 changed files with 289 additions and 1 deletions

View File

@@ -1903,6 +1903,23 @@ public final class Bukkit {
return server.getStructureManager();
}
/**
* Returns the registry for the given class.
* <br>
* If no registry is present for the given class null will be returned.
* <br>
* Depending on the implementation not every registry present in
* {@link Registry} will be returned by this method.
*
* @param tClass of the registry to get
* @param <T> type of the registry
* @return the corresponding registry or null if not present
*/
@Nullable
public static <T extends Keyed> Registry<T> getRegistry(@NotNull Class<T> tClass) {
return server.getRegistry(tClass);
}
/**
* @return the unsafe values instance
* @see UnsafeValues