mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-01 04:51:29 +01:00
use static fields in Player
This commit is contained in:
parent
a6c6944e56
commit
5b1e06de04
@ -1787,13 +1787,13 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
protected void refreshAbilities() {
|
||||
byte flags = 0;
|
||||
if (invulnerable)
|
||||
flags |= 0x01;
|
||||
flags |= PlayerAbilitiesPacket.FLAG_INVULNERABLE;
|
||||
if (flying)
|
||||
flags |= 0x02;
|
||||
flags |= PlayerAbilitiesPacket.FLAG_FLYING;
|
||||
if (allowFlying)
|
||||
flags |= 0x04;
|
||||
flags |= PlayerAbilitiesPacket.FLAG_ALLOW_FLYING;
|
||||
if (instantBreak)
|
||||
flags |= 0x08;
|
||||
flags |= PlayerAbilitiesPacket.FLAG_INSTANT_BREAK;
|
||||
playerConnection.sendPacket(new PlayerAbilitiesPacket(flags, flyingSpeed, fieldViewModifier));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user