blob: 1b877a055fad646b1926774c0e6e60024389171d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package net.minecraft.server;
public class PlayerAbilities {
public boolean isInvulnerable = false;
public boolean isFlying = false;
public boolean canFly = false;
public boolean canInstantlyBuild = false;
public PlayerAbilities() {}
public void a(NBTTagCompound nbttagcompound) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setBoolean("invulnerable", this.isInvulnerable);
nbttagcompound1.setBoolean("flying", this.isInvulnerable);
nbttagcompound1.setBoolean("mayfly", this.canFly);
nbttagcompound1.setBoolean("instabuild", this.canInstantlyBuild);
nbttagcompound.set("abilities", nbttagcompound1);
}
public void b(NBTTagCompound nbttagcompound) {
if (nbttagcompound.hasKey("abilities")) {
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("abilities");
this.isInvulnerable = nbttagcompound1.getBoolean("invulnerable");
//this.isFlying = nbttagcompound1.getBoolean("flying"); // CraftBukkit - not fully implemented.
this.canFly = nbttagcompound1.getBoolean("mayfly");
this.canInstantlyBuild = nbttagcompound1.getBoolean("instabuild");
}
}
}
|