Skip to main content

Configuration

The configuration file for Nexal Lottery. Located at plugins/Nexal Lottery/config.yml.

config.yml
# Configuration for Nexal Lottery Plugin

# Timezone for the lottery: the cron schedule below runs in it, and draw times are shown in it
# Examples: "America/New_York", "Europe/London", "Asia/Tokyo", "UTC"
# Full list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
timezone: "UTC"

# Lottery draw schedule (cron expression)
# Format: minute hour day month day-of-week
# Default: "0 * * * *" runs every hour at minute 0
# Examples:
# "0 * * * *" - Every hour
# "0 */2 * * *" - Every 2 hours
# "30 * * * *" - Every hour at :30
cron-schedule: "0 * * * *"

# Cost per lottery ticket
ticket-cost: 100

# Ticket purchase limit
ticket-limit:
enabled: false
max: 10

# Purchase cooldown (in seconds) to prevent spam
purchase-cooldown: 10

# Whether players see purchase alerts (someone bought tickets) until they toggle them with /lottery alerts.
# /lottery admin alerts onall|offall and the admin GUI change this together with every stored player.
purchase-alerts-default: true

# Tax on lottery winnings
tax:
enabled: true
percentage: 10 # Percentage of winnings taken as tax, e.g., 10 for 10%

# Disable Vault payout (if true, no money will be given to winners)
disable-vault-payout: false

# Fireworks launched around the winner when they are online at the draw, one every half second.
# They never damage the winner or anyone nearby.
winner-fireworks:
enabled: true
amount: 5 # 0 to 20

# Number of past draws kept in the draw history; older draws are removed. 0 keeps every draw.
draw-history-limit: 100

# Storage type: "json" or "sql"
storage:
type: json
sql:
host: localhost
port: 3306
database: minecraft
username: root
password: ""

# Commands to run when a player wins the lottery
# Placeholders: %player% (winner's name), %amount% (amount won), %tax_amount% (tax taken), %tax_percentage% (tax percentage)
winner-commands:
# - "crates givekey %player% lottery_key 1"

Configuration Options​

Below is a reference of the main configuration sections:

timezone​

Configuration for Nexal Lottery Plugin

Timezone for the lottery: the cron schedule below runs in it, and draw times are shown in it Examples: "America/New_York", "Europe/London", "Asia/Tokyo", "UTC" Full list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

cron-schedule​

Lottery draw schedule (cron expression) Format: minute hour day month day-of-week Default: "0 * * * *" runs every hour at minute 0 Examples: "0 * * * *" - Every hour "0 */2 * * *" - Every 2 hours "30 * * * *" - Every hour at :30

ticket-cost​

Cost per lottery ticket

ticket-limit​

Ticket purchase limit

purchase-cooldown​

Purchase cooldown (in seconds) to prevent spam

purchase-alerts-default​

Whether players see purchase alerts (someone bought tickets) until they toggle them with /lottery alerts. /lottery admin alerts onall|offall and the admin GUI change this together with every stored player.

tax​

Tax on lottery winnings

disable-vault-payout​

Disable Vault payout (if true, no money will be given to winners)

winner-fireworks​

Fireworks launched around the winner when they are online at the draw, one every half second. They never damage the winner or anyone nearby.

draw-history-limit​

Number of past draws kept in the draw history; older draws are removed. 0 keeps every draw.

storage​

Storage type: "json" or "sql"

winner-commands​

Commands to run when a player wins the lottery Placeholders: %player% (winner's name), %amount% (amount won), %tax_amount% (tax taken), %tax_percentage% (tax percentage)