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 4f35a72174
commit 1ae58d05b4

View file

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