Added support for decimals in the head drop chance.

This commit is contained in:
Brianna 2019-07-19 09:45:45 -04:00
parent ca2c88be07
commit 7a1f5cf26c

View File

@ -29,7 +29,7 @@ public class DeathListeners implements Listener {
@EventHandler
public void onDeath(EntityDeathEvent event) {
int ch = Integer.parseInt(Setting.DROP_CHANCE.getString().replace("%", ""));
double ch = Double.parseDouble(Setting.DROP_CHANCE.getString().replace("%", ""));
double rand = Math.random() * 100;
if (rand - ch < 0 || ch == 100) {