Archiviert
13
0

Implemented PlayerChangedWorldEvent.

Dieser Commit ist enthalten in:
sunkid 2011-09-30 20:38:46 +02:00 committet von EvilSeph
Ursprung d532136903
Commit 199a5c2a77

Datei anzeigen

@ -279,6 +279,7 @@ public class ServerConfigurationManager {
// CraftBukkit start // CraftBukkit start
EntityPlayer entityplayer1 = entityplayer; EntityPlayer entityplayer1 = entityplayer;
org.bukkit.World fromWorld = entityplayer1.getBukkitEntity().getWorld();
if (location == null) { if (location == null) {
boolean isBedSpawn = false; boolean isBedSpawn = false;
@ -331,6 +332,10 @@ public class ServerConfigurationManager {
entityplayer1.spawnIn(worldserver); entityplayer1.spawnIn(worldserver);
entityplayer1.dead = false; entityplayer1.dead = false;
entityplayer1.netServerHandler.teleport(new Location(worldserver.getWorld(), entityplayer1.locX, entityplayer1.locY, entityplayer1.locZ, entityplayer1.yaw, entityplayer1.pitch)); entityplayer1.netServerHandler.teleport(new Location(worldserver.getWorld(), entityplayer1.locX, entityplayer1.locY, entityplayer1.locZ, entityplayer1.yaw, entityplayer1.pitch));
org.bukkit.event.player.PlayerChangedWorldEvent event = new org.bukkit.event.player.PlayerChangedWorldEvent((Player) entityplayer1.getBukkitEntity(), fromWorld);
Bukkit.getServer().getPluginManager().callEvent(event);
// CraftBukkit end // CraftBukkit end
this.a(entityplayer1, worldserver); this.a(entityplayer1, worldserver);
this.getPlayerManager(entityplayer1.dimension).addPlayer(entityplayer1); this.getPlayerManager(entityplayer1.dimension).addPlayer(entityplayer1);