💸Lottery
Encourage players to bet money to be in with a chance of winning the pot.
New documentation for this resource under construction.
Description
Encourage players to bet money to be in with a chance of winning the pot.
Prerequisites
Before you run Lottery plugin on your server, there are a few requirements that you should check.
Ensure you are using Minecraft version 1.8.8 or later. (Versions below 1.8.8 are not supported!)
Your server has installed Java8 or later.
Make sure that you have already installed plugins TheCore
Your server has installed Economy plugin, which supports Vault, PlayerPoints or TokenManager.
Installation
Put
Lottery.jar
into plugins folder at your server.
Downloaded .zip file contains more .jar file depending on the server version. Choose the one that fits your server.
Restart your server.
Done
Commands & Permissions
Command Description | Command | Permission |
---|---|---|
Player section | ||
Open LotteryGUI | /Lottery | Lottery.GUI.Overview.Open |
Purchase tickets | /Lottery Purchase [Count] | Lottery.Pot.Purchase |
Help | /Lottery Help [Player] | Lottery.Help.Player |
Information about Lottery | /Lottery Info [Player] | Lottery.Info.Player |
Personal Stats | /Lottery Stats Personal | Lottery.Stats.Personal.Own |
Summary Stats | /Lottery Stats Summary <Type> | Lottery.Stats.Summary |
Change locale | /Lottery Profile SetLocale <Locale> | Lottery.Profile.Preference.Locale |
Admin section | ||
Advanced Help | /Lottery Help Admin | Lottery.Help.Admin |
Advanced Information | /Lottery Info Admin | Lottery.Info.Admin |
Enable Maintenance | /Lottery Maintenance Enable | Lottery.Maintenance.Enable |
Disable Maintenance | /Lottery Maintenance Disable | Lottery.Maintenance.Disable |
Create Figure | /Lottery Figure Set | Lottery.Figure.Place |
Link/Find nearby Figure | /Lottery Figure Find | Lottery.Figure.Find |
Unlink/Remove Figure | /Lottery Figure Remove | Lottery.Figure.Remove |
Increase bonus | /Lottery Bonus Increase <Amount> | Lottery.Pot.Bonus.Increase |
Force end of running round | /Lottery ForceDraw | Lottery.Round.Draw.Forced |
Reload plugin | /Lottery Reload [All] | Lottery.Reload.All |
Reload locale | /Lottery Reload Locale | Lottery.Reload.Locale |
Reload options | /Lottery Reload Options | Lottery.Reload.Options |
Place Personal Board | /Lottery Board Personal Place | Lottery.Board.Personal.Place |
Remove Personal Board | /Lottery Board Personal Remove | Lottery.Board.Personal.Remove |
Place Leader Board (Banner) | /Lottery Board Summary Place Banner <Type> | Lottery.Board.Leader.Banner.Place |
Remove Leader Board (Banner) | /Lottery Board Summary Remove Banner <Type> | Lottery.Board.Leader.Banner.Remove |
Place Leader Board (Podium) | /Lottery Board Summary Place Podium <Type> <Order> | Lottery.Board.Leader.Podium.Place |
Remove Leader Board (Podium) | /Lottery Board Summary Remove Podium <Type> <Order> | Lottery.Board.Leader.Podium.Remove |
Remove Leader Board (Sign) | /Lottery Board Summary Remove Sign <Type> <Order> | Lottery.Board.Leader.Sign.Remove |
Create section | /Lottery Section Create <CustomName> | Lottery.Section.Create |
Delete section | /Lottery Section Delete <CustomName> | Lottery.Section.Delete |
Add component to section | /Lottery Section Component Add <CustomName> <Type> | Lottery.Section.Component.Add |
Remove component from section | /Lottery Section Component Add <CustomName> <Type> | Lottery.Section.Component.Remove |
Set section switch time | /Lottery Section UpdateSwitchTime <CustomName> <Amount> | Lottery.Section.SwitchTime |
Open Settings | /Lottery Settings | Lottery.GUI.Settings.Open |
Additional Permissions
Description | Permission | Covers |
---|---|---|
Player | Lottery.Player | Base player's actions |
Admin | Lottery.Admin | Complete package of all permissions |
Figure | Lottery.Figure.* | Permissions of Figure |
Maintenance | Lottery.Maintenance.* | Permissions of Maintenance |
Board | Lottery.Board.* | Permissions of Board |
Board Sections | Lottery.Section.* | Permissions of Board Sections |
Reload | Lottery.Reload.* | Permissions of Reload |
Configuration
Detailed explanation of variables at configuration files.
Config
Automatic Updates
Resource supports automatic (startup) updates. You can enable or disable them. If disabled, you will only receive message about new version.
Localization
Fully customizable localized messages. Just make duplicate of EN.yml file(In the same folder!). Rename it and write the name of the file into config.yml.
Example of the Locale file:
Copy
Copy
Multi Localization
Plugin is able to hold different localisations at the same time. It’s up to player, which localisation wants to display.
Secondary localizations do not have to contain all translations. In case of secondary translation does not contain requested path, the primary file is used to fetch data.
Copy
Storage
Space where to save required data. Supported storages: MySQL
and SQLite
If you prefer MySQL Storage before SQLite, you need to fill variables at config.yml.
There is required that ProfileStorage and this plugin is using the same source of storage!
Analytics
Plugin sends anonymous data such as version of this resource, your server version and addition data of configuration. These data will help me in future development. All requests are asynchronous, so it has no impact on server's performance.
If you don't want to share these data, you can easily disable it.
Copy
Data collected from your server about Voting
Example:
Base
Copy
AdditionalData
Copy
Options
Options file is divided to sections.
Command
Plugin manages main command Lottery
, which can have aliases.
Alias is a command, which invokes the same action as the main command.
Economy
Plugin supports 3 Economy providers Vault
, PlayerPoints
, Experiences
and TokenManager
.
Experiences does not require any additional plugin! Player's current experiences are used here.
Types used in configuration file
VAULT_WRAPPER
PLAYER_POINTS
EXPERIENCE
TOKEN_MANAGER
Round
In this section you can configure core of the plugin. Duration of the round and it's Mode with additional features.
Mode
Plugin offers 4 types, which specifies when the round is created or ended.
Types of modes
SIMPLE
- Round is created at first purchase of ticketsAUTOMATIC
- Round is created at start of the server and next round is created after the end of the previous roundREALTIME_START
- Round is created at specific time. E.g. At 12:00REALTIME_DRAW
- The draw of the round is at specific time(Duration value is ignored!). E.g. At 07:00
At using last two options, you need to specify time, when to create/draw the round.
Example shows that round is created/drawn at 12:00 and 18:00 each day.
Copy
Pot
Every money from purchased tickets is put into pot.
At beggining of the round, some bonus money can be added to the pot....
To make lottery more interesting, you can enable that round won't have winner and amount of the pot will be moved to the next round.
Copy
Purchase
In this section you can change price of the one ticket and amount, how much tickets can player purchase.
Visual
Section represents components displayed at chats and boss bars.
Decimals
If you are using economy without decimals you can change variable UseDecimalFormat
to false
BroadCast
Each purchase is broadcasted to all players. You can disable it, or you can define variable SleepTime
which creates countdown so messages of player's activity will be sent only once in specified range.
BossBar
Via BossBar players are able to see current information about running round.
Available color values
PINK
, BLUE
, RED
, GREEN
, YELLOW
, PURPLE
, WHITE
Available style values
SOLID
, SEGMENTED_6
, SEGMENTED_10
, SEGMENTED_12
, SEGMENTED_20
Intervals
These information can be displayed in specified intervals and these itervals are mainly associtated with BossBar.
Imagine interval in math, but reversed because of countdown which is decresing.
If we want to display BossBar since 30 seconds to 10 seconds, we use interval 30:11
(FROM:TO+1
). Plus 1 because of we want to hide BossBar in 10 seconds. (If we keep 10 seconds in the iterval, BossBar will be hidden in 9 seconds.)
Figure
By interacting with figure, players are able to see current state of the round or can purchase tickets.
You can create whole figure with hologram or only hologram and use your own ArmorStant or NPC.
Types of figure's mode:
FIGURE_AND_HOLOGRAM
ONLY_HOLOGRAM
Board
Boards or LeaderBoards are used to display personal or summary stats. Nicely fit the server lobby scene.
There are three types of boards:
BANNER
- One leader-one line.PODIUM_ARMOR_STAND
- Each leader(place) has own location. Colored ArmorStand with player's head.PODIUM_PLAYER
- Each leader(place) has own location. NPC with leader's skin.SIGN
- Each leader(place) has own location. Skull placed above the sign.
PlaceholderAPI
Plugin offers ability to obtain data via placeholderAPI.
Round
%lottery_round_draw_in% - Parsed time to round evaluation. (00:04:59)
Pot
%lottery_pot_bonus% - Bonus in pot.
%lottery_pot_ticket_count_summary% - Total count of tickets in pot.
%lottery_pot_ticket_count_personal% - Count of player's tickets in pot.
%lottery_pot_cash_amount% - Cash amount in pot.
Personal stats
%lottery_stats_personal_round_participated% - Count of participated rounds.
%lottery_stats_personal_round_won% - Count of won rounds.
%lottery_stats_personal_round_last_when% - Date of last win.
%lottery_stats_personal_round_last_amount% - Cash amount at last win.
%lottery_stats_personal_cash_total_won_amount% - Total won cash amount.
%lottery_stats_personal_cash_highest_won_amount% - Highest won cash amount.
%lottery_stats_personal_transaction_spent_amount% - Spent cash amount.
%lottery_stats_personal_transaction_purchased_ticket% - Amount of purchased tickets.
Summary stats
%lottery_stats_summary_<ComponentType>_order_<Order>_value_<Value>% - Summary stats in order to requested ComponentType, Order and Value.
ComponentTypes and Values
LastRound
when
winner
cash_total_amount
cash_amount
cash_bonus
currency_sign
TheBiggestExpenditure
order
suffix
who
cash_total_amount
tickets
declension_ticket
currency_sign
TheHighestWonAmount
order
suffix
who
cash_total_amount
cash_amount
cash_bonus
when
currency_sign
TheLuckiestPerson
order
suffix
who
cash_total_amount
cash_amount
cash_bonus
rounds
declension_round
currency_sign
TheMostActivePerson
order
suffix
who
rounds
declension_round
currency_sign
Example:
%lottery_stats_summary_TheLuckiestPerson_order_1_value_who% - Returns Nick of the LuckiestPerson who is at 1st place at ranking.
Miscellaneous
%lottery_version% - Version of the plugin
Last updated