Search in sources :

Example 56 with EntityPlayer

use of net.minecraft.server.v1_11_R1.EntityPlayer in project FunnyGuilds by FunnyGuilds.

the class V1_14R1PacketAccessor method getOrInstallChannelHandler.

@Override
public FunnyGuildsChannelHandler getOrInstallChannelHandler(Player player) {
    final EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
    final Channel channel = entityPlayer.playerConnection.networkManager.channel;
    final ChannelPipeline pipeline = channel.pipeline();
    return this.channelHandlerInstaller.installChannelHandlerInPipeline(pipeline);
}
Also used : Channel(io.netty.channel.Channel) EntityPlayer(net.minecraft.server.v1_14_R1.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_14_R1.entity.CraftPlayer) ChannelPipeline(io.netty.channel.ChannelPipeline)

Example 57 with EntityPlayer

use of net.minecraft.server.v1_11_R1.EntityPlayer in project FunnyGuilds by FunnyGuilds.

the class V1_16R3PacketAccessor method getOrInstallChannelHandler.

@Override
public FunnyGuildsChannelHandler getOrInstallChannelHandler(Player player) {
    final EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
    final Channel channel = entityPlayer.playerConnection.networkManager.channel;
    final ChannelPipeline pipeline = channel.pipeline();
    return this.channelHandlerInstaller.installChannelHandlerInPipeline(pipeline);
}
Also used : Channel(io.netty.channel.Channel) EntityPlayer(net.minecraft.server.v1_16_R3.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer) ChannelPipeline(io.netty.channel.ChannelPipeline)

Example 58 with EntityPlayer

use of net.minecraft.server.v1_11_R1.EntityPlayer in project FunnyGuilds by FunnyGuilds.

the class V1_9R2PacketAccessor method getOrInstallChannelHandler.

@Override
public FunnyGuildsChannelHandler getOrInstallChannelHandler(Player player) {
    final EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
    final Channel channel = entityPlayer.playerConnection.networkManager.channel;
    final ChannelPipeline pipeline = channel.pipeline();
    return this.channelHandlerInstaller.installChannelHandlerInPipeline(pipeline);
}
Also used : Channel(io.netty.channel.Channel) EntityPlayer(net.minecraft.server.v1_9_R2.EntityPlayer) CraftPlayer(org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer) ChannelPipeline(io.netty.channel.ChannelPipeline)

Example 59 with EntityPlayer

use of net.minecraft.server.v1_11_R1.EntityPlayer in project Arcade2 by ShootGame.

the class GamePlayer method getAttribute.

@Override
public Attribute getAttribute(AttributeKey key) {
    EntityPlayer mojang = this.getMojang();
    if (this.attributeMap == null) {
        try {
            Field mojangMap = EntityLiving.class.getDeclaredField("attributeMap");
            mojangMap.setAccessible(true);
            this.attributeMap = new TrackingAttributeMap((AttributeMapBase) mojangMap.get(mojang));
        } catch (ReflectiveOperationException ex) {
            this.game.getPlugin().getLogger().log(Level.SEVERE, "Could not inject attribute map", ex);
            return null;
        }
    }
    return this.attributeMap.getAttribute(key);
}
Also used : Field(java.lang.reflect.Field) AttributeMapBase(net.minecraft.server.v1_13_R2.AttributeMapBase) TrackingAttributeMap(pl.themolka.arcade.attribute.TrackingAttributeMap) EntityPlayer(net.minecraft.server.v1_13_R2.EntityPlayer)

Example 60 with EntityPlayer

use of net.minecraft.server.v1_11_R1.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_10_R1.EntityPlayer) PacketPlayOutPlayerInfo(net.minecraft.server.v1_10_R1.PacketPlayOutPlayerInfo) PathPoint(net.minecraft.server.v1_10_R1.PathPoint)

Aggregations

Player (org.bukkit.entity.Player)69 ItemStack (org.bukkit.inventory.ItemStack)46 EntityPlayer (net.minecraft.server.v1_12_R1.EntityPlayer)32 EntityPlayer (net.minecraft.server.v1_16_R3.EntityPlayer)31 EntityPlayer (net.minecraft.server.v1_8_R3.EntityPlayer)31 EntityPlayer (net.minecraft.server.v1_15_R1.EntityPlayer)26 EntityPlayer (net.minecraft.server.v1_10_R1.EntityPlayer)25 EntityPlayer (net.minecraft.server.v1_11_R1.EntityPlayer)25 EntityPlayer (net.minecraft.server.v1_13_R2.EntityPlayer)25 CraftPlayer (org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer)23 EntityPlayer (net.minecraft.server.v1_14_R1.EntityPlayer)21 CraftPlayer (org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer)21 NPCHolder (net.citizensnpcs.npc.ai.NPCHolder)19 SkinnableEntity (net.citizensnpcs.npc.skin.SkinnableEntity)19 CraftPlayer (org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer)19 CraftPlayer (org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer)18 CraftPlayer (org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer)18 GameProfile (com.mojang.authlib.GameProfile)16 MyPet (de.Keyle.MyPet.api.entity.MyPet)16 EntityPlayer (net.minecraft.server.v1_16_R1.EntityPlayer)15