mirror of
https://github.com/songoda/EpicHeads.git
synced 2025-02-18 04:21:20 +01:00
Added support for decimals in the head drop chance.
This commit is contained in:
parent
ca2c88be07
commit
7a1f5cf26c
@ -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) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user