mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-25 07:30:56 +02:00
Fix vanish status when switching worlds.
This fixes the potion effect being cleared on world change.
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user