LotteryPool

 Lottery Pool allows you to better manage your server economy by allowing players to take in lotteries that are automatically made every (configurable) minutes.
I appreciate everyone for all the downloads but I'll be taking this plugin to premium. The free version will no longer have any updates, only the premium plugin will actively have updates and support.
(Plugin support for Spigot 1.14 will be only for premium)

CLICK HERE FOR THE PREMIUM VERSION!
Features
  • Have a server restart? We have a system made so your current lottery session won't be lost!
  • Multiple tickets setting (default is 1 and it's recommended to balance the economy)
  • Set your own lottery session interval and duration.
  • Anti-Configuration Crash system - Set a wrong Material/Sound name? Not to worry, the plugin is coded to not crash and still work!
  • Periodic file saving system - PREMIUM FEATURE
  • Number formatted placeholders - PREMIUM FEATURE
  • A percentile chance to not have winners every lottery session (mimics in-real life lotteries) - PREMIUM FEATURE
  • Ability to retain the last lottery pool amount (configurable) if no winners was chosen in the last lottery session(s) - PREMIUM FEATURE
  • Fully configurable
This plugin support versions below 1.13! To make it work w/o errors, (it shouldn't even crash your server, I have made a system where it doesn't crash your server if it's a lower version) please disable bossbar in the config.yml. - then it should work flawlessly on any versions!
Dependencies
  • Any economy plugin.
How does it work?
Players are notified via chat and/ or the creation a boss bar whenever a lottery is in-progress.
(Initial boss bar message when the lottery session has just begun)
 
(As the lottery session progresses)
 
(Boss bar turns red after a (configured) amount of time is left on the clock.)
 
 
 
Players are then given the choice to participate via a custom and very interactive graphical user interface (GUI). Administrators that has root access to the server are able to set a default ticket price/tax/amount of tickets purchasable per player which when the player buys, it uses a intelligent system to add the amount to the lottery pool. 
 
 
Players are able to access a GUI to see the participants of the current lottery-session and also how many tickets each participants has to gauge their winning chances.
After the configured lottery duration, a random winner (EVEN IF THE PLAYER IS OFFLINE, HE/SHE CAN WIN, the money will be deposited into their account.) will be selected. - More tickets = more chances, of course.
(A very good way of making your players use their money, allowing the poorer players to gain some fast cash too whilst doing their chores, they can wait on the lottery results. - if you make only 1 ticket is purchasable per player.)
Extra countermeasures are also taken to ensure that once a player has maxed out their participation in a lottery session, they cannot participate again. Also, when there is no current on-going lotteries, the player too cannot participate.
 
 
 
 
Time duration & time till the next lottery is also shown in the graphical user interface.
Hooray, the reborn version is out now, what's new!?
            Well, we have several new things, but it's best for you to check it                 out yourself!
  • A revamped Lottery Session system.
  • A smart page system now added to the view players.
  • Plugin is fully optimized now.
  • You can basically customize anything now, from names, to lores, to slot numbers, to sizes and more!
  • Lottery participants on boss bar now updates in real-time when a new player participates.
  • Multiple tickets now! - Player GUI shows the amount of tickets each players has now too.
 
 
Also, I have changed some of the settings in config.yml but have tried to stay mostly similar to the old one. The only change you need to watch out for is in the gui section, I have inputted some new sections to make it work better.
Commands
/lotterypool - alias: /lpl, /lottery - opens the main GUI for lottery pool.
Permission Node: default for all players.
/lotterypool purchase - opens the lottery pool purchase GUI.
Permission Node: default for all players.
 
/lotterypool players - opens the lottery pool players GUI.
Permission Node: default for all players.
 
ADMIN COMMANDS:
(alias - /lotterya & /lpla)
/lotterypoola reload - reloads the plugin. - restarting the server is still best. 
Permission Node: lotterypool.admin

/lotterypoola (add/set/remove)pool - sets/adds/removes money from/to the total pool.
Permission Node: lotterypool.admin

/lotterypoola forcestart - force-starts a lottery session if one isn't already on-going. - PREMIUM FEATURE
Permission Node: lotterypool.admin


/lotterypoola forceend - force ends an on-going lottery session and choose a winner. - PREMIUM FEATURE
Permission Node: lotterypool.admin
 
Once downloaded, you agree to these terms -
1. You may not distribute the code of the plugin.
2. You may not make any changes to the plugin's code and publish it again, then calling it your own.
 
 
Found a bug? Please private-message me or join the support Discord server. Please do not put it in the reviews section as reviews are not for bugs.
I'd love to check out your servers that are using my plugins. Drop me a private-message and I might feature your server here too if you're using any of my plugins.
(Proudly sponsored by TorchNode)
(Click on the image for a redirect.)
 
Join my support Discord channel here - https://discord.gg/yVGtWyr
 
Now, the .jar version should work for all Minecraft versions. it is not needed to download another .jar for versions below 1.12. (FOR PLUGIN VERSION 1.4.1)
 
Configuration sample for versions below 1.12,
(TEST SERVER: 88.99.91.195:25944)
GFX will be updated soon.
 
 Lottery Pool allows you to better manage your server economy by allowing players to take in lotteries that are automatically made every (configurable) minutes. 
 
Dependencies
 
  • VAULT
  • Any economy plugin.

 

For Minecraft version 1.12 -> HERE (version 1.2.0)

(You might only get limited support for Minecraft 1.12, unfortunately, however, I will still try my best to help!)

 

  
How does it work?
Players are notified via chat and/ or the creation a boss bar whenever a lottery is in-progress. 
 
(Boss bar turns red after a (configured) amount of time is left on the clock.)
Players are then given the choice to participate via a custom and very interactive graphical user interface (GUI). Administrators that has root access to the server are able to set a fixed amount of lottery price which when the player buys, it uses a intelligent system to add the amount to the lottery pool. 
 
 
Players are able to check who is currently participating in the current lottery by accessing the players' list menu. 
 
 
The lottery will end after the configured duration, and a random winner is selected. The winner takes all - he/she takes all that is in the lottery pool.
(A very good way of making your players use their money, allowing the poorer players to gain some fast cash too whilst doing their chores, they can wait on the lottery results.)
 
 
Extra countermeasures are also taken to ensure that once a player is participated in a lottery, they cannot participate again. Also, when there is no current on-going lotteries, the player too cannot participate. 
Time duration & time till the next lottery is also shown in the graphical user interface.
 
 
 
 
 
 
 
 

 

Commands
 /lpl - opens the lottery pool GUI.
(User default permission)
 
Secondary commands:
(These are accessible through the main menu, /lp.) 
/lpl pool - opens the pool amount GUI.
(User default permission)
 
/lpl player - opens the players GUI
(User default permission)
 
Administrative commands:
(These commands are only accessible if the right permissions are given to a rank/player)
 
/lpl admin addpool - adds an amount to the current lottery pool.
- might have some visual issues at first, once a player participates, the lottery amount will update with the new addpool amount.
(lp.admin)
 
/lpl admin removepool - removes an amount to the current lottery pool.
- might have some visual issues at first, once a player participates, the lottery amount will update with the new removepool amount.
(lp.admin)
 
/lpl admin forcestart - forces a lottery to be started. 
- might cause some issues with the boss bar for subsequent lotteries until server restart. Use with caution.
(lp.admin)
 
/lpl admin reload - reloads the lottery pools plugin.
- it is highly not advisable to reload the plugin if you have changed the lottery timings. Any other changes in the config.yml is OKAY.
(lp.reload)
 
config.yml

settings:
guititle: '&9&l → LOTTERY'
# If enabled, bossbar will be loaded whenever a lottery starts.
bossbar: true
# Sets the boss bar color, allowed colors are - BLUE, GREEN, PINK, PURPLE, RED, WHITE & YELLOW.
bossbarcolor: 'YELLOW'
# Set the message of the bossbar.
bossbarmessage: '&7(&9%players%&7) participants currently in the lottery pool. Time left, &9%time% MINUTE(S)'
# Set the minute at which the boss bar will turn red.
bossbaralert: 14
bossbaralertcolor: 'RED'
# Set the lottery currency. Default is '$'.
lotterycurrency: '$'
# Set the fixed lottery price.
lotteryprice: 2000
# Set the lottery start interval. (time is in minutes)
lotteryevery: 2
# Set how long each lottery will last. (time is in minutes)
lotteryduration: 1
# If enabled, the lottery will start right when the server is started/restarted.
onserverstart: true
# Set how much tax should the lottery be. Put '0' if you want no tax to be charged.
taxamount: 500

# View a list of sounds here -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html - Make sure you use the correct version's SOUND name!
sounds:
# If enabled, sound will play on lottery start.
playsoundonstart: true
startsound: 'BLOCK_NOTE_BLOCK_PLING'
# If enabled, sound will play to the lottery winner.
playsoundtowinner: true
winnersound: 'ENTITY_FIREWORK_ROCKET_LAUNCH'
commandsound: 'BLOCK_SHULKER_BOX_OPEN'
opensound: 'ENTITY_SHULKER_BULLET_HIT'
buysound: 'BLOCK_NOTE_BLOCK_PLING'
messages-en:
prefix: '&7(Lottery&9Pool) &7→ '
participatebroadcast: '&9%player% &7has participated in the current lottery pool. &9&o/lpl to participate. &7(&c!&7) &c$%taxamount% has been charged extra as tax.'
lotteryendbroadcast: '&9%player% &7has won a total of &9$%amount% &7from the lottery pool!'
lotterystartbroadcast: '&7Lottery has been started, &9/lpl &7to participate. &7(LOTTERY DURATION: &9%time% MINUTES&7)'
nowinnersbroadcast: '&7Since there were no participants, there is no winner.'
nopermission: '&9&lHEY! &7You have no business using this command!'
invalidusage: '&9Whoopies&7, looks like you used the command wrongly. For a list of commands, &9/lpl help'

# View a list of materials here -> https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html - Make sure you use the correct version's BLOCK name!
gui:
purchase-ticket:
item: HOPPER
name: '&9BUY LOTTERY'
description:
- ' '
- '&7(&9!&7) &9LEFT CLICK &7 to register'
- '&7for the current LOTTERY &9POOL&7.'
pool-check:
item: CHEST
name: '&9CHECK POOL AMOUNT'
description:
- ' '
- '&7(&9!&7) &9LEFT CLICK &7 to view'
- '&7the total LOTTERY &9POOL&7.'

pool-amount:
item: PAPER
name: '&cLOTTERY POOL AMOUNT -'
description:
- '&7%amount%'
pool-time:
item: CLOCK
name: '&9POOL DURATION'
description:
- ' '
- '&7(&9!&7) &9CURRENT POOL &7ends in &9%time% &7minutes(s).'

view-players:
item: PLAYER_HEAD
name: '&9PlAYER LIST'
description:
- ' '
- '&7(&9!&7) &9LEFT CLICK &7to view the participants'
- '&7of the LOTTERY &9POOL&7.'
- ' '
- '&7(&9%players%&7) player(s) currently participating.'

next-pool:
item: CLOCK
name: '&9NEXT POOL'
description:
- ' '
- '&7(&9!&7) &9NEXT POOL is in &9%totaltime% &7minute(s)'

participate:
enoughMoney:
item: EMERALD
name: '&aPARTICIPATE NOW!'
description:
- ' '
- '&7(&9!&7) &9LEFT CLICK &7to purchase a lottery ticket'
- '&7the price currently is, &9%price%&7,'
- '&7the lottery tax is, &9%taxamount%&7.'
notEnoughMoney:
item: REDSTONE
name: '&cERROR!'
description:
- ' '
- '&7(&c!&7) &cYOU DO NOT HAVE ENOUGH MONEY TO JOIN THE LOTTERY!'
- '&7the price currently is, &c%price%&7,'
- '&7the lottery tax is, &c%taxamount%&7.'
alreadyParticipated:
item: REDSTONE
name: '&cERROR!'
description:
- ' '
- '&7(&c!&7) &cYOU HAVE ALREADY PARTICIPATED!'

noLotteries:
item: GUNPOWDER
name: '&7(&c!&7) &cTHERE ARE CURRENTLY NO ON-GOING LOTTERY POOLS.'
description:

goBack:
item: BARRIER
name: '&cGO BACK'
description:
- '&7(&9!&7) &9LEFT CLICK to go back to the previous page.'

 
PLACEHOLDERS
%player% - gets the player's name.
%players% - gets the amount of player in the lottery. (used in bossbar)
%amount% - amount from the lottery pool.
%price% - shows the lottery ticket price.
%taxamount% - shows the tax amount.
%time% - duration of the lottery.
%totaltime% - the total time to the next lottery.
(Use like how it's used in the config.yml)
 
FUTURE PLANS
 
  • a system to track down the top 3 most amount won players. (already started on implementation, hopefully all goes well.)
 
- Future plans will be updated on when I get your suggestions.
 
 
Found a bug? Please private-message me or join the support Discord server. Please do not put it in the reviews section as reviews are not for bugs. 
 
 I'd love to check out your servers that are using my plugins. Drop me a private-message and I might feature your server here too if you're using any of my plugins.
 
If you'd want to support me and my future plugins, buy me a coffee here.
 
Visit my other plugins:
(Create regions (built in in-game region creator) and execute commands on region enter or leave)
(Potion Creation allows your players to create potions with their choice of effect(s) with a fee! Supports up to 14 effects in one potion.)
 
 
(Proudly sponsored by TorchNode)
 
 
Join the support server here,

 


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    307121
  • Created
    Nov 16, 2018
  • Last Released File
    Jun 4, 2019
  • Total Downloads
    9,869
  • License

Categories

Members