[INACTIVE][ADMN] SMPoll - Poll your users. [670]

Discussion in 'Inactive/Unsupported Plugins' started by redf1sh, Mar 18, 2011.

  1. Offline

    redf1sh

    SMPoll - poll your users
    Version: v0.4

    Now works on craftbukkit build 602/617/670, and has permission support.

    This is a fairly simple plugin that allows admins to create arbitrary polls, and lets everyone vote on them. If you try it out please let me know about any bugs you find, and feel free to make suggestions on improving the plugin.

    Features:
    • Admins can create polls, anyone can vote on which option they like the best.
    • Polls run for a set amount of time.
    • When a poll's running out of time it will let everyone know.
    • Finished polls can be views using /poll results.
    Want to try it?: Get the Latest version (0.4).

    Old versions: SMPoll(0.2)

    Alternate download for version 0.4: MegaUpload

    This is in response to a request here: http://forums.bukkit.org/threads/admn-poll.8878/

    Commands:
    • (Admin) /poll create <poll name> <runtime> <description> - Makes a new poll.
    • (Admin) /poll end <poll name> - Removes a currently running poll.
    • (Admin) /poll add <poll name> <option> - Adds an option people can vote for to a poll.
    • (View) /poll list - Lists all currently running polls and how much time they've got left to live.
    • (View) /poll info <poll name> - Shows what you can vote for, and how many votes have been cast to what in a poll.
    • (Vote) /poll vote <poll name> <index> - Casts your vote. Each user may vote only once on each poll.
    • (View) /poll results - Shows completed polls, the winning option, and how may votes it got.
    • (All) /poll help - Shows what commands are available to you.
    Examples (open)


    Admin: /poll create tacos 5/30 Should Notch add tacos?
    - Creates a new poll "tacos" which will run for 5 hours and 30 minutes, with a tasty topic.

    Admin: /poll add tacos Why hasn’t he already?!?!
    Admin: /poll add tacos No, tacos are overrated.
    Admin: /poll add tacos I cannot decide due to my crippling indecisiveness.
    - Adds Three options which people can vote for

    User: /poll list
    - Shows that there's a taco related poll, and maybe some more.

    User: /poll info tacos
    - Shows what options are available, how many people have voted for what, and tells him/her/it how to vote.

    User: /poll vote tacos 2
    - User votes for option two ("tacos are overrated").

    Admin: /poll info tacos
    - Sees that someone has voted no to tacos, and has had quite enough of that.

    Admin: /poll end tacos
    - ends the poll (The poll would have ended on its own in 5 and a half hours too).

    User: /poll results
    - Sees that the tacos poll is completed, and which option won.

    All these commands hard to remember?
    Check out this handy dandy pdf made by Chrisc97.


    Permissions support:
    SMPoll uses three permissions nodes, "smpoll.admin", "smpoll.view", and "smpoll.vote".
    smpoll.admin allows someone to use: /poll create, /poll add, and /poll end.
    smpoll.view allows someone to use: /poll list, /poll info, /poll results.
    smpoll.vote allows someont to use /poll vote.

    If you do not have permissions installed, it will default to giving ops admin permission, and everyone else vote and view permission.

    TODO list:
    - Make active polls persist across server restarts.

    Changelog:
    Version 0.3
    • Added permissions support
    • Changes the playerlistener to work with the latest craftbukkit (build 605).
    • Added a /poll help command, since I meant to do so in the first place :D.
    Version 0.2

    • Cleaned it up before releasing it :).
    Version 0.1

    • Initial build
     
    Pheonix14 likes this.
  2. Offline

    seventoes

    A permissions node for voting would be super useful. I use voting right now so that current members can vote on who else becomes a member of our server, but only members can vote.
     
  3. Offline

    lastmikoi

    Seems that it won't work if I haven't Permissions installed.

    It is possible to choose if we want to use Permissions ?
     
  4. Offline

    redf1sh

    If it is a bug of course I'll try to fix it :D, though there's not much I can do without details.

    I think I will add something like that, but I'll add a config file so admins can decide whether or not to use it.

    It should work without permissions, it will just default to "only ops can do admin stuff" mode.
     
  5. Offline

    Pontus Lantz

    Doesn't seem to work.
    Code:
    [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to SMPoll
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
        at com.bukkit.redf1sh.smpoll.SMPoll.hasAdminPermission(SMPoll.java:122)
        at com.bukkit.redf1sh.smpoll.SMPoll.help(SMPoll.java:359)
        at com.bukkit.redf1sh.smpoll.PollPlayerListener.onPlayerCommandPreprocess(PollPlayerListener.java:72)
        at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:193)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
        at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:586)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:557)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:551)
        at net.minecraft.server.Packet3Chat.a(SourceFile:24)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-04 20:33:48 [INFO] Qboll issued server command: poll help
    
    Edit: Don't have Permissions installed btw
     
  6. Offline

    redf1sh

    Agh, I thought permissions was supposed to behave better. Ah well, that's easily fixed I'll make a new release tonight or tomorrow. Thanks mate!

     
  7. Offline

    chrisc97

    Updated the cheat sheet for SMPoll 0.3 and the /poll help command - the PDF link will point to the new version automatically.
     
  8. Offline

    Pheonix14

    Is this compatible with Nikikojuns permissions plugin or the Pheonix permissions plugin?

    It hasn't crashed my server yet.:p keep up the good work.:D
     
  9. Offline

    redf1sh

    Yup! At the moment there's an ampoll.admin permission, there's about to be an smpoll.vote permission as well. Indeed it sounds like it may not work without permissions :D at the moment. I havn't tried it with pheonix, so lemme know if it works.

    New version's up, this version should fix that NoClassDefFoundError and adds two new permissions, smpoll.vote and smpoll.view. They're pretty self explanatory, details are in the OP. If you are using Permissions you'll need to set these up, or your users will never decide on anything.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  10. Offline

    Pontus Lantz

    Nice works for me now. Though when i start the server and the plugin is loaded this comes up in the log
    Code:
    2011-04-04 21:55:45 [INFO] SMPoll: Warning, unable to connect to permissions plugin, just using op.
    2011-04-04 21:55:45 [INFO] SMPoll version: 0.3 is enabled!
    2011-04-04 21:55:45 [INFO] Error: org.sqlite.JDBC
    2011-04-04 21:55:45 [SEVERE] java.lang.ClassNotFoundException: org.sqlite.JDBC
    2011-04-04 21:55:45 [SEVERE]     at java.net.URLClassLoader$1.run(Unknown Source)
    2011-04-04 21:55:45 [SEVERE]     at java.security.AccessController.doPrivileged(Native Method)
    2011-04-04 21:55:45 [SEVERE]     at java.net.URLClassLoader.findClass(Unknown Source)
    2011-04-04 21:55:45 [SEVERE]     at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    2011-04-04 21:55:45 [SEVERE]     at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    2011-04-04 21:55:45 [SEVERE]     at java.lang.ClassLoader.loadClass(Unknown Source)
    2011-04-04 21:55:45 [SEVERE]     at java.lang.ClassLoader.loadClass(Unknown Source)
    2011-04-04 21:55:45 [SEVERE]     at java.lang.Class.forName0(Native Method)
    2011-04-04 21:55:45 [SEVERE]     at java.lang.Class.forName(Unknown Source)
    2011-04-04 21:55:45 [SEVERE]     at com.aranai.spawncontrol.SpawnControl.initDB(SpawnControl.java:100)
    2011-04-04 21:55:45 [SEVERE]     at com.aranai.spawncontrol.SpawnControl.onEnable(SpawnControl.java:252)
    2011-04-04 21:55:45 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    2011-04-04 21:55:45 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:514)
    2011-04-04 21:55:45 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
    2011-04-04 21:55:45 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
    2011-04-04 21:55:45 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
    2011-04-04 21:55:45 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
    2011-04-04 21:55:45 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
    2011-04-04 21:55:45 [SEVERE]     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
    2011-04-04 21:55:45 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
    2011-04-04 21:55:45 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    2011-04-04 21:55:45 
    Everything seems to work though but i don't like the word Severe so hopefully this helps ;)
     
  11. Offline

    redf1sh

    That might be an issue with another plugin, the last thing SMPoll should print is that it's enabled (unless something somewhere went real crazy). Also it looks like an error trying to talk to database stuff, and I don't use a database :p (although I might in the future, would be way nicer than leaving results in a flatfile... hmmmm).
     
  12. Offline

    seventoes

    The way that polls are started right now is a bit funky IMO. Part of the poll time is taken up by the poll starter adding options. It'd be nice if we could create the poll, add the options, and then start it once it's ready. An announcement from the plugin to all eligible voters when the poll starts would be nice, too, so I don't have to announce "Ok everyone, /poll info somepoll" for every one.
     
  13. Offline

    ulidtko

    Good work, I needed that plugin.

    Two remarks: yes, do the polls persistable please, so that long-lasting, several days long polls would be possible.
    Second:
    Code:
    >poll help
    01:10:56 [INFO] Unknown console command. Type "help" for help.
    
    — I would really like to submit polls from the server console, not only from ingame.
     
  14. Offline

    Pheonix14

    Well, good news is it's still a great plugin (apart from the fact that it doesn't work with build 677) Bad news is that Pheonix permissions is a bad one... SMPoll works fine in Pheonix but Pheonix does not want to work and play well with others, so, i'm just running it as it is.

    Would be great if you could get it up to Build 677 (I still have an unanswered poll on my server) but until then, keep it up.
     
  15. Offline

    redf1sh

    I've been meaning to get an update out, but I'm on vacation and have rather limited techy stuff with me. I'll update to the latest build when I'm home, with persistent polls and some new shinyness :D
     
  16. Offline

    Pheonix14

    sounds nice :) I haven't been on my server in a while so I'll have to update everything but I'm looking forward to seeing what this "shinyness" is...
     
  17. Offline

    Plague

    considered inactive
    (and title is missing plugin version)
     
  18. Offline

    Hojop25

    Ok...so i must be missing something here, but what the heck do you use for runtime, i've tried loads of different things, but it just doesnt understand, please help! :/
     

Share This Page