geforkt von Mirrors/Paper
Only refresh abilities if needed
Dieser Commit ist enthalten in:
Ursprung
840b8a7bfa
Commit
3e1c79c850
@ -2120,12 +2120,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setFlying(boolean value) {
|
||||
boolean needsUpdate = getHandle().getAbilities().flying != value; // Paper - Only refresh abilities if needed
|
||||
if (!this.getAllowFlight()) {
|
||||
Preconditions.checkArgument(!value, "Player is not allowed to fly (check #getAllowFlight())");
|
||||
}
|
||||
|
||||
this.getHandle().getAbilities().flying = value;
|
||||
this.getHandle().onUpdateAbilities();
|
||||
if (needsUpdate) this.getHandle().onUpdateAbilities(); // Paper - Only refresh abilities if needed
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren