Artillex-Studios / AxGraves

A lightweight grave (death chest) plugin focused on performance & compatbility
MIT License
11 stars 2 forks source link

Plugin causing server lag? #6

Closed Envqu closed 5 months ago

Envqu commented 7 months ago

My server lag every 20/30 minutes for 5-10 seconds and then this error appears:

[17:02:23] [Server thread/ERROR]: Could not pass event UnknownCommandEvent to AxGraves v1.4.0
java.util.NoSuchElementException: null
    at java.util.LinkedList.getFirst(LinkedList.java:248) ~[?:?]
    at com.artillexstudios.axgraves.libs.lamp.bukkit.brigadier.PaperCommodore$UnknownCommandListener.onUnknownCommand(PaperCommodore.java:75) ~[AxGraves-1.4.0.jar:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor647.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:git-Purpur-1985]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
    at net.minecraft.commands.Commands.performCommand(Commands.java:374) ~[?:?]
    at net.minecraft.commands.Commands.performCommand(Commands.java:314) ~[?:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2389) ~[?:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$21(ServerGamePacketListenerImpl.java:2349) ~[?:?]
    at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
    at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1369) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1346) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1339) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
    at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1317) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1205) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:325) ~[purpur-1.19.4.jar:git-Purpur-1985]
    at java.lang.Thread.run(Thread.java:840) ~[?:?]

It never happened before when this plugin wasnt installed

BenceX100 commented 7 months ago

I don't think this can cause any lag, this error is caused by the command library that we use called Lamp, can you send a spark or a timings report?

Envqu commented 6 months ago

Sorry but I cannot reproduce this because I get rid of this plugin and I didnt notice any errors and any lags right now. Players also noticed the difference. I cant test unstable plugins on production server. There is also bug with XP. When player get rid of XP before death and then he will die he still can take XP from his grave. Its like plugin dont read current XP while dying but XP from 5 minutes ago so players can duplicate XP.

AverageGithub commented 6 months ago

Hey, sorry for the inconvenience caused! I can almost 100% guarantee that the plugin does not cause any lag, however the error you provided does come from the command library we use. The XP issue is a terrible oversight on our end, we'll be working on a fix ASAP.

AverageGithub commented 6 months ago

1.4.1 fixed the XP issue