1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-24 07:13:17 +02:00

Fix vanish status when switching worlds.

This fixes the potion effect being cleared on world change.
This commit is contained in:
KHobbits
2013-01-27 16:39:50 +00:00
parent bfc6eda3ae
commit edb828547e

View File

@@ -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)