Quiz Game for Students

Discussion in 'Archived: Plugin Requests' started by Chicks797, Jul 10, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Chicks797

    Plugin category: Mini Game

    Suggested name: Quiz Game (or Quiz Show)

    What I want:

    My husband and I are both teachers and manage a server for elementary students in our district. I had an idea for something I wanted to add, but he couldn't find a plugin that would do it so he suggested I ask here.

    There's lots of educational quests for the kids to go on, but I would like to have a constantly running quiz type game running on the server. Something that would work like this:

    - I write question and answer pairs in a configuration file (just maybe one or two word answers, not case sensitive)

    - The quiz can be turned on and off with a command in case there are times we don't want it running

    - When turned on the quiz would broadcast a randomly selected question from the configure file. Then it would wait a predetermined amount of time. It would be nice if I could set the time in the configuration file because who knows? 10 minutes, 15, or 30 might be good or might be annoying.

    - The server would broadcast the question once, then monitor chat to see if a student says the answer. If they do, it congratulates them by name and gives them a reward. Maybe something random from a list like an item. Or we use Vault so we could have a money reward. Or both if it doesn't make it harder.

    - Then the server would continue waiting out the time before asking another question. I thought about giving a new question if a student got the answer, but then they could just abuse it and get a ton of items.

    - An added feature if it doesn't make it way too complicated would be a command students could use that would show the top 5 people with the most correct answers.

    Ideas for commands: /quiz start, /quiz stop, /quiz top

    Ideas for permissions: Just for us to turn the quiz on and off

    When I'd like it by:

    If this is too massive I totally understand but thought it was worth a shot to ask. I understand people help in their spare time so no pressure. The community has been very helpful in getting our server up and going. I just think this would be another way to keep the kids engaged and learning that they would be excited about.
     
    Huntfishplay likes this.
  2. Offline

    Mathias Eklund

    I'll do this :) Seems like it is for a good cause, so i will spend some time on this.

    EDIT:
    <Edit by Moderator: Redacted mediafire url>
    Plugin is semi finished. Haven't added any permissision messages so if someone types a command without access it wont really do anything.

    Commands:
    /quiz start - quiz.start - starts the quiz, quiz is not on by default.
    /quiz stop - quiz.stop - stops the quiz, quiz is off by default.

    in the config you will be able to add as many questions as you want, by following the format of the example questions.

    The reward can be money and an item or just one of them. The format for this is money:amount for money and item:ITEM_NAME,amount for the items.

    The interval is counted in minutes.

    Will add in the top 5 list that you wanted later on. Need to grab food at the moment so will get on that later on when I can.

    If there is anything that I have forgotten to the features that are in this version, please notify me, and if you have additional features don't be scared to tell me.
     
    Last edited by a moderator: Nov 2, 2016
  3. Offline

    EddieFriday

    Mathias Eklund
    Can you add in the a config for prefix in the config.yml?

    And could you please add a message which will tell the player who answers a wrong answer?

    Mathias Eklund
    Detected an error in the console:

    Code:java
    1. [19:04:35] [Server thread/INFO]: EddieFriday issued server command: /quiz start
    2. [19:04:35] [Server thread/INFO]: Detected 1 number of questions.[m
    3. [19:04:35] [Server thread/INFO]: What is 1 + 1?[m
    4. [19:04:35] [Server thread/INFO]: Detected 2 number of questions.[m
    5. [19:04:35] [Server thread/WARN]: [Quiz] Task #75 for Quiz v0.1 generated an exception
    6. at org.bukkit.ChatColor.translateAlternateColorCodes(ChatColor.java:206) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    7. at me.dojmgubben.quiz.Quiz.startQuiz(Quiz.java:135) ~[?:?]
    8. at me.dojmgubben.quiz.Quiz$1.run(Quiz.java:144) ~[?:?]
    9. at org.bukkit.craftbukkit.v1_7_R3.scheduler.CraftTask.run(CraftTask.java:53) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    10. at org.bukkit.craftbukkit.v1_7_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    11. at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:600) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    12. at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    13. at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    14. at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    15. at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    16. [19:07:45] [Server thread/INFO]: [m[0;33;22mConsole [m [mServer needs Plugin Developer and Builders. Please post your intentions at our website or message any staff in-game.[m
    17.  


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

    Mathias Eklund

    EddieFriday Updated the plugin. See if you get it now. Think I uploaded the wrong version at first. (silly me).
     
  5. Offline

    EddieFriday

    Mathias Eklund
    Can you add in the a config for prefix in the config.yml?

    And could you please add a message which will tell the player who answers a wrong answer?
     
  6. Offline

    Mathias Eklund

    EddieFriday not gonna add a message for wrong answer as players should still be able to chat while the quiz is running. I can add the prefixes though.

    EDIT: Added an option for a prefix infront of messages. make it nothing to remove it.
     
  7. Offline

    EddieFriday

    Mathias Eklund
    Another Console Error after update...
    Code:java
    1. [19:19:49] [Server thread/INFO]: EddieFriday issued server command: /quiz start
    2. [19:19:49] [Server thread/INFO]: What is 60 * 14?
    3. [19:21:04] [Server thread/ERROR]: Could not pass event PlayerChatEvent to Quiz v0.1
    4. org.bukkit.event.EventException
    5. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    6. at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    7. at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    8. at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    9. at net.minecraft.server.v1_7_R3.PlayerConnection$3.evaluate(PlayerConnection.java:890) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    10. at org.bukkit.craftbukkit.v1_7_R3.util.Waitable.run(Waitable.java:24) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    11. at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:604) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    12. at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    13. at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    14. at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    15. at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    16. Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
    17. at me.dojmgubben.quiz.Quiz.onPlayerChat(Quiz.java:176) ~[?:?]
    18. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60]
    19. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
    20. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
    21. at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60]
    22. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-11-g3fd9db2-b3098jnks]
    23. ... 10 more
     
  8. Offline

    Mathias Eklund

  9. Offline

    EddieFriday

    Mathias Eklund
    Yes but this error reflects to the latest updated plugin that you updated..
     
  10. Offline

    Mathias Eklund

    EddieFriday once again, I will say. That error is fixed, just updated it...
     
  11. Offline

    EddieFriday

    Mathias Eklund
    Can you post the latest plugin link below my post to keep away the confusion? And to evaluate further which is which?
     
  12. Offline

    Mathias Eklund

    EddieFriday <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 2, 2016
  13. Offline

    EddieFriday

    Mathias Eklund
    Ok provided that you said twas fixed downloading the file from the link and I will report as soon as possible..

    Mathias Eklund
    The plugin is now fixed.. Thanks for the update and making time to create it. Even if i'm not the one requesting.. I thank you for providing this to us..

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

    Mathias Eklund

    EddieFriday good to know. If anything comes up though, report it :)
     
    Huntfishplay and EddieFriday like this.
  15. Offline

    Chicks797

    Thank you! And I'm glad to see someone else is going to be using it too. I would definitely submit this for download, I think a lot of people would use it. And I agree, reporting wrong answers would spam the chat a lot. But there are few tweaks I wanted to ask about after playing with it this morning if that's okay.

    1) I'm not sure if this is another plugin doing this or not, but it always puts a 0 and 1 after the congrats message:
    [Quiz] Congratz! You answered the question correctly! Take this reward! :)
    0
    1

    2) Instead of just telling the player they are correct, can it announce it to the server along with the name of who got it right? (It would probably encourage them more).

    3) Is it possible to make the rewards random? Like, another list in the configure file (or a separate one) with a long list of item and money rewards and for each question it picks a random reward? I do like that you can specify both money and items. Combining #2 and #3, would it be hard to announce the reward also? Something like:
    [Quiz] PLAYER answered the question correctly! Their reward is: REWARD

    4) When someone gives the right answer of course everyone sees it (which is good, we wouldn't want it muted, it helps them learn). But, someone else can then type in the same answer and get the reward. Can it be set to stop taking responses after the first correct one, and then wait out the timer until the next question? (I wouldn't want it to jump straight to the next question after a correct answer, but just wait it's normal cycle)

    5) Were you still going to add the top5 and permission for starting and stopping? (I can just see kids starting and stopping it and running through the questions to get a ton of stuff)

    6) This last one is optional, I really hate asking for extra things. I greatly appreciate your work and how well the plugin operates. But would it be possible to add a /quiz reload command to reload the configure? That way we don't have to restart the server when adding questions. If that's not something very simple, don't worry about it.

    On a side note, I REALLY appreciate that you added the ability for more than one correct answer. We use Quests for educational content and the creator added that ability. It was very difficult when kids were locked into one specifc way to answer (2 instead of two). I was going to ask for that, but didn't want to make the request more difficult!
     
  16. Offline

    Mathias Eklund

    Chicks797 the 0 and 1 after the answer is just debugs that I have forgotten to remove. I will fix that and I already added permissions for the start and stop, they are: quiz.start and quiz.stop. the top5 list is also gonna be added. I will change some other stuff as well like the /reload command and that the quiz can't be answered after someone gets it right will also make it broadcast the correct answer, that was a good idea :)

    EDIT:
    I'll also add in the global reward list.

    <Edit by Moderator: Redacted mediafire url>
    updated the plugin to all the changes you wanted, it now selects a random reward from a list in the config, when someone answers correct it broadcasts a message which is configurable. (%m = money, %i = item, %ia = itemamount, %p = player. Used in the message.) and the question can't be answered by anyone else after someone gets it.

    EDIT: Added the scoreboard now as well. /quiz top5 to display the top5 "quizzers" for 10 seconds. permission to use this command is: quiz.top5 :) I will also be taking chicks suggestion and put this on dev.bukkit, I do need to put some stuff up there I guess.

    EDIT: Decided not to post it on dev.bukkit, too much of a hassle to actually write up the description, I am a lazy person. So wont be up there.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 2, 2016
    Huntfishplay and EddieFriday like this.
  17. Offline

    Chicks797

    [quote uid=72964 name="Mathias Eklund" post=2651094]<Edit by Moderator: Redacted mediafire url>
    updated the plugin to all the changes you wanted,/quote]

    We had to go out of town this weekend for a wedding but will be back home late tonight. I can't wait to try it out! l'll post again as soon as I do, but can't thank you enough.
    It makes me wonder how many great plug-ins are floating around unnoticed. I wanted too offer, I would be happy to do the writeup for you. I could just send it to you or submit it for you with you as the author. My husband said he would make you a logo. (I understand if you don't want to bother, but it's so useful and I think you should get recognition for your work.)[/quote]
     
    Last edited by a moderator: Nov 2, 2016
  18. Offline

    Mathias Eklund

    Chicks797 If you want to post it yourself on Bukkit be my guest :)
     
  19. Offline

    EnderTroll68

    Feel like posting the source as well? I am interested.
     
  20. Offline

    Triangle_Chris

    Yeah I'd love to try this out. A neat idea for sure!
     
  21. Offline

    Mathias Eklund

    EnderTroll68 Just decompile it :) Will give you messy code, but it should work :)
     
  22. Offline

    Chicks797

    It works great! Of course I've never submitted anything to Bukkit, but I'll see if it will let me do it with you as the author. If not, I'll just write up all the fields and copy/paste and send them to you to make it easier. There is one quick little change and a question I had to be sure I was writing it up correctly:

    I don't know how to edit the jar file, so can't edit the configure file it makes, but there's a couple mistakes on this line:
    - correct: '&b%p answered the question correctly! He recieved %m$ and %ia %i.'

    Needs to be:
    - correct: '&b%p answered the question correctly! They received $%m and %ia %i.'

    Since you don't know if the player is male or female I changed it to 'They', received had the 'ei' reversed, and the $ was coming after the dollar amount. Also, dollar amounts come out (let's say for $100) as $100.0. Would it be possible to remove that .0? I don't mean to be picky, I can just imagine a bunch of elementary students picking it up and start writing dollar amounts incorrectly in class!

    Also, I wasn't sure if you put in the /reload quiz command. It doesn't seem to do anything, as it always puts the configure file back to what it was originally. If you didn't implement it, don't worry about it, it isn't really needed. I just wasn't sure and didn't want to say it was there in the write up.

    Thanks! I'll get working on writing things up!

    Oh, quick question. I wonder if there's a way to format an item in the configure file so that you can give an enchanted item as a reward?

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

    Mathias Eklund

    Chicks797 totally forgot about the reload command. and yes, i could implement a way to give enchanted items :)

    EDIT:
    <Edit by Moderator: Redacted mediafire url>
    Updated the plugin again :) Now it contains the reload commands, which is "/quiz reload". and you can also add enchantments to the item reward.
    item:ITEM_NAME,ITEM_LEVEL,ENCHANT_NAME,ENCHANT_LEVEL

    This project can now be found on dev.bukkit !
    http://dev.bukkit.org/bukkit-plugins/quizshow/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 2, 2016
  24. Offline

    Chicks797

    Great! Although could you give me an example of an enchanted item? Is item level the number you get? Also, does it have to be DIAMOND_SWORD or can you use numeric IDs?

    (Let us know if you don't like the logo for the plugin)
     
  25. Offline

    Mathias Eklund

    Chicks797 Haven't seen a logo yet, so can't answer that question. and no, it only works with names for items. and an example of enchants are DAMAGE_ALL,3 to give sharpness 3 enchantment.
     
  26. Offline

    daavko

    Chicks797 Hint: All enchantment names in format this plugin accepts can be found here
     
  27. Offline

    Mathias Eklund

    daavko I'll add that in the project so people know what they can use. If I get the time to make the plugin more user friendley I'll make sure to add aliases.
     
  28. Offline

    daavko

  29. Offline

    Chicks797

    daavko Thank you!
    Mathias Eklund
    So this would give 1 diamond sword, with sharpness 3?
    DIAMOND_SWORD,1,DAMAGE_ALL,3

    Two other things:
    1) Sorry, I attached the logo on my PM but it may not have came through. Here it is. I can get my husband to do something else if you would like.
    2) I'm not sure how hard it is to add when they approve the plugin, but if it's easy to add a forum or something, I would be happy to post the configure file I'm doing so people don't have to start from scratch. They might not want a bunch of elementary questions, but the item list could save some time.
    [​IMG]
     
  30. Offline

    Mathias Eklund

    Chicks797 That logo looks okay :)
    I really don't know how this dev.bukkit thing works, but I'll see what I can do.
     
Thread Status:
Not open for further replies.

Share This Page