Add missing IAE check for PersistentDataContainer#has
This commit is contained in:
@@ -57,6 +57,7 @@ public class CraftPersistentDataContainer implements PersistentDataContainer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean has(NamespacedKey key) {
|
public boolean has(NamespacedKey key) {
|
||||||
|
Preconditions.checkArgument(key != null, "The provided key for the custom value was null"); // Paper
|
||||||
return this.customDataTags.get(key.toString()) != null;
|
return this.customDataTags.get(key.toString()) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user