reverted some changes that broke stuff
Dieser Commit ist enthalten in:
Ursprung
ca0711fdb3
Commit
baa92bdd06
@ -193,8 +193,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
super.b(i);
|
super.b(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit return EntityPlayer
|
public void a(boolean flag) {
|
||||||
public EntityPlayer a(boolean flag) {
|
|
||||||
super.o_();
|
super.o_();
|
||||||
|
|
||||||
for (int i = 0; i < this.inventory.getSize(); ++i) {
|
for (int i = 0; i < this.inventory.getSize(); ++i) {
|
||||||
@ -233,7 +232,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityPlayer player = this; // CraftBukkit
|
|
||||||
if (this.E) {
|
if (this.E) {
|
||||||
if (this.b.propertyManager.getBoolean("allow-nether", true)) {
|
if (this.b.propertyManager.getBoolean("allow-nether", true)) {
|
||||||
if (this.vehicle != null) {
|
if (this.vehicle != null) {
|
||||||
@ -243,11 +241,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
if (this.F >= 1.0F) {
|
if (this.F >= 1.0F) {
|
||||||
this.F = 1.0F;
|
this.F = 1.0F;
|
||||||
this.D = 10;
|
this.D = 10;
|
||||||
player = this.b.serverConfigurationManager.f(this); // CraftBukkit
|
this.b.serverConfigurationManager.f(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.E = false; // CraftBukkit
|
this.E = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.F > 0.0F) {
|
if (this.F > 0.0F) {
|
||||||
@ -259,17 +257,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
if (this.D > 0) {
|
||||||
if (player.D > 0) {
|
--this.D;
|
||||||
--player.D;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.health != player.bK) {
|
if (this.health != this.bK) {
|
||||||
player.netServerHandler.sendPacket(new Packet8UpdateHealth(this.health));
|
this.netServerHandler.sendPacket(new Packet8UpdateHealth(this.health));
|
||||||
player.bK = player.health;
|
this.bK = this.health;
|
||||||
}
|
}
|
||||||
return player;
|
|
||||||
// CraftBukkit end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void a(TileEntity tileentity) {
|
private void a(TileEntity tileentity) {
|
||||||
|
@ -219,7 +219,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.player.onGround = packet10flying.g;
|
this.player.onGround = packet10flying.g;
|
||||||
this.player = this.player.a(true); // CraftBukkit
|
this.player.a(true);
|
||||||
this.player.move(d5, 0.0D, d4);
|
this.player.move(d5, 0.0D, d4);
|
||||||
this.player.setLocation(d1, d2, d3, f, f1);
|
this.player.setLocation(d1, d2, d3, f, f1);
|
||||||
this.player.motX = d5;
|
this.player.motX = d5;
|
||||||
|
@ -210,15 +210,19 @@ public class ServerConfigurationManager {
|
|||||||
this.a(entityplayer.dimension).removePlayer(entityplayer);
|
this.a(entityplayer.dimension).removePlayer(entityplayer);
|
||||||
this.players.remove(entityplayer);
|
this.players.remove(entityplayer);
|
||||||
this.server.a(entityplayer.dimension).removeEntity(entityplayer);
|
this.server.a(entityplayer.dimension).removeEntity(entityplayer);
|
||||||
|
ChunkCoordinates chunkcoordinates = entityplayer.M();
|
||||||
|
|
||||||
|
// CraftBukkit start
|
||||||
|
EntityPlayer entityplayer1 = entityplayer;
|
||||||
|
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
ChunkCoordinates chunkcoordinates = entityplayer.M();
|
|
||||||
CraftWorld cw = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld);
|
CraftWorld cw = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld);
|
||||||
if(cw != null && chunkcoordinates != null) {
|
if(cw != null && chunkcoordinates != null) {
|
||||||
ChunkCoordinates chunkcoordinates1 = EntityHuman.getBed(cw.getHandle(), chunkcoordinates);
|
ChunkCoordinates chunkcoordinates1 = EntityHuman.getBed(cw.getHandle(), chunkcoordinates);
|
||||||
if (chunkcoordinates1 != null) {
|
if (chunkcoordinates1 != null) {
|
||||||
location = new Location(cw, chunkcoordinates1.x + 0.5, chunkcoordinates1.y + 0.1, chunkcoordinates1.z + 0.5);
|
location = new Location(cw, chunkcoordinates1.x + 0.5, chunkcoordinates1.y + 0.1, chunkcoordinates1.z + 0.5);
|
||||||
} else {
|
} else {
|
||||||
entityplayer.netServerHandler.sendPacket(new Packet70Bed(0));
|
entityplayer1.netServerHandler.sendPacket(new Packet70Bed(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
@ -237,30 +241,33 @@ public class ServerConfigurationManager {
|
|||||||
location.setWorld(this.server.a(i).getWorld());
|
location.setWorld(this.server.a(i).getWorld());
|
||||||
}
|
}
|
||||||
WorldServer worldserver = ((CraftWorld)location.getWorld()).getHandle();
|
WorldServer worldserver = ((CraftWorld)location.getWorld()).getHandle();
|
||||||
worldserver.chunkProviderServer.getChunkAt((int) entityplayer.locX >> 4, (int) entityplayer.locZ >> 4);
|
entityplayer1.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
|
|
||||||
while (worldserver.getTypeId(location.getBlockX(), location.getBlockY(), location.getBlockZ()) != 0 ||
|
|
||||||
worldserver.getTypeId(location.getBlockX(), location.getBlockY() + 1, location.getBlockZ()) != 0) {
|
|
||||||
location.setY(location.getY() + 1);
|
|
||||||
}
|
|
||||||
byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId());
|
|
||||||
entityplayer.netServerHandler.sendPacket(new Packet9Respawn((byte) (actualDimension >= 0 ? -1 : 0)));
|
|
||||||
entityplayer.netServerHandler.sendPacket(new Packet9Respawn(actualDimension));
|
|
||||||
entityplayer.a(worldserver);
|
|
||||||
entityplayer.dead = false;
|
|
||||||
entityplayer.netServerHandler.teleport(location);
|
|
||||||
this.a(entityplayer, worldserver);
|
|
||||||
this.a(entityplayer.dimension).addPlayer(entityplayer);
|
|
||||||
worldserver.addEntity(entityplayer);
|
|
||||||
this.players.add(entityplayer);
|
|
||||||
this.g(entityplayer);
|
|
||||||
entityplayer.w();
|
|
||||||
return entityplayer;
|
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
worldserver.chunkProviderServer.getChunkAt((int) entityplayer1.locX >> 4, (int) entityplayer1.locZ >> 4);
|
||||||
|
|
||||||
|
while (worldserver.getEntities(entityplayer1, entityplayer1.boundingBox).size() != 0) {
|
||||||
|
entityplayer1.setPosition(entityplayer1.locX, entityplayer1.locY + 1.0D, entityplayer1.locZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
// CraftBukkit start
|
||||||
|
byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId());
|
||||||
|
entityplayer1.netServerHandler.sendPacket(new Packet9Respawn((byte) (actualDimension >= 0 ? -1 : 0)));
|
||||||
|
entityplayer1.netServerHandler.sendPacket(new Packet9Respawn(actualDimension));
|
||||||
|
entityplayer1.a(worldserver);
|
||||||
|
entityplayer1.dead = false;
|
||||||
|
// CraftBukkit end
|
||||||
|
entityplayer1.netServerHandler.a(entityplayer1.locX, entityplayer1.locY, entityplayer1.locZ, entityplayer1.yaw, entityplayer1.pitch);
|
||||||
|
this.a(entityplayer1, worldserver);
|
||||||
|
this.a(entityplayer1.dimension).addPlayer(entityplayer1);
|
||||||
|
worldserver.addEntity(entityplayer1);
|
||||||
|
this.players.add(entityplayer1);
|
||||||
|
this.g(entityplayer1); // CraftBukkit
|
||||||
|
entityplayer1.w();
|
||||||
|
return entityplayer1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit - changed signature
|
public void f(EntityPlayer entityplayer) {
|
||||||
public EntityPlayer f(EntityPlayer entityplayer) {
|
|
||||||
WorldServer worldserver = this.server.a(entityplayer.dimension);
|
WorldServer worldserver = this.server.a(entityplayer.dimension);
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
byte b0;
|
byte b0;
|
||||||
@ -284,7 +291,7 @@ public class ServerConfigurationManager {
|
|||||||
PlayerPortalEvent event = new PlayerPortalEvent((Player)entityplayer.getBukkitEntity(),startLocation,endLocation);
|
PlayerPortalEvent event = new PlayerPortalEvent((Player)entityplayer.getBukkitEntity(),startLocation,endLocation);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return entityplayer;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// entityplayer.dimension = b0;
|
// entityplayer.dimension = b0;
|
||||||
@ -331,7 +338,7 @@ public class ServerConfigurationManager {
|
|||||||
this.g(entityplayer);
|
this.g(entityplayer);
|
||||||
*/ // CraftBukkit end
|
*/ // CraftBukkit end
|
||||||
// CraftBukkit - defer for actual teleportation
|
// CraftBukkit - defer for actual teleportation
|
||||||
return a(entityplayer, b0, new Location(null, entityplayer.locX, entityplayer.locY, entityplayer.locZ));
|
a(entityplayer, b0, new Location(null, entityplayer.locX, entityplayer.locY, entityplayer.locZ));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b() {
|
public void b() {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren