Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
Use correct packet data for toggling flying. Fixes BUKKIT-4989
Dieser Commit ist enthalten in:
Ursprung
8c444f275a
Commit
c5d8b4393a
@ -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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren