hsyyid / simplevotifierlistener Goto Github PK
View Code? Open in Web Editor NEWA simple VotifierListener with command-based rewards for Sponge!
A simple VotifierListener with command-based rewards for Sponge!
It would be cool to allow something like {{playername}}
in the URL because many voting services allow the username to be preset
Add support for mySQL in the config file to store vote information such as player name and the number of votes they have so it can queried to get stats such as top voters etc.
27.07 18:14:35 [Server] pool-2-thread-1/INFO [VotifierListener]: Test just voted and got a reward! You can too with /vote
27.07 18:14:35 [Server] pool-2-thread-1/INFO [io.github.hsyyid.essentialcmds]: [Server] executed command minecraft:give Test minecraft:cake 5
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: java.lang.Exception: Stack trace
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at java.lang.Thread.dumpStack(Thread.java:1329)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.entity.EntityTracker.handler$onAddEntityToTracker$0(EntityTracker.java:56)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.entity.EntityTracker.func_72785_a(EntityTracker.java)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.entity.EntityTracker.func_72786_a(EntityTracker.java:120)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.world.WorldManager.func_72703_a(SourceFile:30)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.world.World.func_72923_a(World.java:1135)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.world.WorldServer.func_72923_a(WorldServer.java:945)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.world.World.func_72838_d(World.java:1126)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.common.SpongeImplHooks.onPlayerToss(SpongeImplHooks.java:163)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.entity.player.EntityPlayer.func_71019_a(EntityPlayer.java:349)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.command.CommandGive.func_71515_b(SourceFile:64)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:100)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.common.command.MinecraftCommandWrapper.tryExecute(MinecraftCommandWrapper.java:141)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.common.command.MinecraftCommandWrapper.process(MinecraftCommandWrapper.java:127)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:331)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:279)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at io.github.hsyyid.votifierlistener.VotifierListenerPlugin.onVote(VotifierListenerPlugin.java:217)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.common.event.listener.VotifierEventListener_VotifierListenerPlugin_onVote55.handle(Unknown Source)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:201)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:242)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:214)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at com.vexsoftware.votifier.sponge.VotifierPlugin$3.run(VotifierPlugin.java:356)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.api.scheduler.Task$Builder.lambda$execute$0(Task.java:138)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$0(SchedulerBase.java:177)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
27.07 18:14:35 [Server] pool-2-thread-1/INFO [STDERR]: [java.lang.Thread:dumpStack:1329]: at java.lang.Thread.run(Thread.java:745)
27.07 18:14:35 [Server] pool-2-thread-1/ERROR [Sponge]: Detected attempt to add entity 'EntityItem['item.item.cake'/20761, l='world', x=775.31, y=79.32, z=-360.08]' to tracker asynchronously.
27.07 18:14:35 [Server] INFO This is very bad as it can cause ConcurrentModificationException's during a server tick.
27.07 18:14:35 [Server] INFO Skipping...
27.07 18:14:35 [Server] pool-2-thread-1/INFO Given [Cake] * 5 to Test
Currently there is no way to reload the config. That should change
Not quite sure how to connect this plugin to the voting website. So when you vote you get the reward. At the moment I added the plugin to my server mods folder added my link but don't get the rewarded command after voting.
Minecraft: 1.10.2
SpongeAPI: 5.1.0-SNAPSHOT-b23f81b
SpongeForge: 1.10.2-2171-5.1.0-BETA-2006
Minecraft Forge: 12.18.2.2171
The server will not start with 0.6.3, it crashes with the following error-
https://gist.github.com/ProsperCraft/75c6eb87050cd7ade8741ee1a58018ee
Downgraded to https://github.com/hsyyid/SimpleVotifierListener/releases/tag/v0.6.2
and it works fine.
The bukkit version of this plugin by the same name handled offline voting, could you please add that?
Player is offline when they vote....reward is held until they log in, player is awarded when they log in.
I have a player who voted using the lowercase version of his name instead of including capitals and is upset because he diden't recieve a reward, is it possible to remove case sensitivity for names?
Okay I need your help I am trying to set a command reward so each player get a crate key(edited)
this is how I did it https://pastebin.com/2W5fsuXr
Pastebin
rewards { # Number of random rewards a player will receive. amount=1 - Pastebin.com
but it isn't wokring
the command to run a crate to is /crate key Vote @p 1(edited)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.