mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
[Spawn] Please join me in welcoming EssentialsSpawn to Java 1.6 and modern bukkit. :: http://i.imgur.com/79Izo.jpg
This commit is contained in:
parent
964bdc6d30
commit
a11e8d4236
@ -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);
|
||||
}
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user