Uhmmm.. What is this gligvh

Discussion in 'Plugin Development' started by goomonster3, Jul 19, 2015.

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

    goomonster3

    Hey. I have found a big glitch I have no idea why this has happened.. I give myself an item in my code. If I right click the item then it just disappears. If I hit someone with a sword it deals the damage then vanishes. What is wrong..?
     
  2. Offline

    justin_393

    Have you tried posting your code? Little hard to debug English..
     
    Shortninja66, teej107 and Konato_K like this.
  3. Offline

    SpaceExplosion

    Maybe, because you didn't set hit points. You need, to add durability. When, you just do that it thinks of it as 1, and breaks. I'm not a coder, so I really can't help. But, hopefully this fixes your problem!
     
    caderape likes this.
  4. Offline

    justin_393

    What????
     
  5. Offline

    SpaceExplosion


    Basically, you need to set durability. Like a diamond sword durability is 1562.
     
  6. Offline

    goomonster3

    Nope - It doesn't break, it just disappears xD It happens with any item even dirt
     
  7. Offline

    Shortninja66

    @SpaceExplosion This isn't the case. If you give a player a diamond sword, it will give them a fully repaired diamond sword.

    @goomonster3 Can you post your code, please?
     
  8. Offline

    goomonster3

    I fixed it now - I was looking into the wrong hashmap so I was setting the amount to 0 which just dupes the item (not real) when set to the slot in the inventory
     
  9. Offline

    Shortninja66

  10. Offline

    Boomer

    This actually solved a problem I struggled with last week as well, which wasn't a dealbreaker for what i was using it for, just a curiosity in a temporary interface... sure enough, I did the same :)
     
Thread Status:
Not open for further replies.

Share This Page