From 21a3b67be9e56ea44747084bfc1c4b65d6c8732f Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 12 Aug 2020 08:44:09 +1000 Subject: [PATCH] SPIGOT-6061: NPE in CraftBlockTag.getHandle() By: md_5 --- .../src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java index 682b06f93e..007db9fbd0 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java +++ b/paper-server/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; }