Generic cleanup of the org.bukkit.craftbukkit classes.

This commit is contained in:
Erik Broes
2011-06-12 01:12:43 +02:00
parent b042f48b24
commit 9adc03abab
34 changed files with 160 additions and 145 deletions

View File

@@ -147,8 +147,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void playNote(Location loc, byte instrument, byte note) {
getHandle().netServerHandler.sendPacket(
new Packet54PlayNoteBlock(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), instrument, note));
getHandle().netServerHandler.sendPacket(new Packet54PlayNoteBlock(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), instrument, note));
}
public void playEffect(Location loc, Effect effect, int data) {
@@ -162,9 +161,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void sendBlockChange(Location loc, int material, byte data) {
Packet53BlockChange packet = new Packet53BlockChange(
loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(),
((CraftWorld) loc.getWorld()).getHandle());
Packet53BlockChange packet = new Packet53BlockChange(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), ((CraftWorld) loc.getWorld()).getHandle());
packet.d = material;
packet.e = data;
getHandle().netServerHandler.sendPacket(packet);
@@ -219,8 +217,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
WorldServer toWorld = ((CraftWorld) to.getWorld()).getHandle();
// Grab the EntityPlayer
EntityPlayer entity = getHandle();
// Check if the fromWorld and toWorld are the same.
if (fromWorld == toWorld){
if (fromWorld == toWorld) {
entity.netServerHandler.teleport(to);
} else {
server.getHandle().a(entity, toWorld.dimension, to);