Package packets.s2cpackets

Source Code of packets.s2cpackets.S0x05

package packets.s2cpackets;

import datatypes.MCItemSlot;
import packets.SPacket;
import entities.Player;

public class S0x05 extends SPacket {
 
  public S0x05(Player player) {
    super(0x05);
    addInt(player.geteid());
    addShort((short) 0x00);    // 0 = held item changed
   
    try {
      MCItemSlot itemslot = player.getHeldItemAtSlot(player.getSelectedSlot());
     
      addShort(itemslot.getItem().getItemId());
      addShort(itemslot.getMetaData());
     
    } catch (Exception e) {
      addShort((short) 0x00);
      addShort((short) 0x00);
    }
  }

}
TOP

Related Classes of packets.s2cpackets.S0x05

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.