PLEASE HELP ASAP

Discussion in 'Spigot Plugin Development' started by TheIronMinerLv, Oct 28, 2016.

Thread Status:
Not open for further replies.
  1. I'll be very short - I need SOMEONE, who knows something about java/plugin development, to help me to fix a bug with sell plugin - basically, it's a sell all plugin, when I click on a sign, it sells all specific item in my inventory, BUT I HAVE 1.10 VERSION, so there is offhand... Players bugged money with putting items in second hand, because plugin didn't removed items from it, it just selled it as much you wanted... (I can't fix this myself, because I'm just learning java slowly, but I need to get this fixed asap)

    I'll pay even, if someone will help to fix this, I translated & updated THIS plugin, here is my modified code (ignore translation in it) - http://pastebin.com/uRW0Np6g
     
  2. SORRY, but BUMP
     
    • Winner Winner x 1
  3. Don't bump within 24 hours of your thread. Not everyone is awake at (for me) 5:50 am.

    I'm kind of confused what you mean in your description, so if you could, please go more in depth/show what's happening.
     
    • Informative Informative x 2
    • Agree Agree x 1
  4. Have you tried Player#getItemInMainHand() and Player#getItemInOffHand()?
     
  5. Basically, when I click on a sign with, lets say, cobblestone in my offhand/second hand, plugin GIVES me money, but it doesn't remove the item itself from offhand. Normally (in other inventory spaces) it removes it, when I sell it.
     
  6. Change everything that is player.getItemInHand to player.getInventory.getMainHand.
    That approach will break second hand functionality but since you don't know much yet it's good enough. When you get to learn Java better fix it.

    Sent from my Mi-4c using Tapatalk
     
  7. Nav lemts Iron.
     
    • Agree Agree x 2
    • Funny Funny x 1
  8. Jāiemet side.lv , lai pasmejās :D
    Easy to fix , with java 7 . Add this in plugin player.getInventory.getMainHand.
     
    • Agree Agree x 1
  9. Blootok ,nav jēgas ,pirmās 2 sezonas bugoja IG spawnerus visi tik un tā spēlēja ^^ #SidePok4Life
    Pokemoni tik un tā nesapratīs kas notika ^^
     
    • Winner Winner x 1
  10. The PlayerInteractEvent will fire twice. You can completely ignore the duplicate event regarding the offhand by checking the hand involved in the event(use PlayerInteractEvent.getHand()).
     
  11. yo
     
    • Optimistic Optimistic x 2
Thread Status:
Not open for further replies.

Share This Page