Jump to content

Players can redeem a recycler for free even with zero credits

Pending 1.0.16

rogder dodger
rogder dodger

Posted (edited)

When a new player types /redeemrecycler, the plugin gives them a recycler even if they have no credits. It looks like the plugin creates a new record for the player, sets their credits to the start_recyclers value, and then immediately spawns a recycler without checking if the balance is actually greater than zero.

In my config I have start_recyclers set to 0, but brand new players can still redeem one for free. Once they’ve redeemed, their credits correctly go negative and then back to zero, but the players get a free Recycler...

Steps to reproduce:

  • Set start_recyclers to 0 in the config.
  • Join as a fresh player with no prior data.
  • Run /redeemrecycler.
  • Observe that the player gets a recycler even though they had no credits.

Expected behavior:
If a player has zero available recyclers, the plugin should block the redeem attempt and show the “no recyclers” message instead of giving them a free one.

Actual Behavior: 
Player who should have zero available recyclers gets a free recycler. 

Edited by rogder dodger
2m

Downloads

Total number of downloads.

9.4k

Customers

Total customers served.

137.4k

Files Sold

Total number of files sold.

2.9m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.