Help with My Baby cow Plugin.

Discussion in 'Plugin Development' started by tooncool64, May 7, 2014.

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

    tooncool64

    Ok, i am making a plugin. The plugin makes every cow in the world a baby, and when it hits you it catches you on fire.
    Could someone give me suggestions on how to make this possible?
    Here is my class file so far:
    Code:java
    1. package plugin5;
    2. import org.bukkit.entity.Cow;
    3.  
    4. public class Main{
    5. void setBaby(boolean flag){
    6. }
    7. }
     
  2. Offline

    Birdgeek3

    Garris0n likes this.
  3. Offline

    xTigerRebornx

    tooncool64
    Use CreatureSpawnEvent, listening to if it was successful (Should use EventPriority.MONITOR), and if the LivingEntity is an instanceof Cow, cast it to Cow, then make it a baby. Then, listen to EntityDamageByEntityEvent, checking if the Entity hit was a Cow, and if the Entity that hit it is a Player (and checks for the World and whatever else you want), then light the Player on fire
     
  4. Offline

    tooncool64

  5. Offline

    Birdgeek3

    If you wanted some ideas I could help more, but basically xTigerRebornx knows whats up.
     
Thread Status:
Not open for further replies.

Share This Page