mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-25 09:27:39 +01:00
Protect from extremally high balances
This commit is contained in:
parent
bfad819a0a
commit
8a9f1c52c7
@ -60,7 +60,13 @@ public class VaultListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
event.setAmount(provider.getBalance(event.getAccount(), event.getWorld().getName()));
|
||||
double balance = provider.getBalance(event.getAccount(), event.getWorld().getName());
|
||||
|
||||
if (balance > Double.MAX_VALUE) {
|
||||
balance = Double.MAX_VALUE;
|
||||
}
|
||||
|
||||
event.setAmount(balance);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user