MilkCowEvent ?

Discussion in 'Plugin Development' started by randomman159, Nov 14, 2011.

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

    randomman159

    Is there any MilkCowEvent ? If not, how would you go about making it so that the player can't get milk from cows?

    Thanks for any help.
     
  2. Offline

    nisovin

    PlayerInteractEntityEvent.
     
  3. Offline

    randomman159

    So i would have to check whether the player is holding a bukkit and the whether the entity is a cow? Or is there something predone for it?

    And also, you don't always get milk from cows, how can i tell when a player does/doesn't?
     
  4. Offline

    user_43347

    You actually always do. You just have to aim for the utters, or else you don't. Its a common "myth."
     
  5. Offline

    DDoS

    Maybe check is the empty bucket changes to a milk bucket? You might have to use a scheduler with a few ticks of delay to check this.
     
  6. Offline

    Taco

    player.getItemInHand()

    event.getEntity()

    Those two should give you the info you need to decide what happened.
     
  7. Offline

    randomman159

    Thanks, but then i am faced with the problem of whether the bucket already had milk in it.


    To put it simply, i have an array of cows, i just want cows in that array to be unable to give milk :p
     
  8. Offline

    undeadmach1ne

    there is an onPlayerBucketFill in the player listener...
     
  9. Offline

    randomman159

    Yeah... checking that out now. Though it won't give me which cow supplied the milk
     
Thread Status:
Not open for further replies.

Share This Page