diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-02-15 06:15:31 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-02-15 06:15:31 +0000 |
commit | 59679e04232e59a65655d34b7ac47afd4d1651ac (patch) | |
tree | 8fecc10efe60e5f7ccdd0be539b01e6a43e5a97a /EssentialsGroupManager/src/org/anjocaido/groupmanager | |
parent | 4a5c431163098bd64cfe227eeaf2bb12906c6840 (diff) | |
download | Essentials-59679e04232e59a65655d34b7ac47afd4d1651ac.tar Essentials-59679e04232e59a65655d34b7ac47afd4d1651ac.tar.gz Essentials-59679e04232e59a65655d34b7ac47afd4d1651ac.tar.lz Essentials-59679e04232e59a65655d34b7ac47afd4d1651ac.tar.xz Essentials-59679e04232e59a65655d34b7ac47afd4d1651ac.zip |
Depreciate PlayerTeleportEvent, PlayerRespawnEvent and PlayerPortalEvent
as it's all handled in PlayerChangedWorldEvent.
This also means we no longer update permissions before we change
worlds.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java index 053adc9ed..ba4a22f12 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java @@ -37,9 +37,7 @@ 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;
import org.bukkit.event.player.PlayerQuitEvent;
-import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.server.PluginDisableEvent;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.permissions.Permission;
@@ -345,6 +343,12 @@ public class BukkitPermissions { this.updatePermissions(player, null);
}
+ /**
+ * Player events tracked to cause Superperms updates
+ *
+ * @author Steve
+ *
+ */
protected class PlayerEvents implements Listener {
@EventHandler(priority = EventPriority.LOWEST)
@@ -365,18 +369,6 @@ public class BukkitPermissions { }
@EventHandler(priority = EventPriority.LOWEST)
- public void onPlayerPortal(PlayerPortalEvent event) { // will portal into another world
- if ((event.getTo() != null) && (!event.getFrom().getWorld().equals(event.getTo().getWorld()))) { // only if world actually changed
- updatePermissions(event.getPlayer(), event.getTo().getWorld().getName());
- }
- }
-
- @EventHandler(priority = EventPriority.LOWEST)
- public void onPlayerRespawn(PlayerRespawnEvent event) { // can be respawned in another world
- updatePermissions(event.getPlayer(), event.getRespawnLocation().getWorld().getName());
- }
-
- @EventHandler(priority = EventPriority.LOWEST)
public void onPlayerQuit(PlayerQuitEvent event) {
if (!GroupManager.isLoaded())
return;
|