aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/GardenNpcPrices.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/GardenNpcPrices.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/GardenNpcPrices.java
index d08cb1a5..789657f5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/GardenNpcPrices.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/GardenNpcPrices.java
@@ -20,8 +20,8 @@
package io.github.moulberry.notenoughupdates.miscfeatures;
import com.google.common.reflect.TypeToken;
-import com.google.gson.GsonBuilder;
import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.autosubscribe.NEUAutoSubscribe;
import io.github.moulberry.notenoughupdates.events.RepositoryReloadEvent;
@@ -120,6 +120,7 @@ public class GardenNpcPrices {
double price = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarOrBin(internalName, false) /item.price*amount;
prices.put(item.display, price);
}
+ if (prices.isEmpty()) return new net.minecraft.util.Tuple<String, Double>("NEU REPO error", 0d);
Map.Entry<String, Double> maxPrice = Collections.max(prices.entrySet(), Map.Entry.comparingByValue());
return new net.minecraft.util.Tuple<String, Double>(maxPrice.getKey(), maxPrice.getValue());
}