summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-03-23 18:42:36 +0100
committerErik Broes <erikbroes@grum.nl>2011-03-23 18:42:49 +0100
commite8e7581446b5cb27b513932a81769921b9c9e1a7 (patch)
treea366e13d51b29775c71b925b79498cf331e86f96
parent376ac51cea7dfa5357d395b7a52f382c1249278a (diff)
downloadcraftbukkit-e8e7581446b5cb27b513932a81769921b9c9e1a7.tar
craftbukkit-e8e7581446b5cb27b513932a81769921b9c9e1a7.tar.gz
craftbukkit-e8e7581446b5cb27b513932a81769921b9c9e1a7.tar.lz
craftbukkit-e8e7581446b5cb27b513932a81769921b9c9e1a7.tar.xz
craftbukkit-e8e7581446b5cb27b513932a81769921b9c9e1a7.zip
Small cleanup for the last commit
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index a3bd30d9..048a223f 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -258,7 +258,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
}
}
- // CraftBukkit start -- Delegate for a(double, double, double, float, float)
+ public void a(double d0, double d1, double d2, float f, float f1) {
+ // CraftBukkit start -- Delegate to teleport(Location)
+ teleport(new Location(getPlayer().getWorld(), d0, d1, d2, f, f1));
+ }
+
public boolean teleport(Location dest) {
// Note: the world in location is used only for the event
// Inter-world teleportation is handled in CraftPlayer.teleport()
@@ -280,26 +284,18 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
d2 = to.getZ();
f = to.getYaw();
f1 = to.getPitch();
+ // CraftBukkit end
- // net.minecraft.server start
this.l = false;
this.i = d0;
this.j = d1;
this.k = d2;
this.e.b(d0, d1, d2, f, f1);
this.e.a.b((Packet) (new Packet13PlayerLookMove(d0, d1 + 1.6200000047683716D, d1, d2, f, f1, false)));
- // net.minecraft.server end
- // Returns TRUE if the teleport was successful
+ // CraftBukkit -- Returns TRUE if the teleport was successful
return !event.isCancelled();
}
- // CraftBukkit end
-
- public void a(double d0, double d1, double d2, float f, float f1) {
- // CraftBukkit start -- Delegate to teleport(Location)
- teleport(new Location(getPlayer().getWorld(), d0, d1, d2, f, f1));
- // CraftBukkit end
- }
public void a(Packet14BlockDig packet14blockdig) {
if (packet14blockdig.e == 4) {