Solved CrackShot API

Discussion in 'Plugin Development' started by The Fancy Whale, Oct 9, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    The Fancy Whale

    Currently, I am using the crackshot API as a part of one of my plugins. I am using the code:
    Code:java
    1. Main.cs.giveWeapon(p, "DEAGLE", 1);
    but that just gives the player the "DEAGLE" in the first available slot. Anyone know of a way to select the slot in which the gun will be placed? This would be greatly appreciated! Thanks!
    EDIT: Solved:
    Code:java
    1. PlayerInventory playerInv = player.getInventory();
    2. ItemStack gun = Main.cs.generateWeapon("DEAGLE");
    3. playerInv.setItem(5, gun);
     
Thread Status:
Not open for further replies.

Share This Page