mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-28 12:07:38 +01:00
Fix vanish status when switching worlds.
This fixes the potion effect being cleared on world change.
This commit is contained in:
parent
4f35a72174
commit
1ae58d05b4
@ -425,10 +425,14 @@ public class EssentialsPlayerListener implements Listener
|
||||
user.sendMessage(_("noGodWorldWarning"));
|
||||
}
|
||||
|
||||
if (!event.getPlayer().getWorld().getName().equals(newWorld))
|
||||
if (!user.getWorld().getName().equals(newWorld))
|
||||
{
|
||||
user.sendMessage(_("currentWorld", newWorld));
|
||||
}
|
||||
if (user.isVanished())
|
||||
{
|
||||
user.setVanished(user.isAuthorized("essentials.vanish"));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
|
Loading…
Reference in New Issue
Block a user