if player is null during getSellLimit, return max val

Took 15 seconds
This commit is contained in:
Kiran Hart 2022-09-22 21:40:23 -04:00
parent 9c93ebf385
commit 3c0ea24ac6
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3

View File

@ -89,6 +89,10 @@ public class AuctionPlayer {
public int getSellLimit() {
// fall back
if (player == null)
return Integer.MAX_VALUE;
if (player.hasPermission("auctionhouse.maxsell.*")) return Integer.MAX_VALUE;
for (int i = 1001; i > 0; i--) {
if (player.hasPermission("auctionhouse.maxsell." + i)) return i;