HomeJavaModsGameVoting
GameVoting

GameVoting

License Java Version Paper Version CloudNet Version

中文文档 | User Guide | 使用文档

A powerful and feature-rich Minecraft voting system plugin for Paper servers, designed for CloudNet v4 network environments. Support for automatic game selection, player ready system, holographic displays, and multi-database persistence.

✨ Features

🎮 Voting System

📊 Holographic Displays

🗄️ Database Integration

🌐 CloudNet Integration

🌍 Internationalization

🎯 Advanced Features

📋 Requirements

🚀 Installation

  1. Download the plugin

    # Build from source
    git clone https://github.com/yourusername/GameVoting.git
    cd GameVoting
    mvn clean package
    
  2. Install dependencies

    • Download and install DecentHolograms
    • Ensure CloudNet v4 is properly configured
  3. Deploy the plugin

    # Copy the compiled JAR to your plugins folder
    cp target/GameVoting-1.1.0.jar /path/to/server/plugins/
    
  4. Configure the plugin

    • Start the server to generate default configuration files
    • Edit plugins/GameVoting/config.yml
    • Configure plugins/GameVoting/games.yml
    • Restart the server

⚙️ Configuration

config.yml

# Debug mode for detailed logging
debug: false

# Language: en-US, en-UK, zh-CN
language: "en-US"

# CloudNet proxy service name
proxy-service-name: "Proxy-1"

# Database configuration
database:
  enabled: true
  type: "postgresql"  # postgresql, mysql, mongodb
  host: "localhost"
  port: 5432
  database: "gamevoting"
  username: "postgres"
  password: "password"

# Hologram locations (managed via commands)
holograms:
  locations: []

games.yml

games:
  - id: "skywars"
    name: "SkyWars"
    service-name: "SkyWars-{number}"
    icon: "GOLDEN_SWORD"
    description: "Fight in the sky!"
    
  - id: "bedwars"
    name: "BedWars"
    service-name: "BedWars-{number}"
    icon: "RED_BED"
    description: "Protect your bed!"

📖 Usage

For Players

  1. Automatic Voting (≥6 players)

    - Wait for emerald item in slot 9
    - Right-click to mark ready
    - Voting starts when all players ready
    
  2. Manual Voting

    - Admin starts: /vote start
    - Receive compass in slot 9
    - Right-click to open voting menu
    - Select your preferred game
    
  3. Post-voting Ready

    - Receive gray dye after voting ends
    - Right-click to mark ready
    - Changes to lime dye when ready
    - Game starts when all players ready
    

For Administrators

# Start voting manually
/vote start [duration]

# Force start game (skip ready phase)
/vote forcestart

# Cancel active voting
/vote cancel

# Reload configuration
/vote reload

# Hologram management
/vote holograms create        # Create at current location
/vote holograms list          # List all holograms
/vote holograms remove <id>   # Remove specific hologram

# Join game service
/vote join <service>

# Party commands
/party create              # Create a party
/party invite <player>     # Invite a player
/party join <player>       # Join a party
/party leave              # Leave current party
/party disband            # Disband your party

🔌 API Usage

For Developers

// Get voting session
VotingSession session = VotingSession.getInstance();

// Check voting state
boolean isVoting = session.isVotingInProgress();
boolean isReady = session.isReadyPhaseActive();

// Get vote counts
Map<String, Integer> votes = session.getVoteCounts();

// Access database
VoteHistoryRepository repo = DatabaseManager.getInstance()
    .getVoteHistoryRepository();
List<VoteHistory> history = repo.getTopWinningGames(10);

// Hologram management
HologramManager manager = plugin.getHologramManager();
manager.updateAllDisplays(DisplayState.VOTING_ACTIVE);

🏗️ Project Structure

GameVoting/
├── src/main/java/com/talexck/gameVoting/
│   ├── GameVoting.java              # Main plugin class
│   ├── commands/                     # Command handlers
│   │   ├── VoteCommand.java         # Voting commands
│   │   └── PartyCommand.java        # Party commands
│   ├── config/                       # Configuration management
│   │   ├── GameConfig.java          # Game configuration
│   │   └── ConfigLoader.java        # Config loader
│   ├── voting/                       # Voting system
│   │   └── VotingSession.java       # Vote session manager
│   ├── database/                     # Database layer
│   │   ├── DatabaseManager.java     # Database connections
│   │   ├── models/                  # Data models
│   │   └── repositories/            # Data repositories
│   ├── hologram/                     # Hologram displays
│   │   ├── HologramManager.java     # Hologram manager
│   │   └── HologramDisplayManager.java
│   ├── listeners/                    # Event listeners
│   │   ├── VoteItemListener.java    # Vote item interactions
│   │   ├── PlayerJoinListener.java  # Player join events
│   │   └── VotingPlayerQuitListener.java
│   ├── cloudnet/                     # CloudNet integration
│   │   └── CloudNetAPI.java         # CloudNet API wrapper
│   ├── party/                        # Party system
│   │   └── PartyManager.java        # Party management
│   └── utils/                        # Utility classes
│       ├── item/VoteItem.java       # Vote item management
│       ├── MessageUtil.java         # Message utilities
│       └── ActionBarUtil.java       # ActionBar utilities
├── src/main/resources/
│   ├── plugin.yml                    # Plugin metadata
│   ├── config.yml                    # Default config
│   ├── games.yml                     # Game definitions
│   └── lang/                         # Language files
│       ├── en-US.yml
│       ├── en-UK.yml
│       └── zh-CN.yml
└── pom.xml                           # Maven configuration

🤝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📧 Support

🔄 Version History

v1.1.0

v1.0.0

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more