fly command allowing anyone to fly might not work not sure
This commit is contained in:
@@ -29,6 +29,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
private ItemStack[] bN = new ItemStack[]{null, null, null, null, null};
|
||||
private int bO = 0;
|
||||
public boolean h;
|
||||
public boolean flightAllowed;
|
||||
|
||||
public EntityPlayer(MinecraftServer minecraftserver, World world, String s, ItemInWorldManager iteminworldmanager) {
|
||||
super(world);
|
||||
@@ -65,6 +66,18 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public org.bukkit.Location compassTarget;
|
||||
// CraftBukkit end
|
||||
|
||||
@Override
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
super.a(nbttagcompound);
|
||||
this.flightAllowed = nbttagcompound.m("FlightAllowed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
nbttagcompound.a("FlightAllowed", this.flightAllowed);
|
||||
}
|
||||
|
||||
public void spawnIn(World world) {
|
||||
super.spawnIn(world);
|
||||
// CraftBukkit - world fallback code, either respawn location or global spawn
|
||||
|
||||
@@ -425,7 +425,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
|
||||
AxisAlignedBB axisalignedbb = this.player.boundingBox.clone().b((double) f4, (double) f4, (double) f4).a(0.0D, -0.55D, 0.0D);
|
||||
|
||||
if (!this.minecraftServer.allowFlight && !worldserver.b(axisalignedbb)) {
|
||||
if (!this.minecraftServer.allowFlight && !this.player.flightAllowed && !worldserver.b(axisalignedbb)) {
|
||||
if (d6 >= -0.03125D) {
|
||||
++this.h;
|
||||
if (this.h > 80) {
|
||||
|
||||
Reference in New Issue
Block a user