PlaceholderAPI
CocoLottery integrates with PlaceholderAPI to provide useful placeholders for scoreboards, holograms, and other plugins.
Requirements
- PlaceholderAPI installed on your server
Available Placeholders
| Placeholder | Description |
|---|---|
| %cocolottery_last_winner% | Last lottery winner |
| %cocolottery_current_prize% | Current prize amount |
| %cocolottery_next_drawing% | Time until next drawing |
| %cocolottery_your_tickets% | Player's ticket count |
| %cocolottery_total_tickets% | Total tickets sold |
Customizing Placeholders
Configure placeholder output in config.yml:
plugins/CocoLottery/config.yml
placeholders:
# Placeholder prefix (default: cocolottery)
prefix: "cocolottery"
last_winner:
placeholder: "last_winner"
value: "{value}" # Format when has value
none: "-" # Format when empty
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: "-"
Custom Formatting Examples
Add Currency Symbol
current_prize:
placeholder: "current_prize"
value: "$FB22{value}"
none: "$0"
Colorful Ticket Count
your_tickets:
placeholder: "your_tickets"
value: "�FF00{value} tickets"
none: "&#FF0000No tickets"
Example Usage
Scoreboard
Lottery Info:
Prize: %cocolottery_current_prize%
Your Tickets: %cocolottery_your_tickets%
Next Draw: %cocolottery_next_drawing%
Last Winner: %cocolottery_last_winner%
Hologram
🎟️ LOTTERY 🎟️
Prize: $%cocolottery_current_prize%
Tickets Sold: %cocolottery_total_tickets%
Next Draw: %cocolottery_next_drawing%
Bypass Permission
Players with cocolottery.max.bypass permission will see the infinite symbol (∞) for their ticket count instead of the actual number:
lottery:
infiniteSymbol: "∞"