The time which counts down to the draw will be reset after the server is started or the game is reloaded.
##Commands
/lottery buy [amount]: To buy the specified amount of tickets or if not specified only one ticket.
/lottery info: Shows how many tickets one have bought and how much is in the pot.
/lottery draw: Force-draw. Ignores the config-set drawInterval. (Just added for testing purposes)
##Permissions
lottery.ticket.buy
lottery.draw
##Config
# Format explanation: http://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#parse-java.lang.CharSequence-
drawInterval=PT3H
drawMessage {...}
broadcasts {
# Broadcasts how to buy tickets when someone bought one
broadcastTicketPurchase=false
# Broadcasts in set interval how much is in the pot; set to PT0M to disable
timedBroadcastInterval=PT30M
}
# The max. amount of tickets a player can buy
maxTickets=5
ticketCosts=100
# How much of the pot should be given to the winner
payoutPercentage=90
# Don't modify this!
internalData {
boughtTickets {}
pot=0
}
Has this been tested enough to know that the basic functionality works? I am thinking of adding this to my server, but I fear there being an exploit of some sort that might break my economy.
I don’t really want to test or mess around with it because the only server I have access to is my pixelmon one, but I have players playing on it and I don’t want my economy to be ruined IF there is a bug.
explain “drawInterval=PT3H” also could you add a message for people to see when a player buys a ticket so others know the plugin is there. ie. has bought x tickets. Command: /lottery buy
Yeah, im not sure who is able to draw the lotto at this point. a regular admin was able to do it and they dont have op or * perms
and I would like to see something where it announces when a player buys a ticket, and how to go about doing it; as people keep asking when it actually draws but have no clue that people are even doing it.
Well, the draw command really doesn’t have permissions. I’ll fix that soon™. Luckily, this plugin still is WIP.
So this plugin should send to all the players somewhat a command-help list when someone buys a ticket? That’s like when someone uses WorldEdit and it annouces: “Hey, I’m WorldEdit, use me!”. That feature will definitely be turned off by default.
I mean it really just needs a way of showing to everyone when a ticket has been purchased. so maybe like
Player has purchased x amount of tickets
Next announcement: “Hey I’m…” or whatever.
So its 2 announcements, 1 is default off; the other just shows when a ticket has been purchased.