Don't error when NPC-annotated "entity" leaves the server (#1969)

fix: no need to remove never-added attachment
This commit is contained in:
Pierre Maurice Schwang 2022-10-08 13:34:50 +02:00 committed by GitHub
parent 292d9f2439
commit 598cd6ba19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,10 +36,6 @@ public class BukkitPermissionAttachmentManager {
if (p == null) { if (p == null) {
return; return;
} }
if (p.hasMetadata("NPC") && noopAttachment != null) {
p.removeAttachment(noopAttachment);
return;
}
PermissionAttachment attach = attachments.remove(p); PermissionAttachment attach = attachments.remove(p);
if (attach != null) { if (attach != null) {
p.removeAttachment(attach); p.removeAttachment(attach);