PaperMC/patches
Bjarne Koll 9c450388e1
Return null in getRegistry(Class) for unknown type (#11422)
The Bukkit#getRegistry(Class) method contract specifies that it returns
null for unknown registry types. The current implementation however
requires the passed class to be mappable to a known registry key.

For types like Material, which have a SimpleRegistry in bukkit's
Registry interface, no server side registry exists and such the type
cannot be mapped to a registry key.

The commit correctly returns null for types that are not mappable to a
registry key instead of throwing a NullPointerException.
2024-09-21 19:57:08 +02:00
..
api Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11405) 2024-09-15 21:39:53 +02:00
removed Re-add patches for can-place/can-destroy API (#11238) 2024-08-11 13:51:37 -07:00
server Return null in getRegistry(Class) for unknown type (#11422) 2024-09-21 19:57:08 +02:00
unapplied/server Apply optimise collision checking in move packet handling patch 2024-08-16 06:56:13 -07:00