Create a Complete Minecraft Plugin: DailyOrBan Act as an expert Minecraft Java plugin developer. Create a complete, working Minecraft plugin named DailyOrBan for Paper/Spigot servers.
- Plugin concept
Every player receives exactly ONE daily task. They must complete it within 24 hours of the task being assigned.
If the player completes the task before the deadline, they survive and become eligible for their next daily task.
If the player fails to complete the task within 24 hours, the plugin automatically bans them for 24 hours.
There are no money rewards, economy integrations, or external plugin dependencies.
The system must work automatically without requiring an administrator to assign tasks manually.
- Technical requirements
Language: Java API: Paper/Spigot Build system: Maven Plugin name: DailyOrBan Main class: com.naman.dailyorban.DailyOrBan Plugin version: 1.0.0 Use a configurable Minecraft API version compatible with the selected server version.
Provide a complete pom.xml, plugin.yml, Java source files, and configuration files.
Do not use pseudocode, placeholders, or missing methods. Generate complete source code that compiles.
If the server version is unknown, ask me for it before generating version-specific code.
- Daily task system
Create a pool of configurable tasks, such as:
Break 32 stone blocks.
Collect 16 oak logs.
Kill 5 zombies.
Harvest 16 wheat.
Craft 8 bread.
Mine 5 coal ores.
Requirements:
Assign one random, valid task to each eligible player.
Track progress automatically using Minecraft events.
Display task name, required amount, current progress, and remaining time.
Do not count unrelated blocks, items, mobs, or actions.
Prevent duplicate task assignment during the same task cycle.
Validate task completion server-side.
Once completed, do not assign another task immediately. Assign the next task according to the configured daily cycle.
Make task definitions editable in config.yml.
- Deadline and automatic banning
Give every assigned task a deadline exactly 24 hours after its assignment timestamp.
Save the assignment timestamp and deadline.
Check expired tasks automatically, including after server restarts.
When the deadline expires without completion, issue a 24-hour ban.
Store the ban expiry timestamp so restarts do not reset the ban duration.
Display a clear reason when a player is banned.
Notify players of their task and remaining time.
Use persistent storage so a player cannot escape the deadline by logging out or restarting the server.
Ensure the task is checked and the ban is applied exactly once.
Avoid scheduling one repeating task per player when a single central scheduler can handle deadline checks.
- Persistence
Use SQLite or another reliable local persistent database.
Persist:
Player UUID and last known name.
Current task identifier.
Required task amount and progress.
Assignment timestamp and deadline.
Task completion status.
Ban expiry timestamp and ban status.
Requirements:
Survive server restarts and crashes.
Use UUIDs as player identifiers, not usernames.
Handle offline players.
Use safe database access and close resources properly.
Avoid losing progress during normal shutdown.
Prevent duplicate assignments and duplicate bans.
- Commands
Implement the following commands. /daily Shows:
Current task.
Progress, such as 12/32.
Time remaining in hours, minutes, and seconds.
Whether the task is completed. /dailyadmin status <player> Shows the player's task, progress, deadline, and ban status. /dailyadmin assign <player> Assigns a new task to a player only when appropriate. Do not silently overwrite an existing task. /dailyadmin complete <player> Marks the current task complete and prevents a deadline ban for that task. /dailyadmin reset <player> Resets the player's current task and assigns a fresh 24-hour deadline after confirmation or an explicit administrative action. /dailyadmin unban <player> Removes the DailyOrBan ban and updates the plugin's stored ban status. /dailyadmin reload Reloads configuration safely without losing player progress or changing existing deadlines.
Include proper tab completion and meaningful error messages.
- Permissions
Implement: dailyorban.use — access to /daily. dailyorban.admin — access to all administrative commands.
Default ordinary player access to /daily should be enabled. Administrative access must be restricted to operators or explicitly authorized staff.
- Configuration
Create a complete config.yml containing:
Task pool and task amounts.
Task assignment settings.
Task deadline duration, default 24 hours.
Ban duration, default 24 hours.
Message customization.
Deadline-check interval.
Database settings where appropriate.
Time zone or deadline-related settings where applicable.
Do not reset active players' deadlines when configuration is reloaded.
- Important edge cases
Handle:
Players logging out before their deadline.
Players remaining offline past their deadline.
Server restarts and crashes.
Players completing tasks just before the deadline.
Players reconnecting after their ban expires.
Duplicate event processing.
Invalid or disabled tasks.
Missing permissions.
Administrator intervention.
Database errors.
Players attempting to manipulate progress.
Use a consistent time source and clearly define how deadlines are compared. Ensure task completion and deadline processing cannot both produce contradictory outcomes.
Use a proper persistent ban mechanism that survives restarts. Make sure the ban expires after 24 hours and that the player can rejoin after expiry, even if the server was offline when the ban should have ended.
- Deliverables
Provide:
The complete project directory structure.
Every Java source file in full.
Complete pom.xml.
Complete plugin.yml.
Complete config.yml.
Database initialization and persistence implementation.
Beginner-friendly build instructions using Maven.
Instructions for importing the project into IntelliJ IDEA or Eclipse.
Instructions for building the plugin JAR.
Instructions for installing it into the server's plugins folder.
A testing checklist covering task assignment, progress tracking, completion, missed deadlines, restarts, and ban expiry.
A list of commands and permissions.
Explain where each file belongs. If you have access to a coding environment, create the complete project and build it. Otherwise, provide all source files needed to build it locally.
Do not claim the plugin works unless you have successfully compiled and tested it. Fix compilation errors before presenting the final result.
Start by confirming the target Minecraft/Paper/Spigot version, then build the complete project.