Merge pull request #2

Added "chance" argument to SpawnHelper event
This commit is contained in:
Will FP
2021-11-12 10:52:13 +00:00
committed by GitHub

View File

@@ -72,6 +72,13 @@ public class EffectSpawnHelper extends Effect implements Listener {
}
}
Double chance = args.getDoubleOrNull("chance");
if (chance != null) {
if (NumberUtils.randInt(0, 100) > chance) {
return;
}
}
World world = location.getWorld();
assert world != null;