Imanity-Software / ImanitySpigot3-git

Thee Issue Tracker for ImanitySpigot3
2 stars 0 forks source link

ListIterator #211

Open itsLays opened 1 year ago

itsLays commented 1 year ago

Is your feature request related to a problem?

[16:27:02 WARN]: [BKCommonLib] Hooked method public boolean onInteractBy_1_8_8:???(EntityHuman entityhuman) was not found in net.minecraft.server.v1_8_R3.EntityEnderDragon
[16:27:02 ERROR]: Failed to prepare entity controller hook
java.lang.UnsupportedOperationException: normal listIterator() is not supported.
        at org.imanity.imanityspigot.util.y.listIterator(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at com.bergerkiller.bukkit.common.internal.logic.EntityAddRemoveHandler_1_8_to_1_13_2.replaceInList(EntityAddRemoveHandler_1_8_to_1_13_2.java:358) ~[?:?]
        at com.bergerkiller.bukkit.common.internal.logic.EntityAddRemoveHandler_1_8_to_1_13_2.replace(EntityAddRemoveHandler_1_8_to_1_13_2.java:259) ~[?:?]
        at com.bergerkiller.bukkit.common.entity.CommonEntity.replaceEntity(CommonEntity.java:468) ~[?:?]
        at com.bergerkiller.bukkit.common.entity.CommonEntity.prepareHook(CommonEntity.java:419) ~[?:?]
        at com.bergerkiller.bukkit.common.entity.CommonEntity.setController(CommonEntity.java:347) ~[?:?]
        at me.keano.azurite.modules.events.dragon.DragonManager.startDragon(DragonManager.java:61) ~[?:?]
        at me.keano.azurite.modules.events.dragon.command.DragonCommand.execute(DragonCommand.java:69) ~[?:?]
        at me.keano.azurite.modules.framework.commands.Command$1.execute(Command.java:59) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:144) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(SourceFile:746) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(SourceFile:1413) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PlayerConnection.a(SourceFile:1225) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(SourceFile:59) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(SourceFile:15) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PlayerConnectionUtils.lambda$ensureMainThread$0(SourceFile:52) ~[spigot.jar:git-iSpigot-PaperEdition]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at org.imanity.imanityspigot.final .db.run(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.imanity.imanityspigot.final .cZ.executeTask(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.imanity.imanityspigot.final .da.executeTask(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.imanity.imanityspigot.final .cZ.executeNext(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.MinecraftServer.executeNext(SourceFile:1931) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.imanity.imanityspigot.final .cZ.awaitTasks(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.MinecraftServer.sleepForTick(SourceFile:1904) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(SourceFile:840) ~[spigot.jar:git-iSpigot-PaperEdition]
        at java.lang.Thread.run(Thread.java:829) ~[?:?]
[16:27:02 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'dragon start' in me.keano.azurite.modules.framework.commands.Command$1(dragon)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(SourceFile:746) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(SourceFile:1413) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PlayerConnection.a(SourceFile:1225) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(SourceFile:59) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(SourceFile:15) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.PlayerConnectionUtils.lambda$ensureMainThread$0(SourceFile:52) ~[spigot.jar:git-iSpigot-PaperEdition]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at org.imanity.imanityspigot.final .db.run(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.imanity.imanityspigot.final .cZ.executeTask(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.imanity.imanityspigot.final .da.executeTask(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.imanity.imanityspigot.final .cZ.executeNext(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.MinecraftServer.executeNext(SourceFile:1931) ~[spigot.jar:git-iSpigot-PaperEdition]
        at org.imanity.imanityspigot.final .cZ.awaitTasks(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.MinecraftServer.sleepForTick(SourceFile:1904) ~[spigot.jar:git-iSpigot-PaperEdition]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(SourceFile:840) ~[spigot.jar:git-iSpigot-PaperEdition]
        at java.lang.Thread.run(Thread.java:829) ~[?:?]
Caused by: java.lang.RuntimeException: Failed to set controller:
        at com.bergerkiller.bukkit.common.entity.CommonEntity.prepareHook(CommonEntity.java:422) ~[?:?]
        at com.bergerkiller.bukkit.common.entity.CommonEntity.setController(CommonEntity.java:347) ~[?:?]
        at me.keano.azurite.modules.events.dragon.DragonManager.startDragon(DragonManager.java:61) ~[?:?]
        at me.keano.azurite.modules.events.dragon.command.DragonCommand.execute(DragonCommand.java:69) ~[?:?]
        at me.keano.azurite.modules.framework.commands.Command$1.execute(Command.java:59) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:144) ~[spigot.jar:git-iSpigot-PaperEdition]
        ... 17 more
Caused by: java.lang.UnsupportedOperationException: normal listIterator() is not supported.
        at org.imanity.imanityspigot.util.y.listIterator(Unknown Source) ~[spigot.jar:git-iSpigot-PaperEdition]
        at com.bergerkiller.bukkit.common.internal.logic.EntityAddRemoveHandler_1_8_to_1_13_2.replaceInList(EntityAddRemoveHandler_1_8_to_1_13_2.java:358) ~[?:?]
        at com.bergerkiller.bukkit.common.internal.logic.EntityAddRemoveHandler_1_8_to_1_13_2.replace(EntityAddRemoveHandler_1_8_to_1_13_2.java:259) ~[?:?]
        at com.bergerkiller.bukkit.common.entity.CommonEntity.replaceEntity(CommonEntity.java:468) ~[?:?]
        at com.bergerkiller.bukkit.common.entity.CommonEntity.prepareHook(CommonEntity.java:419) ~[?:?]
        at com.bergerkiller.bukkit.common.entity.CommonEntity.setController(CommonEntity.java:347) ~[?:?]
        at me.keano.azurite.modules.events.dragon.DragonManager.startDragon(DragonManager.java:61) ~[?:?]
        at me.keano.azurite.modules.events.dragon.command.DragonCommand.execute(DragonCommand.java:69) ~[?:?]
        at me.keano.azurite.modules.framework.commands.Command$1.execute(Command.java:59) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:144) ~[spigot.jar:git-iSpigot-PaperEdition]
        ... 17 more

Describe the solution you'd like.

listIterator is a basic part of the java spec for a List, theres no reason to be lazy about it and throw a UnsupportedOperationException. especially on a fork that i have paid for. AbstractList exists for a reason, just use it

Describe alternatives you've considered.

I tried to see if this could be solved through BKCommonLib as they still provide support for 1.8 and they all agreed it would be easier to speak to you guys about fixing it.

Agreements

Other

No response

LeeGodSRC commented 1 year ago

well it won't be easy to fix on our end, since we use a very different implementation to ensure speed and thread safety, but in a result Java List is not really suitable for the case, so we basically faked a List to support any plugins for any reason access it.