use of org.bukkit.craftbukkit.v1_6_R1.entity.CraftPlayer in project MyPet by xXKeyleXx.
the class PlatformHelper method getPlayerLanguage.
public String getPlayerLanguage(Player player) {
if (!(player instanceof CraftPlayer)) {
return "en_US";
}
EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
Object lang = ReflectionUtil.getFieldValue(EntityPlayer_locale_FIELD, entityPlayer);
if (lang == null) {
return "en_US";
}
return lang.toString();
}
use of org.bukkit.craftbukkit.v1_6_R1.entity.CraftPlayer in project PyrCore by PYRRH4.
the class ParticleManager_1_10_2 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_R1.entity.CraftPlayer in project PyrCore by PYRRH4.
the class ParticleManager_1_11 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_R1.entity.CraftPlayer in project PyrCore by PYRRH4.
the class ParticleManager_1_12 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_R1.entity.CraftPlayer in project PyrCore by PYRRH4.
the class ParticleManager_1_7_10 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);
}
}
Aggregations