Solved Function starting too early

Discussion in 'Plugin Development' started by Ghilliedrone, Jul 24, 2013.

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

    Ghilliedrone

    I have a onPlayerInteract function that detects when a player is eating but the function starts when they right click with food; even with a full health bar. Is there any way to prevent this?
     
  2. Offline

    chasechocolate

    You can use PlayerItemConsumeEvent to check when a player eats something.
     
  3. Offline

    Ghilliedrone

    I changed the class name to that and it still is doing that.
     
  4. Offline

    Chinwe

    Y u do dis?
    chasechocolate means use PlayerItemConsumeEvent instead of PlayerInteractEvent :oops:
     
    Ghilliedrone likes this.
  5. Offline

    Ghilliedrone

    okay, but how do i check if an itemstack is a specific material?

    Fixed it myself

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
Thread Status:
Not open for further replies.

Share This Page