Protect from extremally high balances

This commit is contained in:
Acrobot 2013-08-26 23:36:36 +02:00
parent bfad819a0a
commit 8a9f1c52c7

View File

@ -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