From df833cc4cabf92763abf00dc387e887745383102 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 11 Oct 2021 15:39:42 +1300 Subject: [PATCH] Better remove metadata for #622 --- .../me/libraryaddict/disguise/disguisetypes/Disguise.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java index b204e885..3b4bda0c 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -792,11 +792,11 @@ public abstract class Disguise { } } - if (getEntity().hasMetadata("LastDisguise")) { - getEntity().removeMetadata("LastDisguise", LibsDisguises.getInstance()); + for (String meta : new String[]{"LastDisguise", "LD-LastAttacked", "forge_mods", "LibsRabbitHop", "ld_loggedin"}) { + getEntity().removeMetadata(meta, LibsDisguises.getInstance()); } - if (DisguiseConfig.getPvPTimer() > 0) { + if (DisguiseConfig.getPvPTimer() > 0 && getEntity() instanceof Player) { getEntity().setMetadata("LastDisguise", new FixedMetadataValue(LibsDisguises.getInstance(), System.currentTimeMillis())); }