1. Code:
            private void OnMeleeThrown(BasePlayer player, Item item)
            {
                var weapon = player.GetActiveItem().GetHeldEntity() as ThrownWeapon;
                if (this.weapon == null) return;
                weapon.GetItem().amount += 1;
    
    Basically got alot working but can anyone tell me why this doesnt work?
    Started today :)
     
  2. First thing i can notice is this.weapon

    If you are copying things from the assembly, don't forget to change any variable's names so it actually works.

    Also, generally you will want to null check everything before you use it.

    I suggest taking a look into null condition operators which will make life a lot easier; Null-conditional Operators (C# and Visual Basic)