QuizzerBot

An engaging quiz plugin for Paper (1.21.6+) that brings fun trivia to your server. Features automatic chat quizzes and new on-demand Dialog GUI quizzes, with leaderboards and custom rewards.

128

QuizzerBot

(Note: This README was written with AI assistance)

🌟 Summary

QuizzerBot is an engaging Paper (or its forks) server-side quiz plugin that brings fun trivia challenges to your Minecraft world. Compete in server-wide timed chat quizzes, or explore new interactive quiz menus with the new Dialog GUI system! Players can compete for rewards and a spot on the leaderboards.

Plugin default language: zh_CN. Note: Multi-language support (i18n) is not yet implemented but is planned for future updates.

📝 Description

Why Choose QuizzerBot?

- 🎮 Two Ways to Play:

- Classic Chat Quizzes: The original fast-paced, timed trivia event that appears directly in chat.

- New! Dialog GUI Quizzes: An interactive, on-demand quiz menu built with Paper's new Dialog API (requires 1.21.6+).

- 🏆 Dual Leaderboards: Separate rankings for both the classic chat quizzes and the new Dialog quizzes to track different skills.

- ⚙️ Easy Management:

- New! CSV Import/Export: Easily manage your question banks! Export questions to a CSV, edit them in any spreadsheet program, and re-import them. (Warning: Importing overwrites the entire table, so please be careful!)

- Simple in-game commands for adding, deleting, and modifying questions for both systems.

- 🎁 Customizable Rewards: Configure custom commands to reward players for correct answers (supports %player% placeholder).

- 🚀 Lightweight & Easy Setup: Works out-of-the-box with automatic configuration. Uses SQLite, so no external database is required.

How It Works

1. Timed Chat Quizzes (Classic)

- The plugin randomly selects questions from the main database at intervals randomly chosen from a configurable time range (trigger_interval_sec).

- Questions appear globally in chat with clickable answer options.

- Players have a set time limit (defined in answer_reveal_delay_sec) to answer before the quiz ends.

- After the time is up, results are announced. Rewards are given to a set number of correct players (up to player_reward_limit). 'Quick Answer' status is given to the first few correct players (up to player_QuickAnswer_limit).

- If a 'quick' player answers incorrectly, their reward slot can be taken by the next correct player in line, ensuring rewards are distributed.

2. Dialog GUI Quizzes (New in 1.2.0)

- Players can type /quiz dialog to open a new interactive menu.

- This system uses a separate "Extra" question bank, keeping its stats and leaderboards distinct from the chat quizzes.

- Perfect for creating on-demand challenges, server guides, vocabulary lists (like CET-4/6 words!), or special event trivia.

Commands

Player Commands

- /quiz ans <answer> - Submit your answer for a chat quiz.

- /quiz me - View your personal quiz statistics.

- /quiz query <player> - View another player's statistics.

- /quiz top [total|correct|quick|rewards] - Show the leaderboards for classic chat quizzes.

- /quiz dialog - Open the new interactive Dialog GUI for extra quizzes.

Admin Commands (General)

- /quiz reload - Reload the plugin's configuration files.

- /quiz reset <player> - Reset all quiz data for a specific player.

- /quiz help - Show the help menu.

Admin Commands (Timed Chat Quiz)

- /quiz startnow - Force-start a timed chat quiz.

- /quiz stop - Stop the automatic timed quiz scheduler.

- /quiz enable <true|false> - Enable or disable the timed quiz scheduler.

- /quiz add <Q> <A> <B> <C> <D> <Correct> - Add a new question (e.g., /quiz add "What is 1+1?" "1" "2" "3" "4" "B").

- /quiz delete <id> - Delete a question by its ID.

- /quiz modify <id> <field> <value> - Modify a specific part of a question.

- /quiz toggle <id> <true|false> - Enable or disable a specific question from appearing.

- /quiz list [page] [sort] - List all questions in the main bank.

- /quiz detail <id> - View all details for a specific question.

Admin Commands (Dialog GUI Quiz - "Extra")

- /quiz extra add ... - Add a question to the Dialog GUI bank.

- /quiz extra delete <id> - Delete a Dialog GUI question.

- /quiz extra modify <id> ... - Modify a Dialog GUI question.

- /quiz extra toggle <id> ... - Enable/disable a Dialog GUI question.

- /quiz extra list - List all Dialog GUI questions.

- /quiz extra detail <id> - View details for a Dialog GUI question.

Admin Commands (Database Management)

- /quiz database export <table_name> - Export a question table (e.g., questions or extra_questions) to a CSV file.

- /quiz database import <table_name> - Import data from a CSV file, fully overwriting the specified table. (Use with caution!)

Configuration (config.yml)

- min_players: Minimum players online required to start a timed quiz.

- trigger_interval_sec: The time range (min, max) in seconds for a quiz to randomly trigger. If both values are the same, the interval is fixed.

- answer_reveal_delay_sec: Time limit to answer a question (in seconds).

- reward_commands: List of commands to run for a winner (e.g., ["give %player% diamond 1"]).

- daily_reward_limit: Maximum number of rewards a player can win from timed quizzes per day.

- player_reward_limit: Maximum number of players that can be rewarded per quiz.

- player_QuickAnswer_limit: Maximum number of players who can be recognized for a 'Quick Answer' (must be correct).

- Note: Rewards are given based on player_reward_limit. 'Quick Answer' players are prioritized, but if they answer wrong, the reward slot rolls down to the next correct player.

Technical Info

- Requires: Paper (or its forks) 1.21.6+ (The new Dialog GUI feature requires 1.21.6+, though the classic chat quiz may work on 1.21+).

- Database: Uses SQLite by default (no setup needed).

- Dependencies: Automatically downloads the H2 database driver on first run (no manual download needed). Download speed depends on your server's network connection.

📧 Contact & Feedback

- Have suggestions or found a bug? Please let me know! - Email: yanhy2000@foxmail.com

ADS