mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-23 00:21:26 +01:00
Track the 'onPlayerChangeWorld' event as some teleports seem to not be
triggering a world move.
This commit is contained in:
parent
5b4966c888
commit
fe050dd725
@ -131,4 +131,5 @@ v 1.9:
|
||||
eg.
|
||||
- '*'
|
||||
- -vanish.*
|
||||
- vanish.standard
|
||||
- vanish.standard
|
||||
- Track the 'onPlayerChangeWorld' event as some teleports seem to not be triggering a world move.
|
@ -34,6 +34,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerKickEvent;
|
||||
import org.bukkit.event.player.PlayerPortalEvent;
|
||||
@ -358,6 +359,11 @@ public class BukkitPermissions {
|
||||
}
|
||||
setPlayer_join(false);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerChangeWorld(PlayerChangedWorldEvent event) { // will portal into another world
|
||||
updatePermissions(event.getPlayer(), event.getPlayer().getWorld().getName());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerPortal(PlayerPortalEvent event) { // will portal into another world
|
||||
|
Loading…
Reference in New Issue
Block a user