fix it once and for all

This commit is contained in:
Minecon724 2024-09-21 10:24:50 +02:00
parent 3c79dbf8c3
commit f82b4d9c4e
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8

View file

@ -85,10 +85,11 @@ public class Configuration {
int min = (int) dropMap.get("quantityMin");
int max = (int) dropMap.get("quantityMax");
double chance;
try {
double chance = (double) dropMap.get("chance");
chance = (double) dropMap.get("chance");
} catch (ClassCastException e) { // pointlessest error ever
double chance = ((Integer) dropMap.get("chance")).doubleValue();
chance = ((Integer) dropMap.get("chance")).doubleValue();
}
drops.add(new Drop(itemStack, min, max, chance));