From 598cd6ba1961fd162259ef3c7d9ecd026e559b0b Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Sat, 8 Oct 2022 13:34:50 +0200 Subject: [PATCH] Don't error when NPC-annotated "entity" leaves the server (#1969) fix: no need to remove never-added attachment --- .../bukkit/BukkitPermissionAttachmentManager.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/BukkitPermissionAttachmentManager.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/BukkitPermissionAttachmentManager.java index 8c065b9ac..76fbfa307 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/BukkitPermissionAttachmentManager.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/BukkitPermissionAttachmentManager.java @@ -36,10 +36,6 @@ public class BukkitPermissionAttachmentManager { if (p == null) { return; } - if (p.hasMetadata("NPC") && noopAttachment != null) { - p.removeAttachment(noopAttachment); - return; - } PermissionAttachment attach = attachments.remove(p); if (attach != null) { p.removeAttachment(attach);