Calling assigned entity from an event

Discussion in 'Plugin Development' started by KaiPol, Dec 3, 2013.

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

    KaiPol

    Okay so I assigned wolf to spawn a wolf and then I created an int for how many ticks it's lived. I want to be able to call it in an @EventHandler but it gives me an error but I can't redefine it there because that wouldn't make any sense. Here's an example of what I'm trying to do:
    Code:
    //commandlabel here
    Wolf wolf = (Wolf) // continue spawning a wolf
    int hi = wolf.getTicksLived();
     
    //event here
    if(hi == 1000){
    wolf.<dosomethinghere> // do something to the wolf
    }
    Also how would I make a 'more than or equal to' for this?
     
  2. Offline

    The_Doctor_123

Thread Status:
Not open for further replies.

Share This Page