Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9301)
This commit is contained in:
parent
b835c02322
commit
aa5e9d1d49
61 changed files with 322 additions and 419 deletions
|
@ -13,8 +13,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@Override
|
||||
public void setFlying(boolean value) {
|
||||
+ boolean needsUpdate = getHandle().getAbilities().flying != value; // Paper - Only refresh abilities if needed
|
||||
if (!this.getAllowFlight() && value) {
|
||||
throw new IllegalArgumentException("Cannot make player fly if getAllowFlight() is false");
|
||||
if (!this.getAllowFlight()) {
|
||||
Preconditions.checkArgument(!value, "Player is not allowed to fly (check #getAllowFlight())");
|
||||
}
|
||||
|
||||
this.getHandle().getAbilities().flying = value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue