Solved Unable to kill a parrot

Discussion in 'Spigot Plugin Development' started by MisterSyx, Feb 13, 2020.

Thread Status:
Not open for further replies.
  1. Hi,

    I'm spawning parrots on players' shoulders and want to kill / remove them as soon as they jump off the player. My check triggers correctly, but Entity#remove doesn't do anything, neither do Entity#setHealth or Entity#damage. I'm executing this code from a synchronized Bukkit TaskTimer. Any ideas? I save the parrot as an Entity and already made sure it is the right entity.
    Using 1.15.2 Spigot API, running on 1.12.2 server.
     
    • Optimistic Optimistic x 1
  2. Are you getting any errors? My first thought is that perhaps the entity on the shoulder and one in world are in fact different.
     
    • Winner Winner x 1
  3. You should show us the code to help you better.
     
    • Agree Agree x 2
  4. People always forgot about that part.
    Help me with nothing.
     
    • Agree Agree x 1
    • Agree Agree x 1
    • Winner Winner x 1
  5. drives_a_ford

    Moderator

    You should generally be using the API for the version that your're coding for. There are many things that are different between the 1.15.2 and 1.13.2 APIs. The material flattening is one such example.

    With that said, if it's not working at a specific time, have you tried scheduling a task that does it the tick after?
     
Thread Status:
Not open for further replies.