mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-20 18:32:49 +00:00
Depreciate PlayerTeleportEvent as it's all handled in
PlayerChangedWorldEvent.
This commit is contained in:
parent
c0517c1203
commit
4a5c431163
|
@ -138,4 +138,5 @@ v 1.9:
|
||||||
- Prevent getAllPlayersPermissions() processing a group more than once. Improves performance when using complex inheritance structures.
|
- Prevent getAllPlayersPermissions() processing a group more than once. Improves performance when using complex inheritance structures.
|
||||||
- Fix world mirroring so it correctly creates data files and data sources for partially mirrored worlds.
|
- Fix world mirroring so it correctly creates data files and data sources for partially mirrored worlds.
|
||||||
- Fixed world mirroring so it returns the correct data for the requested world.
|
- Fixed world mirroring so it returns the correct data for the requested world.
|
||||||
- Change Service registration to register WorldsHolder instead of AnjoPermissionsHandler. This is the correct entry point for all data.
|
- Change Service registration to register WorldsHolder instead of AnjoPermissionsHandler. This is the correct entry point for all data.
|
||||||
|
- Depreciate PlayerTeleportEvent as it's all handled in PlayerChangedWorldEvent.
|
|
@ -40,7 +40,6 @@ import org.bukkit.event.player.PlayerKickEvent;
|
||||||
import org.bukkit.event.player.PlayerPortalEvent;
|
import org.bukkit.event.player.PlayerPortalEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
|
||||||
import org.bukkit.event.server.PluginDisableEvent;
|
import org.bukkit.event.server.PluginDisableEvent;
|
||||||
import org.bukkit.event.server.PluginEnableEvent;
|
import org.bukkit.event.server.PluginEnableEvent;
|
||||||
import org.bukkit.permissions.Permission;
|
import org.bukkit.permissions.Permission;
|
||||||
|
@ -361,7 +360,7 @@ public class BukkitPermissions {
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerChangeWorld(PlayerChangedWorldEvent event) { // will portal into another world
|
public void onPlayerChangeWorld(PlayerChangedWorldEvent event) { // has changed worlds
|
||||||
updatePermissions(event.getPlayer(), event.getPlayer().getWorld().getName());
|
updatePermissions(event.getPlayer(), event.getPlayer().getWorld().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -377,13 +376,6 @@ public class BukkitPermissions {
|
||||||
updatePermissions(event.getPlayer(), event.getRespawnLocation().getWorld().getName());
|
updatePermissions(event.getPlayer(), event.getRespawnLocation().getWorld().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
|
||||||
public void onPlayerTeleport(PlayerTeleportEvent event) { // can be teleported into another world
|
|
||||||
if ((event.getTo() != null) && (event.getPlayer() != null) && (!event.getFrom().getWorld().equals(event.getTo().getWorld()))) { // only if world actually changed
|
|
||||||
updatePermissions(event.getPlayer(), event.getTo().getWorld().getName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||||
if (!GroupManager.isLoaded())
|
if (!GroupManager.isLoaded())
|
||||||
|
|
Loading…
Reference in a new issue