mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-10 12:19:57 +00: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"));
|
user.sendMessage(_("noGodWorldWarning"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!event.getPlayer().getWorld().getName().equals(newWorld))
|
if (!user.getWorld().getName().equals(newWorld))
|
||||||
{
|
{
|
||||||
user.sendMessage(_("currentWorld", newWorld));
|
user.sendMessage(_("currentWorld", newWorld));
|
||||||
}
|
}
|
||||||
|
if (user.isVanished())
|
||||||
|
{
|
||||||
|
user.setVanished(user.isAuthorized("essentials.vanish"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL)
|
@EventHandler(priority = EventPriority.NORMAL)
|
||||||
|
|
Loading…
Reference in a new issue