Search in sources :

Example 16 with CraftPlayer

use of org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer in project SpaciousLib by anhcraft.

the class ActionBar_1_11_R1 method send.

@Override
public void send(Player player, String text) {
    PacketPlayOutChat title = new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"), (byte) 2);
    ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
}
Also used : PacketPlayOutChat(net.minecraft.server.v1_11_R1.PacketPlayOutChat) CraftPlayer(org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer)

Example 17 with CraftPlayer

use of org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer in project SpaciousLib by anhcraft.

the class ActionBar_1_12_R1 method send.

@Override
public void send(Player player, String text) {
    PacketPlayOutTitle title = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.ACTIONBAR, IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"));
    ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
}
Also used : PacketPlayOutTitle(net.minecraft.server.v1_12_R1.PacketPlayOutTitle) CraftPlayer(org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer)

Example 18 with CraftPlayer

use of org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer in project SpaciousLib by anhcraft.

the class ActionBar_1_8_R1 method send.

@Override
public void send(World world, String text) {
    for (Player player : world.getPlayers()) {
        PacketPlayOutChat title = new PacketPlayOutChat(ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"), (byte) 2);
        ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
    }
}
Also used : CraftPlayer(org.bukkit.craftbukkit.v1_8_R1.entity.CraftPlayer) Player(org.bukkit.entity.Player) PacketPlayOutChat(net.minecraft.server.v1_8_R1.PacketPlayOutChat) CraftPlayer(org.bukkit.craftbukkit.v1_8_R1.entity.CraftPlayer)

Example 19 with CraftPlayer

use of org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer in project SpaciousLib by anhcraft.

the class ActionBar_1_8_R3 method send.

@Override
public void send(Player player, String text) {
    PacketPlayOutChat title = new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"), (byte) 2);
    ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
}
Also used : PacketPlayOutChat(net.minecraft.server.v1_8_R3.PacketPlayOutChat) CraftPlayer(org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer)

Example 20 with CraftPlayer

use of org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer in project SpaciousLib by anhcraft.

the class ActionBar_1_9_R1 method send.

@Override
public void send(Player player, String text) {
    PacketPlayOutChat title = new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"), (byte) 2);
    ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
}
Also used : PacketPlayOutChat(net.minecraft.server.v1_9_R1.PacketPlayOutChat) CraftPlayer(org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer)

Aggregations

Player (org.bukkit.entity.Player)76 CraftPlayer (org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer)32 CraftPlayer (org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer)26 CraftPlayer (org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer)26 CraftPlayer (org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer)23 CraftPlayer (org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer)19 MyPetPlayer (de.Keyle.MyPet.api.player.MyPetPlayer)15 CraftPlayer (org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer)15 CraftPlayer (org.bukkit.craftbukkit.v1_8_R1.entity.CraftPlayer)14 CraftPlayer (org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer)14 UUID (java.util.UUID)12 PacketPlayOutTitle (net.minecraft.server.v1_12_R1.PacketPlayOutTitle)10 PacketPlayOutTitle (net.minecraft.server.v1_8_R3.PacketPlayOutTitle)10 BukkitRunnable (org.bukkit.scheduler.BukkitRunnable)10 GameProfile (com.mojang.authlib.GameProfile)8 HashSet (java.util.HashSet)8 Set (java.util.Set)8 PacketPlayOutTitle (net.minecraft.server.v1_10_R1.PacketPlayOutTitle)8 PacketPlayOutTitle (net.minecraft.server.v1_11_R1.PacketPlayOutTitle)8 PacketPlayOutTitle (net.minecraft.server.v1_8_R1.PacketPlayOutTitle)8