mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-01 12:37:10 +00:00
19 lines
953 B
Diff
19 lines
953 B
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Luna <lunahatesgogle@gmail.com>
|
||
|
Date: Tue, 13 Jun 2023 18:29:18 -0300
|
||
|
Subject: [PATCH] Catch null ResourceLocations in CraftNamespacedKey
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java b/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java
|
||
|
index 5014192edb9616ce725fc1592832034789527b6f..64da1b0afd51720803aba0d9e86d0b1743bdb0da 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java
|
||
|
@@ -21,6 +21,7 @@ public final class CraftNamespacedKey {
|
||
|
}
|
||
|
|
||
|
public static NamespacedKey fromMinecraft(ResourceLocation minecraft) {
|
||
|
+ if (minecraft == null) throw new IllegalArgumentException("Null ResourceLocation provided"); // Scissors
|
||
|
return new NamespacedKey(minecraft.getNamespace(), minecraft.getPath());
|
||
|
}
|
||
|
|