Updated for the cleanups done in Bukkit

This commit is contained in:
Erik Broes
2011-03-26 22:32:56 +01:00
parent 47497aa3f9
commit e24b10dfd9
23 changed files with 49 additions and 94 deletions

View File

@@ -18,8 +18,6 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.command.ColouredConsoleSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.Event.Type;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerLoginEvent;
@@ -95,7 +93,7 @@ public class ServerConfigurationManager {
entityplayer.world.a(entityplayer);
PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(PlayerEvent.Type.PLAYER_JOIN, server.getPlayer(entityplayer), "\u00A7e" + entityplayer.name + " joined the game.");
PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(server.getPlayer(entityplayer), "\u00A7e" + entityplayer.name + " joined the game.");
server.getPluginManager().callEvent(playerJoinEvent);
@@ -131,7 +129,7 @@ public class ServerConfigurationManager {
// depending on the outcome. Also change any reference to this.e.c to entity.world
EntityPlayer entity = new EntityPlayer(c, c.worlds.get(0), s, new ItemInWorldManager(c.worlds.get(0)));
Player player = (entity == null) ? null : (Player) entity.getBukkitEntity();
PlayerLoginEvent event = new PlayerLoginEvent(Type.PLAYER_LOGIN, player);
PlayerLoginEvent event = new PlayerLoginEvent(player);
String s2 = netloginhandler.b.b().toString();
@@ -191,7 +189,7 @@ public class ServerConfigurationManager {
Player respawnPlayer = server.getPlayer(entityplayer);
Location respawnLocation = new Location(respawnPlayer.getWorld(), entityplayer1.locX, entityplayer1.locY, entityplayer1.locZ, entityplayer1.yaw, entityplayer1.pitch);
PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(Event.Type.PLAYER_RESPAWN, respawnPlayer, respawnLocation );
PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, respawnLocation );
server.getPluginManager().callEvent(respawnEvent);
entityplayer1.world = ((CraftWorld) respawnEvent.getRespawnLocation().getWorld()).getHandle();