示例#1
0
 public override void HandleBlockItemSwitch(net.minecraft.src.Packet16BlockItemSwitch packet16blockitemswitch)
 {
     if (this.playerEntity.isDead)
     {
         return;                           // CRAFTBUKKIT
     }
     if (packet16blockitemswitch.id >= 0 && packet16blockitemswitch.id < net.minecraft.src.InventoryPlayer.GetNumberOfSlots())
     {
         playerEntity.inventory.currentItem = packet16blockitemswitch.id;
     }
     else
     {
         logger.Warning((new java.lang.StringBuilder()).Append(playerEntity.username).Append(" tried to set an invalid carried item").ToString());
         this.KickPlayer("Nope!"); // CRAFTBUKKIT
     }
 }
示例#2
0
 public virtual void HandleBlockItemSwitch(net.minecraft.src.Packet16BlockItemSwitch packet16blockitemswitch)
 {
     RegisterPacket(packet16blockitemswitch);
 }