From 1c97612c9feac78d2e0ede98675670f62a69df58 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 10 Oct 2021 14:05:04 +1300 Subject: [PATCH] Remove metadata on quit, fixes #622 --- .../disguise/utilities/listeners/DisguiseListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java b/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java index 7eb97389..92d82748 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/listeners/DisguiseListener.java @@ -551,6 +551,10 @@ public class DisguiseListener implements Listener { public void onQuit(PlayerQuitEvent event) { Player player = event.getPlayer(); + for (String meta : new String[]{"LastDisguise", "LD-LastAttacked", "forge_mods", "LibsRabbitHop", "ld_loggedin"}) { + player.removeMetadata(meta, LibsDisguises.getInstance()); + } + // Removed as its not compatible with scoreboard teams /*if (player.hasPermission("libsdisguises.seethrough")) { for (Set disguises : DisguiseUtilities.getDisguises().values()) {