Skip to main content

Configuration

The main configuration file is located at plugins/CocoLottery/config.yml.

General Settingsโ€‹

plugins/CocoLottery/config.yml
# Plugin prefix for messages
globalPrefix: "&8[&#3BEE40Lottery&8] &7ยป"

# Announcement interval in ticks (6000 = 5 minutes)
announcementInterval: 6000

# Language file to use
language-file: messages_en.yml

Currency Settingsโ€‹

Configure how the lottery handles money:

plugins/CocoLottery/config.yml
currency:
# Display name of your currency
name: "Dollar"

# Currency symbol
symbol: "$"

# Allow decimal amounts
allowDecimals: false

# Placeholder to check player balance
placeholder: "%vault_eco_balance%"

# Command to give money (use {player} and {amount})
give_command: "eco give {player} {amount}"

# Command to take money (use {player} and {amount})
take_command: "eco take {player} {amount}"

Using Custom Currenciesโ€‹

You can use any economy plugin by adjusting the commands:

# Example: TokenManager
currency:
name: "Tokens"
symbol: "๐Ÿช™"
placeholder: "%tokenmanager_tokens%"
give_command: "token give {player} {amount}"
take_command: "token take {player} {amount}"

Lottery Settingsโ€‹

plugins/CocoLottery/config.yml
lottery:
# Price per ticket
ticketPrice: 50000.0

# Base prize amount (can increase with more tickets)
prize: 20000.0

# Maximum tickets a player can buy
maxTicketsPerPlayer: 3

# Minimum tickets needed to start a draw
minTicketsToDraw: 15

# Time between draws in seconds (7200 = 2 hours)
drawingDelaySeconds: 7200

# Symbol for unlimited tickets
infiniteSymbol: "โˆž"

Minimum Playersโ€‹

plugins/CocoLottery/config.yml
minimum-players:
# Minimum online players to draw (-1 = disabled)
amount: -1

# Reset lottery if not enough players?
reset: true

Databaseโ€‹

plugins/CocoLottery/config.yml
database:
# Database type: sqlite, mysql, h2
type: "sqlite"

mysql:
host: "localhost"
port: 3306
database: "lottery"
username: "root"
password: ""

h2:
file: "lottery.db"

sqlite:
file: "lottery.db"

Placeholders Configurationโ€‹

Configure how placeholders display:

plugins/CocoLottery/config.yml
placeholders:
prefix: "cocolottery"

last_winner:
placeholder: "last_winner"
value: "{value}"
none: "-"

current_prize:
placeholder: "current_prize"
value: "{value}"
none: "-"

next_drawing:
placeholder: "next_drawing"
value: "{value}"
none: "-"

your_tickets:
placeholder: "your_tickets"
value: "{value}"
none: "-"

total_tickets:
placeholder: "total_tickets"
value: "{value}"
none: "-"