Jump to content

Hilfe bein Code


Apple API
 Share

Recommended Posts

Hey, ich habe eine frage,

Ich habe nähmlich ein Problem bei dieser methode:

public void setFakeArmor(Player player, int entityID, Color color) {
        ItemStack armor = getColoredChestplate(color);
        
        PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityID, 3, CraftItemStack.asNMSCopy(armor));
        ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);

 

Das Fett Markierte wird als Fehler angezeigt!

Genutze Spigot Version ist 1.14.4

Link to comment
Share on other sites

Was wird als Fehler angezeigt?

 

Funktioniert das?

public void setFakeArmor(Player player, int entityID, Color color) {

   ItemStack armor = getColoredChestplate(color);
   final EnumItemSlot CHESTPLATE_SLOT = EnumItemSlot.CHEST;

   PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityID, CHESTPLATE_SLOT, CraftItemStack.asNMSCopy(armor));
   ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...
B
B