SPIGOT-7362: Properly handle null in CraftBlock#blockFaceToNotch()

This commit is contained in:
Parker Hawke 2023-05-30 21:14:16 -04:00
parent dbc70bed55
commit 1f2dd8e127
No known key found for this signature in database
GPG Key ID: FD2A5649C53ADFE0

View File

@ -310,6 +310,9 @@ public class CraftBlock implements Block {
} }
public static EnumDirection blockFaceToNotch(BlockFace face) { public static EnumDirection blockFaceToNotch(BlockFace face) {
if (face == null) {
return null;
}
switch (face) { switch (face) {
case DOWN: case DOWN:
return EnumDirection.DOWN; return EnumDirection.DOWN;