Search in sources :

Example 6 with PacketPlayOutChat

use of net.minecraft.server.v1_9_R2.PacketPlayOutChat in project SpaciousLib by anhcraft.

the class ActionBar_1_10_R1 method send.

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

Example 7 with PacketPlayOutChat

use of net.minecraft.server.v1_9_R2.PacketPlayOutChat in project SpaciousLib by anhcraft.

the class ActionBar_1_8_R2 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_R2.PacketPlayOutChat) CraftPlayer(org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer)

Example 8 with PacketPlayOutChat

use of net.minecraft.server.v1_9_R2.PacketPlayOutChat in project SpaciousLib by anhcraft.

the class ActionBar_1_8_R2 method send.

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

Example 9 with PacketPlayOutChat

use of net.minecraft.server.v1_9_R2.PacketPlayOutChat in project SpaciousLib by anhcraft.

the class ActionBar_1_8_R3 method send.

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

Example 10 with PacketPlayOutChat

use of net.minecraft.server.v1_9_R2.PacketPlayOutChat in project SpaciousLib by anhcraft.

the class ActionBar_1_9_R1 method send.

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

Aggregations

Player (org.bukkit.entity.Player)7 PacketPlayOutChat (net.minecraft.server.v1_10_R1.PacketPlayOutChat)2 PacketPlayOutChat (net.minecraft.server.v1_11_R1.PacketPlayOutChat)2 PacketPlayOutChat (net.minecraft.server.v1_8_R1.PacketPlayOutChat)2 PacketPlayOutChat (net.minecraft.server.v1_8_R2.PacketPlayOutChat)2 PacketPlayOutChat (net.minecraft.server.v1_8_R3.PacketPlayOutChat)2 PacketPlayOutChat (net.minecraft.server.v1_9_R1.PacketPlayOutChat)2 PacketPlayOutChat (net.minecraft.server.v1_9_R2.PacketPlayOutChat)2 CraftPlayer (org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer)2 CraftPlayer (org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer)2 CraftPlayer (org.bukkit.craftbukkit.v1_8_R1.entity.CraftPlayer)2 CraftPlayer (org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer)2 CraftPlayer (org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer)2 CraftPlayer (org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer)2 CraftPlayer (org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer)2