This commit is contained in:
Cats 2024-04-29 21:27:35 -04:00 committed by GitHub
commit 01fb615060
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -997,7 +997,8 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
ess.getVanishedPlayersNew().add(getName());
this.getBase().setMetadata("vanished", new FixedMetadataValue(ess, true));
if (isAuthorized("essentials.vanish.effect")) {
this.getBase().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false));
this.getBase().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, (int) Double.POSITIVE_INFINITY, 1, true));
}
if (ess.getSettings().sleepIgnoresVanishedPlayers()) {
getBase().setSleepingIgnored(true);