From 62761be294ccf39d46f359afa7eeac9cbb6383ce Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 12 Aug 2020 08:44:09 +1000 Subject: [PATCH] SPIGOT-6061: NPE in CraftBlockTag.getHandle() --- src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java b/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java index 682b06f93e..007db9fbd0 100644 --- a/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java +++ b/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java @@ -20,6 +20,10 @@ public abstract class CraftTag implements Tag { } protected net.minecraft.server.Tag getHandle() { + if (handle == null) { + handle = registry.b(tag); + } + return handle; }