Search in sources :

Example 91 with EntityPlayer

use of net.minecraft.server.v1_13_R2.EntityPlayer in project Citizens2 by CitizensDev.

the class NMSImpl method sendTabListRemove.

@Override
public void sendTabListRemove(Player recipient, Collection<? extends SkinnableEntity> skinnableNPCs) {
    Preconditions.checkNotNull(recipient);
    Preconditions.checkNotNull(skinnableNPCs);
    EntityPlayer[] entities = new EntityPlayer[skinnableNPCs.size()];
    int i = 0;
    for (SkinnableEntity skinnable : skinnableNPCs) {
        entities[i] = (EntityPlayer) skinnable;
        i++;
    }
    NMSImpl.sendPacket(recipient, new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, entities));
}
Also used : SkinnableEntity(net.citizensnpcs.npc.skin.SkinnableEntity) EntityPlayer(net.minecraft.server.v1_8_R3.EntityPlayer) PacketPlayOutPlayerInfo(net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo) PathPoint(net.minecraft.server.v1_8_R3.PathPoint)

Example 92 with EntityPlayer

use of net.minecraft.server.v1_13_R2.EntityPlayer in project NoCheatPlus by NoCheatPlus.

the class MCAccessCB3100 method isIllegalBounds.

@Override
public AlmostBoolean isIllegalBounds(final Player player) {
    final EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
    if (entityPlayer.dead) {
        return AlmostBoolean.NO;
    }
    // TODO: Does this need a method call for the "real" box? Might be no problem during moving events, though.
    final AxisAlignedBB box = entityPlayer.boundingBox;
    if (LocUtil.isBadCoordinate(box.a, box.b, box.c, box.d, box.e, box.f)) {
        return AlmostBoolean.YES;
    }
    if (!entityPlayer.isSleeping()) {
        // This can not really test stance but height of bounding box.
        final double dY = Math.abs(box.e - box.b);
        if (dY > 1.8) {
            // dY > 1.65D ||
            return AlmostBoolean.YES;
        }
        if (dY < 0.1D && entityPlayer.length >= 0.1) {
            return AlmostBoolean.YES;
        }
    }
    return AlmostBoolean.MAYBE;
}
Also used : AxisAlignedBB(net.minecraft.server.v1_7_R4.AxisAlignedBB) EntityPlayer(net.minecraft.server.v1_7_R4.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer)

Example 93 with EntityPlayer

use of net.minecraft.server.v1_13_R2.EntityPlayer in project NoCheatPlus by NoCheatPlus.

the class MCAccessCB3100 method setDead.

@Override
public void setDead(final Player player, final int deathTicks) {
    final EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
    mcPlayer.deathTicks = deathTicks;
    mcPlayer.dead = true;
}
Also used : EntityPlayer(net.minecraft.server.v1_7_R4.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer)

Example 94 with EntityPlayer

use of net.minecraft.server.v1_13_R2.EntityPlayer in project NoCheatPlus by NoCheatPlus.

the class MCAccessCBDev method setDead.

@Override
public void setDead(final Player player, final int deathTicks) {
    final EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
    mcPlayer.deathTicks = deathTicks;
    mcPlayer.dead = true;
}
Also used : EntityPlayer(net.minecraft.server.v1_12_R1.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer)

Example 95 with EntityPlayer

use of net.minecraft.server.v1_13_R2.EntityPlayer in project NoCheatPlus by NoCheatPlus.

the class MCAccessCB3043 method setDead.

@Override
public void setDead(final Player player, final int deathTicks) {
    final EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
    mcPlayer.deathTicks = deathTicks;
    mcPlayer.dead = true;
}
Also used : EntityPlayer(net.minecraft.server.v1_7_R3.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer)

Aggregations

Player (org.bukkit.entity.Player)65 EntityPlayer (net.minecraft.server.v1_8_R3.EntityPlayer)26 EntityPlayer (net.minecraft.server.v1_12_R1.EntityPlayer)24 EntityPlayer (net.minecraft.server.v1_16_R3.EntityPlayer)23 EntityPlayer (net.minecraft.server.v1_10_R1.EntityPlayer)20 EntityPlayer (net.minecraft.server.v1_11_R1.EntityPlayer)20 NPCHolder (net.citizensnpcs.npc.ai.NPCHolder)19 SkinnableEntity (net.citizensnpcs.npc.skin.SkinnableEntity)19 EntityPlayer (net.minecraft.server.v1_13_R2.EntityPlayer)19 EntityPlayer (net.minecraft.server.v1_15_R1.EntityPlayer)18 CraftPlayer (org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer)17 GameProfile (com.mojang.authlib.GameProfile)16 MyPet (de.Keyle.MyPet.api.entity.MyPet)16 EntityPlayer (net.minecraft.server.v1_14_R1.EntityPlayer)16 OfflinePlayer (org.bukkit.OfflinePlayer)15 CraftPlayer (org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer)15 CraftPlayer (org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer)15 EntityPlayer (net.minecraft.server.v1_9_R2.EntityPlayer)13 CraftPlayer (org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer)13 CraftPlayer (org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer)13