So I make this plugin over here
My users keep complaining about an error like this
[10:03:55] [pool-2-thread-1/INFO] [nucleus]: Server ran the command: /give TinyInJapan pixelmon:red_card 1 0 {ench:[{id:32,lvl:255}],display:{Name:"Burnt Magikarp Ticke
t",Lore:["Give this to an", "admin to exchange."]}}
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: java.lang.Exception: Stack trace
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at java.lang.Thread.dumpStack(Thread.java:1333)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.entity.EntityTracker.handler$onAddEntityToTracker$zcp000(EntityTracker.
java:76)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.entity.EntityTracker.func_72785_a(EntityTracker.java)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.entity.EntityTracker.func_72786_a(EntityTracker.java:139)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.world.ServerWorldEventHandler.func_72703_a(ServerWorldEventHandler.java
:33)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.world.World.func_72923_a(World.java:1142)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.world.WorldServer.func_72923_a(WorldServer.java:1118)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.world.WorldServer.onSpongeEntityAdded(WorldServer.java:1403)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.world.WorldServer.forceSpawnEntity(WorldServer.java:1449)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.world.WorldServer.forceSpawnEntity(WorldServer.java:1432)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at org.spongepowered.common.event.tracking.phase.TrackingPhase.spawnEntityOrCapture(Trac
kingPhase.java:284)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at org.spongepowered.common.event.tracking.phase.general.GeneralPhase.spawnEntityOrCaptu
re(GeneralPhase.java:357)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at org.spongepowered.common.event.tracking.CauseTracker.spawnEntity(CauseTracker.java:55
8)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.world.WorldServer.func_72838_d(WorldServer.java:1174)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at org.spongepowered.common.entity.EntityUtil.dropItemAndGetStack(EntityUtil.java:1115)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at org.spongepowered.common.entity.EntityUtil.playerDropItem(EntityUtil.java:1075)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.entity.player.EntityPlayer.func_146097_a(EntityPlayer.java:380)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.entity.player.EntityPlayer.func_71019_a(EntityPlayer.java:321)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.command.CommandGive.func_184881_a(SourceFile:75)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:104)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at org.spongepowered.common.command.MinecraftCommandWrapper.tryExecute(MinecraftCommandWrapper.java:143)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at org.spongepowered.common.command.MinecraftCommandWrapper.process(MinecraftCommandWrapper.java:129)
[10:03:55] [pool-2-thread-1/INFO] [STDERR]: [java.lang.Thread:dumpStack:1333]: at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:333)
Now the interesting thing is that it only happens with Pixelmon servers. The first time this problem was brought to light a user complained to blood about it, I talked to blood and showed him my source, he looked at it then went to nuVotifier and said the problem was there because nuVotifier is running async. I tried creating a work around by passing off the data into a thread safe queue and then running a task using the scheduler(from what I thought was the main thread) to run the commands in the queue, every so often (~half a second). No dice. From the looks of it there were improvements but not enough to warrant it “Fixed Status”.
Any help would be appreciated. I have a lot of anxious users waiting for a long awaited fix