mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Implemented PlayerChangedWorldEvent.
This commit is contained in:
parent
d532136903
commit
199a5c2a77
1 changed files with 15 additions and 10 deletions
|
@ -279,6 +279,7 @@ public class ServerConfigurationManager {
|
|||
|
||||
// CraftBukkit start
|
||||
EntityPlayer entityplayer1 = entityplayer;
|
||||
org.bukkit.World fromWorld = entityplayer1.getBukkitEntity().getWorld();
|
||||
|
||||
if (location == null) {
|
||||
boolean isBedSpawn = false;
|
||||
|
@ -331,6 +332,10 @@ public class ServerConfigurationManager {
|
|||
entityplayer1.spawnIn(worldserver);
|
||||
entityplayer1.dead = false;
|
||||
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
|
||||
this.a(entityplayer1, worldserver);
|
||||
this.getPlayerManager(entityplayer1.dimension).addPlayer(entityplayer1);
|
||||
|
|
Loading…
Reference in a new issue