summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2013-12-02 20:12:42 -0600
committerTravis Watkins <amaranth@ubuntu.com>2013-12-02 20:13:07 -0600
commitc5d8b4393a237c33dd9a75cbe6fe48bd1d00d04c (patch)
tree4262b03ef287e246e001bea1c70a79535f5d9e38 /src
parent8c444f275abf162310d0a4b9f41aa94e7fe45964 (diff)
downloadcraftbukkit-c5d8b4393a237c33dd9a75cbe6fe48bd1d00d04c.tar
craftbukkit-c5d8b4393a237c33dd9a75cbe6fe48bd1d00d04c.tar.gz
craftbukkit-c5d8b4393a237c33dd9a75cbe6fe48bd1d00d04c.tar.lz
craftbukkit-c5d8b4393a237c33dd9a75cbe6fe48bd1d00d04c.tar.xz
craftbukkit-c5d8b4393a237c33dd9a75cbe6fe48bd1d00d04c.zip
Use correct packet data for toggling flying. Fixes BUKKIT-4989
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/PlayerConnection.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2419ac29..53e70c42 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1584,12 +1584,12 @@ public class PlayerConnection implements PacketPlayInListener {
}
public void a(PacketPlayInAbilities packetplayinabilities) {
- // CraftBukkit start
- if (this.player.abilities.canFly && this.player.abilities.isFlying != packetplayinabilities.f()) {
+ // CraftBukkit start - d() should be isFlying()
+ if (this.player.abilities.canFly && this.player.abilities.isFlying != packetplayinabilities.d()) {
PlayerToggleFlightEvent event = new PlayerToggleFlightEvent(this.server.getPlayer(this.player), packetplayinabilities.f());
this.server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
- this.player.abilities.isFlying = packetplayinabilities.f(); // Actually set the player's flying status
+ this.player.abilities.isFlying = packetplayinabilities.d(); // Actually set the player's flying status
}
else {
this.player.updateAbilities(); // Tell the player their ability was reverted