mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-01 12:37:10 +00:00
19 lines
942 B
Diff
19 lines
942 B
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Telesphoreo <me@telesphoreo.me>
|
||
|
Date: Fri, 14 Jun 2024 18:24:35 -0500
|
||
|
Subject: [PATCH] Improve validation of ResourceLocations
|
||
|
|
||
|
|
||
|
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());
|
||
|
}
|
||
|
|