Solved How can i make delay?

Discussion in 'Spigot Plugin Development' started by Carster, Feb 7, 2020.

  1. Hi guys.. so, i just made this event that spawning armorstand while walking.
    How can i make it automaticly remove the armorstands one at time?
    Code (Java):
    package me.carstercraft.carstercraft.events;


    import org.bukkit.Material;
    import org.bukkit.entity.ArmorStand;
    import org.bukkit.entity.EntityType;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerMoveEvent;
    import org.bukkit.inventory.ItemStack;

    public class EntityMoveEvent implements Listener {

        @EventHandler
        public void onPlayerMove(PlayerMoveEvent e){

            Player player = e.getPlayer();
            ArmorStand armorstand = (ArmorStand) player.getWorld().spawnEntity(player.getLocation(), EntityType.ARMOR_STAND);
            armorstand.setInvulnerable(true);
            armorstand.setHelmet(new ItemStack(Material.GREEN_GLAZED_TERRACOTTA));
            armorstand.setInvulnerable(true);
            armorstand.setBasePlate(false);
           
        }

    }
     
     
  2. You could get the players location, get the nearby entities, and then get the closest armor stand to the player and then use the .remove() method to despawn it
     
  3. How do i get nearby entities
     
  4. Code (Text):
    List<Entity> nearbyEntities = p.getNearbyEntities(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ());
     
  5. Cannot resolve symbol 'p'
     
  6. The 'p' symbol is the player variable. The reason it isn't working is because you don't have a player variable named 'p'
     
  7. Thx, i was stupid
     
  8. Haha, it's all good man!
     
  9. no. that would be the radius. if someone is at a large coordinate, youre going to be searching a mass area. just put a bunch of small numbers like 5. itll search within a 5x5x5 box for entities. or whatever size works for you
     
    • Agree Agree x 1
  10. Good call. That's a large error in my code. I apologize
     
  11. List<Entity> nearbyEntities = p.getNearbyEntities(p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ());
    armorstand = (ArmorStand) player.getWorld().removeEntity(player.getLocation(), EntityType.ARMOR_STAND);
    Not work .-. i am new to this...
     
  12. iterate over your new list and see which ones are armor stands and remove those from the world, Entity#remove
     
  13. How
     
  14. Code (Java):
    List<Entity> nearbyEntities = p.getNearbyEntities(5, 5, 5);
    for (Entity entity: nearbyEntities) {
        if (entity.getType() == EntityType.ARMOR_STAND) entity.remove();
    }
    or using lambdas:
    Code (Java):
    List<Entity> nearbyEntities = p.getNearbyEntities(5, 5, 5);
    nearbyEntities.forEach((entity) -> if (entity.getType() == EntityType.ARMOR_STAND) entity.remove());
     
    • Agree Agree x 1
  15. Since you want to remove the last placed armorstand one at a time why not simply use a delayed task to remove the armorstand after a certain amount of time.
     
  16. Thxxxxxxxx
     
  17. That do remove the the armorstand in 5x5x5x5 and i want the reverse
     
  18. I want it to remove all armorstands that not is in 5x5x5 of a player on the server
     
  19. Code (Java):
    World world = ...;
    final List<ArmorStand> stands = world.getEntitesByClass(ArmorStand.class);

    for(ArmorStand stand: stands) {
        if (stand.getLocation() is not inside 5x5x5 box) stand.remove()
    }
    You will have to implement that check yourself, it's not that hard thou
     
  20. I am keeps getting this errpr
    [19:27:04 ERROR]: Could not pass event PlayerMoveEvent to carstercraft v1.0-SNAPSHOT
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:647) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying.a(SourceFile:126) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying$PacketPlayInLook.a(SourceFile:88) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_241]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
    Caused by: java.lang.IllegalMonitorStateException
    at java.lang.Object.wait(Native Method) ~[?:1.8.0_241]
    at me.carstercraft.carstercraft.events.EntityMoveEvent.onPlayerMove(EntityMoveEvent.java:30) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    ... 15 more
    [19:27:04 ERROR]: Could not pass event PlayerMoveEvent to carstercraft v1.0-SNAPSHOT
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:647) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying.a(SourceFile:126) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying$PacketPlayInLook.a(SourceFile:88) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_241]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
    Caused by: java.lang.IllegalMonitorStateException
    at java.lang.Object.wait(Native Method) ~[?:1.8.0_241]
    at me.carstercraft.carstercraft.events.EntityMoveEvent.onPlayerMove(EntityMoveEvent.java:30) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    ... 15 more
    [19:27:04 ERROR]: Could not pass event PlayerMoveEvent to carstercraft v1.0-SNAPSHOT
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:647) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying.a(SourceFile:126) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying$PacketPlayInLook.a(SourceFile:88) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_241]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
    Caused by: java.lang.IllegalMonitorStateException
    at java.lang.Object.wait(Native Method) ~[?:1.8.0_241]
    at me.carstercraft.carstercraft.events.EntityMoveEvent.onPlayerMove(EntityMoveEvent.java:30) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    ... 15 more
    [19:27:04 ERROR]: Could not pass event PlayerMoveEvent to carstercraft v1.0-SNAPSHOT
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:647) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying.a(SourceFile:126) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying$PacketPlayInLook.a(SourceFile:88) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_241]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
    Caused by: java.lang.IllegalMonitorStateException
    at java.lang.Object.wait(Native Method) ~[?:1.8.0_241]
    at me.carstercraft.carstercraft.events.EntityMoveEvent.onPlayerMove(EntityMoveEvent.java:30) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    ... 15 more
    [19:27:04 ERROR]: Could not pass event PlayerMoveEvent to carstercraft v1.0-SNAPSHOT
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:647) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying.a(SourceFile:126) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_241]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
    Caused by: java.lang.IllegalMonitorStateException
    at java.lang.Object.wait(Native Method) ~[?:1.8.0_241]
    at me.carstercraft.carstercraft.events.EntityMoveEvent.onPlayerMove(EntityMoveEvent.java:30) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    ... 15 more
    >d
    [19:27:22 INFO]: Unknown command. Type "/help" for help.
    [19:27:24 ERROR]: Could not pass event PlayerMoveEvent to carstercraft v1.0-SNAPSHOT
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:647) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying.a(SourceFile:126) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_241]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
    Caused by: java.lang.IllegalMonitorStateException
    at java.lang.Object.wait(Native Method) ~[?:1.8.0_241]
    at me.carstercraft.carstercraft.events.EntityMoveEvent.onPlayerMove(EntityMoveEvent.java:30) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    ... 15 more
    [19:27:24 ERROR]: Could not pass event PlayerMoveEvent to carstercraft v1.0-SNAPSHOT
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:647) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying.a(SourceFile:126) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_241]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot.jar:git-Spigot-596221b-9a1fc1e]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
    Caused by: java.lang.IllegalMonitorStateException
    at java.lang.Object.wait(Native Method) ~[?:1.8.0_241]
    at me.carstercraft.carstercraft.events.EntityMoveEvent.onPlayerMove(EntityMoveEvent.java:30) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-596221b-9a1fc1e]
    ... 15 more

    and it do not remove the stands