Why doesn't this work?

Discussion in 'Plugin Development' started by ParanormalX, Mar 17, 2013.

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


  2. Offline


    Any errors? Is the event firing if you add debugging?
    If you haven't checked if the event is being called then do so and post your results.
    If the event isn't being called you didn't register it correctly. If the event is being called and erroring in the console then post it here.

    Try (I have no idea if this returns ANYTHING different than what you have but it's the method I'd used instinctively):
    if (evt.getEntity().getType() == EntityType.SHEEP) {
  3. Offline

    ZeusAllMighty11 Retired Staff

    Why not just do :
    if(evt.getEntity() instanceof Sheep){
        Sheep sheep = (Sheep) evt.getEntity();
  4. Offline


    Thanks that helped me a lot.
  5. Offline


    next time please don't change the first post to "Resolved" , maybe someone else has the same problem then this topic couldn't help him anymore because you changed the first post to "Resolved".
    Change the thread prefix to solved :) sorry if I was offtopic..
    Darq likes this.
Thread Status:
Not open for further replies.

Share This Page