Mineaurion / AurionVoteListener

GNU General Public License v3.0
2 stars 6 forks source link

Could not pass VotifierEvent to Plugin #29

Closed Jaded-Avaritia closed 4 years ago

Jaded-Avaritia commented 5 years ago

06.02 04:34:02 [Server] Server thread/ERROR [Sponge]: Could not pass VotifierEvent to Plugin{id=aurionsvotelistener, name=AurionsVoteListener, version=2.4.2, description=A votifier listener for Sponge, authors=[THEJean_Kevin, Yann151924], source=./mods/AurionVoteListener-2.4.2-S7.1.0.jar} 06.02 04:34:02 [Server] INFO java.lang.NullPointerException: null 06.02 04:34:02 [Server] INFO at com.mineaurion.aurionvotelistener.Rewards.online(Rewards.java:69) ~[Rewards.class:?] 06.02 04:34:02 [Server] INFO at com.mineaurion.aurionvotelistener.EventManager.onVote(EventManager.java:36) ~[EventManager.class:?] 06.02 04:34:02 [Server] INFO at org.spongepowered.common.event.listener.VotifierEventListener_EventManager_onVote183.handle(Unknown Source) ~[?:?] 06.02 04:34:02 [Server] INFO at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:383) [SpongeModEventManager.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:443) [SpongeModEventManager.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:404) [SpongeModEventManager.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:465) [SpongeEventManager.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at com.mineaurion.aurionvotelistener.commands.FakeVoteCommand.execute(FakeVoteCommand.java:32) [FakeVoteCommand.class:?] 06.02 04:34:02 [Server] INFO at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:255) [ChildCommandElementExecutor.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:388) [CommandSpec.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:340) [SimpleDispatcher.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:334) [SpongeCommandManager.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1083) [dh.class:?] 06.02 04:34:02 [Server] INFO at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:960) [pa.class:?] 06.02 04:34:02 [Server] INFO at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:939) [pa.class:?] 06.02 04:34:02 [Server] INFO at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [la.class:?] 06.02 04:34:02 [Server] INFO at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [la.class:?] 06.02 04:34:02 [Server] INFO at org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil.onProcessPacket(PacketPhaseUtil.java:193) [PacketPhaseUtil.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zlh000(SourceFile:539) [hv$1.class:?] 06.02 04:34:02 [Server] INFO at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?] 06.02 04:34:02 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181] 06.02 04:34:02 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181] 06.02 04:34:02 [Server] INFO at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?] 06.02 04:34:02 [Server] INFO at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:297) [SpongeImplHooks.class:1.12.2-2768-7.1.5-RC3542] 06.02 04:34:02 [Server] INFO at net.minecraft.server.MinecraftServer.redirect$onRun$zjl000(MinecraftServer.java:3963) [MinecraftServer.class:?] 06.02 04:34:02 [Server] INFO at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?] 06.02 04:34:02 [Server] INFO at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) [nz.class:?] 06.02 04:34:02 [Server] INFO at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?] 06.02 04:34:02 [Server] INFO at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?] 06.02 04:34:02 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

So my main default works and my 'permission' one works for * perms but not the other one.

#  The example below would give a 30% chance of a voter receiving an extra 5 book, and a 10% chance of an extra 5 book and 5 ghast tear.
ExtraReward{
    70{
        broadcast=""
        playermessage="<GOLD>You received a <GREEN>Rune Key!"
        commands=[
            "hc key Rune <username> 1"
        ]
    }   
    }

#  The example below would give an extra 5 book when the player was voted 30 times, and an extra 5 book and 5 ghast tear when the player was voted 10 times.
cumulativevoting{
    30{
        broadcast="<GREEN><username> <GOLD>was vote 30 times and received an <GREEN>extra 5 book"
        playermessage="<GREEN>You were super lucky and received an <GREEN> extra 5 book "
        commands=[
            "give <username> book 5"
        ]
    }
    10{
        broadcast="<GREEN><username> <GOLD>was vote 10 times and received an <GREEN>extra 5 ghast tear"
        playermessage="<GREEN>You were lucky and received an extra 5 book"
        commands=[
            "give <username> ghast tear 5"
        ]
    }
}

# If the player have the permission, they give reward
perms{
"Aurions.example"=[
            "give <username> book 5"
        ]
}
Yann151924 commented 5 years ago

I hope the rewrite #26 will be fix this things, in the meantime i let this issue open.

Rasgnarok commented 5 years ago

Yep, I have it too, let me know if you need it tested, https://gist.github.com/Vohras2/fa885c2fe08bec35e953b15cccd3035b

Yann151924 commented 4 years ago

Update to the latest version, if the bug is still here open a new issue.