use of org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer in project SpaciousLib by anhcraft.
the class Title_1_11_R1 method sendSubTitle.
@Override
public void sendSubTitle(Player player, String text, int fadeIn, int stay, int fadeOut) {
PacketPlayOutTitle title = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.SUBTITLE, IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"));
((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
PacketPlayOutTitle length = new PacketPlayOutTitle(fadeIn, stay, fadeOut);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(length);
}
use of org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer in project SpaciousLib by anhcraft.
the class Title_1_11_R1 method sendTitle.
@Override
public void sendTitle(Player player, String text) {
PacketPlayOutTitle title = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE, IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"));
((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
}
use of org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer in project SpaciousLib by anhcraft.
the class Title_1_11_R1 method sendTitle.
@Override
public void sendTitle(World world, String text, int fadeIn, int stay, int fadeOut) {
for (Player player : world.getPlayers()) {
PacketPlayOutTitle title = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE, IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"));
((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
PacketPlayOutTitle length = new PacketPlayOutTitle(fadeIn, stay, fadeOut);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(length);
}
}
use of org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer in project SpaciousLib by anhcraft.
the class Title_1_11_R1 method sendTitle.
@Override
public void sendTitle(Player player, String text, int fadeIn, int stay, int fadeOut) {
PacketPlayOutTitle title = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE, IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"));
((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
PacketPlayOutTitle length = new PacketPlayOutTitle(fadeIn, stay, fadeOut);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(length);
}
use of org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer in project SpaciousLib by anhcraft.
the class Title_1_8_R2 method sendSubTitle.
@Override
public void sendSubTitle(Player player, String text, int fadeIn, int stay, int fadeOut) {
PacketPlayOutTitle title = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.SUBTITLE, IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + ChatColor.translateAlternateColorCodes('&', text) + "\"}"));
((CraftPlayer) player).getHandle().playerConnection.sendPacket(title);
PacketPlayOutTitle length = new PacketPlayOutTitle(fadeIn, stay, fadeOut);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(length);
}
Aggregations