Better remove metadata for #622

This commit is contained in:
libraryaddict 2021-10-11 15:39:42 +13:00
parent 1c97612c9f
commit df833cc4ca

View File

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