PlayerInteractEvent - Dropping.

Discussion in 'Plugin Development' started by TheCrazyCrafter5, Mar 20, 2014.

Thread Status:
Not open for further replies.
  1. All I want to do is make the item in hand of the player drop if it is right clicked while in hand and is a specific material. I can't seem to find it anywhere on the forums. Anyone know? I've seen other, more complex ways around this, but why wouldn't you be able to make a player drop the item in his hand? So far, I've been able to get the event listener, then identify when he right clicks and check for the material, but how would I make the player drop the item in his hand?
     
  2. Offline

    Antigrate

  3. Wow, thank you! What is 30 seconds of Google for you is about 1-2 hours of Google without any results for me. My only concern with what you showed me is will the "player.getWorld().dropItem()" drop it from the player or a given value? Because it asks me to give it a location to drop from. My hope was to have it come from the player as if you were dropping it normally.

    Oh, and I've already looked at that java doc, but it's not quite what I'm looking for. It says nothing about how to make the player drop the item in hand.

    Anyways, thanks again! I will try to test what you showed me.
     
Thread Status:
Not open for further replies.

Share This Page