Move skins saver for players joining to a schedule

This commit is contained in:
libraryaddict 2020-07-23 19:36:17 +12:00
parent 8cfa9e3daa
commit 4b40a67b00

View File

@ -326,15 +326,6 @@ public class DisguiseListener implements Listener {
}
}
if (DisguiseConfig.isSaveGameProfiles() && DisguiseConfig.isUpdateGameProfiles() &&
DisguiseUtilities.hasGameProfile(p.getName())) {
WrappedGameProfile profile = WrappedGameProfile.fromPlayer(p);
if (!profile.getProperties().isEmpty()) {
DisguiseUtilities.addGameProfile(p.getName(), profile);
}
}
if (DisguiseConfig.isSavePlayerDisguises()) {
Disguise[] disguises = DisguiseUtilities.getSavedDisguises(p.getUniqueId(), true);
@ -392,6 +383,15 @@ public class DisguiseListener implements Listener {
required.ifPresent(customEntity -> p.kickPlayer(customEntity.getRequired()));
}
if (DisguiseConfig.isSaveGameProfiles() && DisguiseConfig.isUpdateGameProfiles() &&
DisguiseUtilities.hasGameProfile(p.getName())) {
WrappedGameProfile profile = WrappedGameProfile.fromPlayer(p);
if (!profile.getProperties().isEmpty()) {
DisguiseUtilities.addGameProfile(p.getName(), profile);
}
}
}
}.runTaskLater(LibsDisguises.getInstance(), 20);