Skip to content

stompingcrit/VotingSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Minecraft Java Paper Version License


✨ Features

Everything you need to run fair, beautiful votings on your server — out of the box.

Feature
🗳️ Multiple voting definitions in config.yml
🔒 Only one active voting at a time
🖥️ Player voting GUI via /vote
🔢 Dynamic {votes} placeholder in lore
🚫 One vote per player — no revoting
🎲 Tie handling with random winner among leaders
⚙️ No-votes modes: NOTHING and RANDOM
🔌 Extendable action system: [console], [message]
🎨 Adventure API messages with full HEX color support
📁 Separate messages.yml and sounds.yml

🔄 How it works

/vote forcestart <id>
        │
        ▼
  Voting starts (duration from config)
        │
        ▼
  Players open GUI via /vote and click an option
        │
        ├─ one vote per player, no revoting
        │
        ▼
  Timer ends → winner determined
        │
        ├─ tie?      → random winner among leaders
        ├─ no votes? → NOTHING or RANDOM (configurable)
        │
        ▼
  actions_on_win execute → cooldown starts

⚙️ Configuration

config.yml — global settings, GUI size, voting definitions
settings:
  voting-duration-seconds: 60        # how long each voting lasts
  delay-between-votings-seconds: 300 # cooldown between votings

gui:
  size: 27 # inventory size — must be a multiple of 9

votings:
  voting1:
    title: "&aVoting title"
    items:
      item1:
        title: "&aOption #1"
        slot: 10                     # GUI slot index (0–26 for size 27)
        material: SHULKER_BOX
        lore:
          - ""
          - "&3Description of this option"
          - ""
          - "&eClick to vote!"
          - ""
          - "&7Votes: {votes}"       # live vote counter
        actions_on_win:
          - "[console] time set day"
          - "[message] &aOption #1 won!"
Action types
Action Syntax Description
Console command [console] <command> Runs as server console
Server broadcast [message] <text> Sends message to all online players

HEX colors are supported everywhere via &#RRGGBB format.

Example — weather voting (4 options)

The built-in example lets players vote on time of day and weather:

Slot Material Option Actions on win
10 SHULKER_BOX ☀️ Day + Clear time set day · weather clear
12 BEETROOT ⛈️ Day + Thunder time set day · weather thunder
14 DRIED_KELP 🌙 Night + Clear time set night · weather clear
16 SCULK_SENSOR 🌩️ Night + Thunder time set night · weather thunder

🕹️ Commands

/vote                        — open active voting GUI
/vote forcestart <id>        — force start a voting by ID
/vote forceend               — force end the active voting
/vote reload                 — reload all configs

🔑 Permissions

Permission Default Description
votingsystem.use everyone Open /vote GUI
votingsystem.admin.forcestart op Force start a voting
votingsystem.admin.forceend op Force end active voting
votingsystem.admin.reload op Reload plugin configs

🔨 Build

gradle build

Output:

build/libs/VotingSystem-1.0.0.jar

Drop the jar into your server's plugins/ folder and restart.


About

Lightweight voting system built for fast, transparent, and user-friendly polls.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages