use of org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer in project PyrCore by PYRRH4.
the class ParticleManager_1_7_2 method send.
public void send(ParticleManager.Type type, Location loc, float speed, int count, ArrayList<Player> players) {
float x = (float) loc.getX();
float y = (float) loc.getY();
float z = (float) loc.getZ();
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(type.getName(), x, y, z, 0.0F, 0.0F, 0.0F, speed, count);
for (Player pl : players) {
((CraftPlayer) pl).getHandle().playerConnection.sendPacket(packet);
}
}
use of org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer in project PyrCore by PYRRH4.
the class ParticleManager_1_7_9 method send.
public void send(ParticleManager.Type type, Location loc, float speed, int count, ArrayList<Player> players) {
float x = (float) loc.getX();
float y = (float) loc.getY();
float z = (float) loc.getZ();
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(type.getName(), x, y, z, 0.0F, 0.0F, 0.0F, speed, count);
for (Player pl : players) {
((CraftPlayer) pl).getHandle().playerConnection.sendPacket(packet);
}
}
use of org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer in project PyrCore by PYRRH4.
the class ParticleManager_1_9_4 method send.
public void send(ParticleManager.Type type, Location loc, float speed, int count, ArrayList<Player> players) {
float x = (float) loc.getX();
float y = (float) loc.getY();
float z = (float) loc.getZ();
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.valueOf(type.getName()), true, x, y, z, 0.0F, 0.0F, 0.0F, speed, count, null);
for (Player pl : Bukkit.getServer().getOnlinePlayers()) {
((CraftPlayer) pl).getHandle().playerConnection.sendPacket(packet);
}
}
use of org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer in project PyrCore by PYRRH4.
the class ParticleManager_1_9_4 method sendColor.
public void sendColor(ParticleManager.Type type, Location loc, float speed, int count, Color color, ArrayList<Player> players) {
float x = (float) loc.getX();
float y = (float) loc.getY();
float z = (float) loc.getZ();
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.valueOf(type.getName()), true, x, y, z, color.getRed(), color.getGreen(), color.getBlue(), speed, count, null);
for (Player pl : players) {
((CraftPlayer) pl).getHandle().playerConnection.sendPacket(packet);
}
}
use of org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer in project FireAPI by FireBlade-Serv.
the class FireInjector method addPlayer.
public void addPlayer(Player p) {
try {
EntityPlayer ep = ((CraftPlayer) p).getHandle();
Channel ch = getChannel(getNetworkManager(ep));
if (ch.pipeline().get("PacketInjector") == null) {
FireHandler h = new FireHandler(p);
ch.pipeline().addBefore("packet_handler", "PacketInjector", h);
}
} catch (Throwable t) {
t.printStackTrace();
}
}
Aggregations