Magic

Magic

190k Downloads

Error on using spell Animate in 1.15

qsefthuopq opened this issue ยท 2 comments

commented
[14:40:50] [Server thread/ERROR]: Could not pass event PlayerAnimationEvent to Magic v7.8.2-ad60083
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1700) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.PacketPlayInArmAnimation.a(SourceFile:31) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.PacketPlayInArmAnimation.a(SourceFile:9) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918) [spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911) [spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:895) [spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221]
Caused by: java.lang.IllegalArgumentException: bound must be positive
        at java.util.Random.nextInt(Random.java:388) ~[?:1.8.0_221]
        at com.elmakers.mine.bukkit.spell.builtin.AnimateSpell.onCast(AnimateSpell.java:146) ~[?:?]
        at com.elmakers.mine.bukkit.spell.BaseSpell.finalizeCast(BaseSpell.java:1474) ~[?:?]
        at com.elmakers.mine.bukkit.spell.BaseSpell.cast(BaseSpell.java:1338) ~[?:?]
        at com.elmakers.mine.bukkit.spell.BaseSpell.cast(BaseSpell.java:1104) ~[?:?]
        at com.elmakers.mine.bukkit.spell.BaseSpell.cast(BaseSpell.java:1348) ~[?:?]
        at com.elmakers.mine.bukkit.wand.Wand.cast(Wand.java:4138) ~[?:?]
        at com.elmakers.mine.bukkit.wand.Wand.cast(Wand.java:4098) ~[?:?]
        at com.elmakers.mine.bukkit.wand.Wand.performAction(Wand.java:5521) ~[?:?]
        at com.elmakers.mine.bukkit.magic.listener.PlayerController.onPlayerAnimate(PlayerController.java:430) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor215.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.15.2.jar:git-Spigot-800b93f-a81f6ed]
        ... 17 more

commented

You can work around this by making sure the list of messages "automata.<your automata type>.suffixes" is not empty.

commented

I've pushed a fix for this.