randombyte-developer / lottery

A Sponge plugin
https://ore.spongepowered.org/RandomByte/Lottery
GNU General Public License v2.0
0 stars 1 forks source link

Lottery-1.4: Error running /lottery addpot #11

Closed Guite-Emortal closed 6 years ago

Guite-Emortal commented 6 years ago

Every time I run this command no matter how high or low my $value is it tells me I can't add any value higher than the max. Which I have set to 50,000 to test after default 1000 failed. Issue continues. The server console isn't kicking out any errors, just that the plugin registers my amount as too high.

randombyte-developer commented 6 years ago

The max value is the total max value. Previously bought tickets count too. Please post your complete config.

Guite-Emortal commented 6 years ago
broadcasts {
    # Broadcasts how to buy tickets when someone bought one
    broadcast-ticket-purchase=false
    # Broadcasts in set interval how much is in the pot; set to 0s to disable
    timed-broadcast-interval="30m"
}
# How much time between the draws
draw-interval="7d"
# Don't modify this!
internal-data {
    bought-tickets {}
    pot=0
}
# Max. amount allowed to be added to the pot by a player
max-deposit=50000
# The max. amount of tickets a player can buy
max-tickets=50
messages {
    # Is broadcasted to all players in the set broadcast interval
    # Available parameters: pot, currencySymbol, currencyName
    broadcast="&7Current pot is at {(&b)pot}{currencySymbol}! Use [&b/lottery buy [amount]](&/lottery buy) to buy tickets."
    # Is broadcasted to all player when a ticket was bought
    # Available parameters: ticketAmount, buyerName, pot
    buy-ticket-broadcast="{(&b)buyerName}&7 has bought {(&b)ticketAmount}&b ticket(s)! [&b/lottery info](&/lottery info)"
    # Is sent when buying (a) ticket(s)
    # Available parameters: boughtTickets, totalTickets
    buy-ticket-message="&7You bought {boughtTickets} ticket(s) and now have a total amount of {(&b)totalTickets}&bticket(s)"
    # Is broadcasted to all players when the pot was drawn
    # Available parameters: winnerName, pot, currencySymbol, currencyName
    draw-message-broadcast="{(&b)winnerName}&6 won the lottery pot of {(&b)pot}{currencySymbol}!"
    # Is sent when the info command is executed by the console
    # Available parameters: pot, currencySymbol, minutesUntilDraw, currencyName, ticketCosts
    info-message-console="&7There are {(&b)pot}{currencySymbol} in the pot. The next draw is in {(&b)minutesUntilDraw}&b minutes&7."
    # Is sent when the info command is executed by a player
    # Available parameters: pot, boughtTickets, currencySymbol, minutesUntilDraw, currencyName, ticketCosts
    info-message-player="&7You currently have {(&b)boughtTickets}&b ticket(s) &7and there are {(&b)pot}{currencySymbol} in the pot. Buy a ticket with [&b/lottery buy](&/lottery buy)! The next draw is in &r{(&b)minutesUntilDraw}&b minutes&7."
    not-enough-money="&cYou do not have enough money to do that!"
}
# How much of the pot should be given to the winner
payout-percentage=90
ticket-costs=100
randombyte-developer commented 6 years ago

Ok, thanks! I found the bug: Internally there's an additional permission check for lottery.admin, which is completely unnecessary. I removed it in version v2.0.1: https://ore.spongepowered.org/RandomByte/Lottery/versions