Vote Cmd Plugin

Discussion in 'Archived: Plugin Requests' started by TheDiamondMinner, Jul 14, 2014.

  1. Hello!

    I am looking for someone to create a very simple plugin.
    The first cmd i want in the plugin is /vote which has a config file for colored text for voting links, etc.
    The second command i want is /topvoters which shows the topvoters of the month.

    Thanks, Colin
     
  2. Offline

    ZodiacTheories

  3. It doesn't have the /topvoters command and I dont believe it even has the /vote command either.
     
  4. Offline

    simgar98

    GAListener?
     
  5. it only has /vote cmd not /topvoters
     
  6. Offline

    crolemol

  7. 1.7.9

    Thank you!
     
  8. GAListener, does have topvoter, its the command ./votetop.
     
  9. how do you config that though?
     
  10. Offline

    crolemol

    TheDiamondMinner
    Problem : there's no event for clicking a link in the chat so topvoter will be difficult and i don't know how to do it
     
  11. Offline

    timtower Administrator Administrator Moderator

    crolemol If you are able to do it: use a json message. Then you can suggest to open a link, you can use the hover event stuff, suggest a command on click.
     
  12. Offline

    crolemol

    timtower
    The key word is suggest. They don't need to vote and the hover event will also be executed. Any other idea
     
  13. Offline

    timtower Administrator Administrator Moderator

    Lets start with this: what are you trying to achieve?
     
  14. Offline

    crolemol

    timtower
    When they click on a link in the chat the window from mine raft appears en when you click yes a piece of code will be executed. I'm pretty sure that this is very difficult and it is maybe even not possible. But hope someone can help me
    Edit: any other option is also welcome
     
  15. Offline

    timtower Administrator Administrator Moderator

    crolemol Yeah, that isn't possible. What is the function of the code?
     
  16. Offline

    crolemol

    When the code will be executed their votecounter will be increased by 1 so the plugin knows who did vote the most timtower timtower
     
  17. Offline

    timtower Administrator Administrator Moderator

    crolemol You do know that you don't click on stuff in minecraft right? Besides a link to a voting website maybe. Check Votifier, just need to listen to the event.
     
  18. Offline

    crolemol

    timtower
    I don' t understand this post. What do you mean with click on stuff in minecraft and which event do I need?
     
  19. Offline

    timtower Administrator Administrator Moderator

    crolemol You are trying to make minecraft execute code. You don't need that. Votes are send from websites. Votifier will catch those votes and throw events for them. Listen to those events and you have everything you need.
     
  20. Offline

    crolemol

    timtower
    I understand it, I am now trying to do that

    TheDiamondMinner timtower
    The plugin is done, not tested beacause i don't have a server with votifier setted up
    anyways here's the link of there are any error send my the tracestack and I will fix them.
    https://www.dropbox.com/s/7dpjwl6jvqme4a6/votecmd.jar Edit: plugin requires votifier to work

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  21. Offline

    timtower Administrator Administrator Moderator

    crolemol Try ChatColor.translateAlternateColorCode('&',<original string here>) instead of that long method.
     
  22. Offline

    crolemol

    timtower
    That's indeed a better way to do that but i don't know how that method does work so maybe later

    timtower
    What does this error mean
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0

    at me.crolemol.votecmd.Votecmdcommandexecutor.onCommand(Votecmdcommandexecutor.java:25)
    I know it is caused on line 25
    but I do't know what java.lang.ArrayIndexOutOfBoundsException does mean

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  23. Offline

    timtower Administrator Administrator Moderator

    crolemol That you are trying to get an item in an array that doesn't exist
     
  24. Offline

    crolemol

    but this happens when i do "/votecmd" and when i do "/votecmd add" it does what it needs to timtower
     
  25. Offline

    timtower Administrator Administrator Moderator

  26. Offline

    crolemol

  27. Offline

    timtower Administrator Administrator Moderator

    crolemol You never check for the length of the arguments.
     
  28. Offline

    crolemol

    timtower
    (facepalm)
    that's just my stupidness
     
  29. Offline

    MrEditor97

    Possible, by using Votifier and with a custom plugin. Might give it a go!

    I have started coding this plugin, so far. It looks possible. How would you like the results to be stored? MySQL, or a YAML file?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  30. Offline

    MrEditor97

Share This Page