๐
pasted-code-1776637373897.txt
txt
256 lines
โถ
Create a simple PaperMC plugin called "DraculaReviveVote" for my hardcore vanilla Minecraft server.
Build it for Paper 1.21+ in Java.
## Required compatibility
The plugin MUST be compatible with Vault economy.
Use Vault API for all money checks and withdrawals.
Do not create a custom economy system.
Do not hardcode EssentialsX economy.
It must work with any economy plugin that supports Vault.
If Vault is missing, or if no Vault-compatible economy provider is available, the plugin must disable itself on startup with a clear console error.
## Dependencies
Use:
- Vault for economy
- Adventure API / MiniMessage for titles, action bars, and boss bars
- Bukkit/Paper command dispatch to run this exact console command on success:
hplus revive
Keep the plugin simple and production ready.
Do NOT add holograms.
Do NOT add database support.
Do NOT add placeholder support.
Do NOT over-engineer it.
## Main purpose
When a player dies in my hardcore worlds, the server starts a community donation event to revive that player.
The event must be visible to all online players with:
- a large title when it starts
- a boss bar with live progress
- action bar updates
- success/fail title messages
## Rules
- Eligible worlds:
- world
- world_nether
- world_the_end
- When a player dies, they become eligible for a revive donation event
- Players have maximum 15 minutes after death to fully fund the revive
- Revive goal:
- 500000 total money
- minimum 5 different players
- Each donor can donate up to 100000 maximum total
- Success only happens if:
- total donated >= 500000
- unique donors >= 5
- If success happens, run this exact command as console:
hplus revive
- If the timer expires, the revive fails
- Keep the plugin simple:
- one active revive event at a time globally
- no holograms
- no database
- memory-only storage
- Add a 24 hour cooldown per dead player before they can start another revive event
## Vault requirements
- Hook into Vault on plugin startup
- Use RegisteredServiceProvider from Bukkit ServicesManager
- Store the Economy provider in the plugin
- On /revivedonate:
- check balance through Vault
- withdraw money through Vault
- only count donation if withdrawal succeeds
- Never remove money without checking the EconomyResponse result
- Format balances using Vault economy format when possible
- Fail safely if the economy provider becomes unavailable
## plugin.yml requirements
Include softdepend or depend for Vault so startup order is correct.
Register commands and permissions properly.
## Event flow
When a player dies in an eligible world:
1. store:
- player UUID
- player name
- death location
- death time
- expire time = death time + 15 minutes
2. automatically start the revive event if no other revive event is active
3. broadcast chat message:
"&c[Revive] {player} died! Donate to bring them back: /revivedonate "
4. send big screen title to all players
5. create a boss bar for all online players
6. update the boss bar and action bar until event success or failure
If another revive event is already active, do not start a second one.
## Commands
Create these commands:
- /revivestatus
Shows:
- target player
- total donated / 500000
- donor count / 5
- time left
- top donors
- /revivedonate
Donate money into the active revive event
- /revivecancel
Admin command to cancel the active revive event
- /reviveforce
Admin command to force success for the active revive event
Optional alias:
- /donate -> alias of /revivedonate
## Donation behavior
- Reject invalid numbers
- Reject zero or negative donations
- Reject if no active revive event
- Reject if player has insufficient Vault balance
- Reject if donor is the dead player
- Reject if donor would exceed 100000 total donated
- Track total donated per donor
- Count unique donors properly
- Allow donor to donate multiple times as long as their total stays <= 100000
- Only withdraw with Vault EconomyResponse and verify transactionSuccess()
## Display behavior
### Start title
Send to all online players when event starts:
- Title: "&c&lREVIVE EVENT"
- Subtitle: "&fDonate to save &c{player}&f! Goal: &6500,000"
### Boss bar
Create one global boss bar visible to all online players during the active event.
Boss bar text format:
"&cRevive {player} &7| &a{current}/500000 &7| &b{donors}/5 donors &7| &e{time_left}"
Rules:
- Progress = current amount / 500000
- Red under 50%
- Yellow from 50% to under 100%
- Green when total goal reached
- Update every second and after every donation
- Remove boss bar when event ends
- Players who join during the event should see the current boss bar immediately
- Players who leave should be removed cleanly
### Action bar
Send to all players every 3 seconds during the event:
"&cRevive {player}: &a{current}/500000 &7- &b{donors}/5 donors &7- &e{mm}:{ss} left"
### Milestone titles
Send a big title to all players at:
- first donation
- 250000 reached
- 500000 reached
- 5 donors reached
- success
- failure
### Success display
On success:
- Title: "&a&lREVIVE SUCCESS"
- Subtitle: "&f{player} was revived by the community!"
- Broadcast chat with top donors
- Remove boss bar
- Stop update task
- Dispatch console command:
hplus revive {player}
### Failure display
On fail:
- Title: "&4&lREVIVE FAILED"
- Subtitle: "&f{player} was not saved in time."
- Broadcast final donated amount and donor count
- Remove boss bar
- Stop update task
## Sounds
Keep it simple but add configurable sounds:
- event start
- donation received
- success
- failure
## Config
Create a simple config.yml with these values:
revive:
enabled: true
goal-amount: 500000
min-donors: 5
max-per-donor: 100000
revive-window-minutes: 15
cooldown-hours: 24
eligible-worlds:
- world
- world_nether
- world_the_end
display:
title-enabled: true
bossbar-enabled: true
actionbar-enabled: true
actionbar-update-seconds: 3
title-fade-in: 10
title-stay: 60
title-fade-out: 20
sounds:
enabled: true
start: ENTITY_ENDER_DRAGON_GROWL
donate: ENTITY_EXPERIENCE_ORB_PICKUP
success: UI_TOAST_CHALLENGE_COMPLETE
fail: ENTITY_WITHER_DEATH
messages:
prefix: "&8[&cDraculaRevive&8] "
no-active-event: "&7There is no active revive event."
donate-usage: "&cUse: /revivedonate "
donate-invalid: "&cInvalid donation amount."
donate-no-money: "&cYou do not have enough money."
donate-self: "&cYou cannot donate to your own revive."
donate-max: "&cYou cannot donate more than 100000 total."
event-start: "&c[Revive] {player} died! Donate with /revivedonate "
event-success: "&a[Revive] {player} was revived by the community!"
event-fail: "&4[Revive] {player} was not saved in time."
status-format: "&cRevive {player}: &a{current}/500000 &7| &b{donors}/5 donors &7| &e{time_left}"
## Technical requirements
- Use one main plugin class
- Create only a few clean classes, for example:
- DraculaReviveVotePlugin
- ReviveManager
- ReviveEvent
- DonationEntry
- ReviveCommand
- DonateCommand
- Use in-memory storage only
- Use BukkitRunnable or scheduler every second for updates
- Use Vault for all economy actions
- Use Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "hplus revive " + playerName) on success
- Handle player join so they see the active boss bar if an event is running
- Clean up boss bar and tasks properly on plugin disable
- Include plugin.yml
- Include the main class setupEconomy() method using Vault
- Make it ready to compile
## Permissions
- dracularevive.donate
- dracularevive.status
- dracularevive.admin
Generate the full complete plugin code now.
๐
pasted-code-1776637540839.txt
txt
122 lines
โถ
Create only the BASE / SKELETON for a PaperMC plugin called DraculaReviveVote for Paper 1.21+ in Java.
IMPORTANT:
I do NOT want the full plugin yet.
I want only the minimal base files and structure so I can continue building it step by step later.
Keep the code very small, clean, and simple.
Generate only the files we really need.
## Goal
This plugin will later become a hardcore revive donation plugin for my Minecraft server, but for now generate ONLY the base structure.
## Requirements for this first version
Generate only:
- main plugin class
- plugin.yml
- config.yml
- one revive manager class
- one revive event model class
- one donation entry model class
- one listener for player death
- one command executor for /revivedonate
- one command executor for /revivestatus
- one admin command executor for /revivecancel and /reviveforce
- one simple utility/helper class if needed
Do NOT implement the full feature logic yet.
Create only the base with placeholders / TODO sections.
## What should already work
- plugin enables and disables cleanly
- checks for Vault on startup
- checks for a Vault economy provider on startup
- disables itself with a clear message if Vault or economy provider is missing
- loads config.yml
- registers commands
- registers listeners
- creates a simple in-memory ReviveManager
- creates a nullable active revive event field
- commands respond with simple placeholder messages like:
- "Revive system not implemented yet"
- "No active revive event"
- death listener only detects player death in configured worlds and logs a console message for now
- no boss bar logic yet
- no title logic yet
- no action bar logic yet
- no donation logic yet
- no timers yet
- no revive success logic yet
## Vault setup
Implement proper Vault compatibility in the base:
- setupEconomy() method in the main class
- use Bukkit ServicesManager and RegisteredServiceProvider
- store Economy economy field
- getter for economy
- clear startup logs
## Config
Create a small config.yml with:
revive:
enabled: true
goal-amount: 500000
min-donors: 5
max-per-donor: 100000
revive-window-minutes: 15
cooldown-hours: 24
eligible-worlds:
- world
- world_nether
- world_the_end
## plugin.yml
Include:
- name
- version
- main
- api-version
- softdepend or depend for Vault
- commands:
- revivedonate
- revivestatus
- revivecancel
- reviveforce
- donate
- permissions:
- dracularevive.donate
- dracularevive.status
- dracularevive.admin
## Class structure
Use a simple package structure like:
com.draculamc.dracularevivevote
Classes:
- DraculaReviveVotePlugin
- ReviveManager
- ReviveEvent
- DonationEntry
- PlayerDeathListener
- ReviveDonateCommand
- ReviveStatusCommand
- ReviveAdminCommand
## Coding style
- clean Java
- no unnecessary comments
- no advanced abstractions
- no database
- no placeholder API
- no holograms
- no over-engineering
- only the minimum code needed for a good starting base
- include TODO markers where future logic will be added
## Important
Do NOT generate full donation/revive features yet.
Do NOT generate boss bar code yet.
Do NOT generate title/actionbar systems yet.
Do NOT generate timers yet.
Do NOT generate complex business logic yet.
Generate only the starter code files that compile and give me a solid base to continue later.
๐
pasted-code-1776637574323.txt
txt
53 lines
โถ
Create only a very small PaperMC plugin skeleton for Paper 1.21+ called DraculaReviveVote.
I do NOT want the full plugin.
Only generate the minimum base files needed so I can build it later.
Generate only:
- main class
- plugin.yml
- config.yml
- one ReviveManager class
- one PlayerDeathListener class
- one DonateCommand class
Requirements:
- hook into Vault economy
- disable plugin if Vault or economy provider is missing
- register one listener
- register /revivedonate
- load config
- create a simple ReviveManager instance
- death listener only logs a message for now
- /revivedonate only sends "Not implemented yet"
- no boss bar
- no titles
- no timers
- no revive logic
- no holograms
- no database
- no extra classes unless absolutely needed
Config values:
revive:
goal-amount: 500000
min-donors: 5
max-per-donor: 100000
revive-window-minutes: 15
eligible-worlds:
- world
- world_nether
- world_the_end
plugin.yml:
- name: DraculaReviveVote
- api-version: 1.21
- softdepend: [Vault]
- command: revivedonate
- permission: dracularevive.donate
Use package:
com.draculamc.dracularevivevote
Keep the code minimal, compile-ready, and clean.
Add TODO comments where future logic will go.
๐
pasted-code-1776637663183.txt
txt
48 lines
โถ
Create the smallest possible PaperMC plugin base for Paper 1.21+ called DraculaReviveVote.
Generate only 3 files:
- DraculaReviveVotePlugin.java
- plugin.yml
- config.yml
Do not generate any other classes.
Requirements:
- plugin must load on Paper
- plugin must hook into Vault economy
- if Vault or economy provider is missing, disable the plugin
- load config.yml
- log a startup message
- no commands
- no listeners
- no revive logic
- no boss bar
- no titles
- no holograms
- no timers
- no extra features
Package:
com.draculamc.dracularevivevote
Config:
revive:
goal-amount: 500000
min-donors: 5
max-per-donor: 100000
revive-window-minutes: 15
plugin.yml:
name: DraculaReviveVote
version: 1.0.0
main: com.draculamc.dracularevivevote.DraculaReviveVotePlugin
api-version: '1.21'
softdepend: [Vault]
In the main class:
- create Economy economy field
- create setupEconomy() method using Vault
- saveDefaultConfig()
- disable plugin if setupEconomy() fails
Keep the code minimal and compile-ready.
text Create only 3 files for a minimal Paper 1.21+ plugin named DraculaReviveVote: main class in package com.draculamc.dracularevivevote, plugin.yml, and config.yml; hook into Vault economy, saveDefaultConfig(), disable plugin if Vault or economy provider is missing, no commands, no listeners, no revive logic, no extra classes.
Create only the base files for a minimal Paper 1.21+ plugin named DraculaReviveVote: main class in package com.draculamc.dracularevivevote, plugin.yml, and config.yml, with Vault economy setup and auto-disable if Vault/economy is missing, and nothing else.
create a plugin named dracularevive vote main class in package com.draculamc.dracularevivevote, plugin.yml, and config.yml, with Vault economy setup and auto-disable
No files in this session