mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-07 04:53:11 +00:00
Replace vanishedPlayers list with set (#1796)
* Replace vanishedPlayers list with set Not sure if there is any particular reason to keep it ordered, but for now I've used a LinkedHashSet. * Change return of new method from Set to Collection Also makes return of old method an unmodifiable list, but this is just as breaking as just changing the method return type as far as I can see
This commit is contained in:
parent
9f6d0fa2d6
commit
61c1485083
5 changed files with 18 additions and 7 deletions
|
@ -715,7 +715,7 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
|
|||
}
|
||||
}
|
||||
setHidden(true);
|
||||
ess.getVanishedPlayers().add(getName());
|
||||
ess.getVanishedPlayersNew().add(getName());
|
||||
if (isAuthorized("essentials.vanish.effect")) {
|
||||
this.getBase().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1, false));
|
||||
}
|
||||
|
@ -724,7 +724,7 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
|
|||
p.showPlayer(getBase());
|
||||
}
|
||||
setHidden(false);
|
||||
ess.getVanishedPlayers().remove(getName());
|
||||
ess.getVanishedPlayersNew().remove(getName());
|
||||
if (isAuthorized("essentials.vanish.effect")) {
|
||||
this.getBase().removePotionEffect(PotionEffectType.INVISIBILITY);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue