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

fix: no need to remove never-added attachment
Dieser Commit ist enthalten in:
Pierre Maurice Schwang 2022-10-08 13:34:50 +02:00 committet von GitHub
Ursprung 292d9f2439
Commit 598cd6ba19
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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);