diff options
author | snowleo <schneeleo@gmail.com> | 2012-01-24 00:52:08 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-01-24 00:52:08 +0100 |
commit | cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4 (patch) | |
tree | a7cbcd229b4a5c3dee2731b95b3ddc1ccd95df4c /EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java | |
parent | 6af054631fe04ef7a607f24e459e37836c568100 (diff) | |
parent | f93769dd1dd11ef30c77dd6c9e0e5cf275052715 (diff) | |
download | Essentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.tar Essentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.tar.gz Essentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.tar.lz Essentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.tar.xz Essentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.zip |
Merge branch 'refs/heads/master' into 3.0
The changes to EssChat have not been merged
Conflicts:
Essentials/src/com/earth2me/essentials/Essentials.java
Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
Essentials/src/com/earth2me/essentials/ISettings.java
Essentials/src/com/earth2me/essentials/OfflinePlayer.java
Essentials/src/com/earth2me/essentials/Settings.java
Essentials/src/com/earth2me/essentials/Util.java
Essentials/src/com/earth2me/essentials/listener/EssentialsBlockListener.java
Essentials/src/com/earth2me/essentials/listener/EssentialsPlayerListener.java
Essentials/src/com/earth2me/essentials/listener/EssentialsPluginListener.java
Essentials/src/messages.properties
Essentials/src/messages_da.properties
Essentials/src/messages_de.properties
Essentials/src/messages_en.properties
Essentials/src/messages_es.properties
Essentials/src/messages_fr.properties
Essentials/src/messages_nl.properties
EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java
EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java
EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java
EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java
EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java
Diffstat (limited to 'EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java')
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java index 2e4b5eaa6..1d73ee4c1 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java @@ -9,7 +9,12 @@ import java.util.logging.Logger; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; -import org.bukkit.event.Event.Type; +import org.bukkit.event.Event; +import org.bukkit.event.EventException; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerRespawnEvent; +import org.bukkit.plugin.EventExecutor; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; @@ -41,10 +46,22 @@ public class EssentialsSpawn extends JavaPlugin commandHandler = new EssentialsCommandHandler(EssentialsSpawn.class.getClassLoader(), "com.earth2me.essentials.spawn.Command", "essentials.", spawns, ess); final EssentialsSpawnPlayerListener playerListener = new EssentialsSpawnPlayerListener(ess, spawns); - pluginManager.registerEvent(Type.PLAYER_RESPAWN, playerListener, spawns.getRespawnPriority(), this); - pluginManager.registerEvent(Type.PLAYER_JOIN, playerListener, spawns.getRespawnPriority(), this); - - LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team")); + pluginManager.registerEvent(PlayerRespawnEvent.class, playerListener, spawns.getRespawnPriority(), new EventExecutor() + { + @Override + public void execute(final Listener ll, final Event event) throws EventException + { + ((EssentialsSpawnPlayerListener)ll).onPlayerRespawn((PlayerRespawnEvent)event); + } + }, this); + pluginManager.registerEvent(PlayerJoinEvent.class, playerListener, spawns.getRespawnPriority(), new EventExecutor() + { + @Override + public void execute(final Listener ll, final Event event) throws EventException + { + ((EssentialsSpawnPlayerListener)ll).onPlayerJoin((PlayerJoinEvent)event); + } + }, this); } public void onDisable() |