Making players not move items in hotbar.

Discussion in 'Plugin Development' started by RoaxZ, Jul 18, 2014.

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

    RoaxZ

    I've created a kitpvp plugin, and willing to make killstreaks which i enchant the sword to sharpness 1 on 5 kills and further.

    But the problem is, i'm checking if its in slot 0 and then enchanting it.

    So i can't let them move it, how would i do it. IF i use onInventoryClick event it will just multiply the item and then put it in the inventory again, i don't want this to happen. Any ideas?
     
  2. Offline

    xmarinusx

    RoaxZ That duplicate item in the inventory is a glitch, the item is not really duplicated. Are you using the latest CraftBukkit?
     
  3. Offline

    RoaxZ

    Yes, but isn't there a possibility to keep the user to have the item in his hand the whole time and stop him changing slots by scrolling?

    Also, is there a fix for the graphical things.
     
  4. Offline

    xmarinusx

    As far as I know it's not possible to stop the user from scrolling as that's client side I think. You can however force him to keep that item in the first slot by cancelling all inventory clicks on that slot.

    I'm not sure if the graphical glitch in the inventory still appears in the newest CraftBukkit version, so what version are you using? If you're already using the latest verstion try to update the player's intentory: player.updateInventory();.
     
Thread Status:
Not open for further replies.

Share This Page