diff options
author | Iaccidentally <coryhuckaby@gmail.com> | 2013-02-25 22:01:06 -0500 |
---|---|---|
committer | Iaccidentally <coryhuckaby@gmail.com> | 2013-02-25 22:01:06 -0500 |
commit | a403dbabf6503e103d390db53c0791e4ec92af72 (patch) | |
tree | cc803277952c2069a511e258515a2d21ddaec479 /EssentialsSpawn | |
parent | 08ff6de4d9cd1385d625618aac6b93228de60848 (diff) | |
download | Essentials-a403dbabf6503e103d390db53c0791e4ec92af72.tar Essentials-a403dbabf6503e103d390db53c0791e4ec92af72.tar.gz Essentials-a403dbabf6503e103d390db53c0791e4ec92af72.tar.lz Essentials-a403dbabf6503e103d390db53c0791e4ec92af72.tar.xz Essentials-a403dbabf6503e103d390db53c0791e4ec92af72.zip |
[Spawn] Please join me in welcoming EssentialsSpawn to Java 1.6 and modern bukkit. :: http://i.imgur.com/79Izo.jpg
Diffstat (limited to 'EssentialsSpawn')
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java | 5 | ||||
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java index f0c5ee466..88be7169e 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java @@ -23,6 +23,7 @@ public class EssentialsSpawn extends JavaPlugin private transient IEssentials ess; private transient SpawnStorage spawns; + @Override public void onEnable() { final PluginManager pluginManager = getServer().getPluginManager(); @@ -59,13 +60,13 @@ public class EssentialsSpawn extends JavaPlugin }, this); } + @Override public void onDisable() { } @Override - public boolean onCommand(final CommandSender sender, final Command command, - final String commandLabel, final String[] args) + public boolean onCommand(final CommandSender sender, final Command command, final String commandLabel, final String[] args) { return ess.onCommandEssentials(sender, command, commandLabel, args, EssentialsSpawn.class.getClassLoader(), "com.earth2me.essentials.spawn.Command", "essentials.", spawns); } diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java index eecbe5b03..daeea443f 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java @@ -16,6 +16,8 @@ import java.util.logging.Logger; import org.bukkit.Bukkit; import org.bukkit.Location; 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.PlayerJoinEvent; import org.bukkit.event.player.PlayerRespawnEvent; @@ -35,6 +37,7 @@ public class EssentialsSpawnPlayerListener implements Listener this.spawns = spawns; } + @EventHandler (priority = EventPriority.HIGH) public void onPlayerRespawn(final PlayerRespawnEvent event) { final User user = ess.getUser(event.getPlayer()); @@ -69,6 +72,7 @@ public class EssentialsSpawnPlayerListener implements Listener } } + @EventHandler (priority = EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event) { ess.runTaskAsynchronously(new Runnable() |