Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
199 views
in Technique[技术] by (71.8m points)

java - In your opinion, is it because of a very low loop tick (2) that I get this error? BUKKIT 1.16.5 (Bossbar)

Read the title please.. I then tried to raise it but I need to keep it low, it still gives me this error, could you help me understand how I should go about clearing this error?

Part of code (OnDeathEvent)

@EventHandler
public void onDeath(PlayerDeathEvent e) {
    Player p = e.getEntity();
    if(playerInGame.contains(p)) {
        if(playerInGame.remove(p)) {
            makeWinSupport(playerInGame.get(0), p);
        }
    }
}

Error:

org.bukkit.event.EventException: null
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:780) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.EntityPlayer.die(EntityPlayer.java:566) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.EntityLiving.damageEntity(EntityLiving.java:1241) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.EntityHuman.damageEntity(EntityHuman.java:745) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.EntityPlayer.damageEntity(EntityPlayer.java:719) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.EntityArrow.a(EntityArrow.java:320) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.IProjectile.a(IProjectile.java:113) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.EntityArrow.tick(EntityArrow.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.EntityTippedArrow.tick(EntityTippedArrow.java:92) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.WorldServer.entityJoinedWorld(WorldServer.java:663) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.World.a(World.java:718) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.WorldServer.doTick(WorldServer.java:398) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1105) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
            at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:355) ~[spigot-

    1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1008) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:847) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                at java.lang.Thread.run(Thread.java:832) [?:?]
        Caused by: java.lang.IllegalStateException: Removing entity while ticking!
                at net.minecraft.server.v1_16_R3.WorldServer.removeEntity(WorldServer.java:1125) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                at net.minecraft.server.v1_16_R3.WorldServer.removePlayer(WorldServer.java:1144) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                at net.minecraft.server.v1_16_R3.PlayerList.moveToWorld(PlayerList.java:606) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                at org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer.teleport(CraftPlayer.java:695) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                at org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity.teleport(CraftEntity.java:475) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                at com.Drago.Listeners.Selector.LobbyJoin(Selector.java:126) ~[?:?]
                at com.Drago.Listeners.Selector.makeWinSupport(Selector.java:98) ~[?:?]
                at com.Drago.Listeners.Selector.onDeath(Selector.java:90) ~[?:?]
                at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
                at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) ~[?:?]
                at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
                at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
                at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:315) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
                ... 21 more
question from:https://stackoverflow.com/questions/65843854/in-your-opinion-is-it-because-of-a-very-low-loop-tick-2-that-i-get-this-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...