int i = new Random().nextInt(100);
switch (data.getInt("playersData." + name + ".CritLevel")) {
case 1:
if (i <= 5) {
e.setDamage(e.getDamage() * 1.5);
e.getEntity().getWorld().playEffect(e.getEntity().getLocation(), Effect.BOW_FIRE, 2);
e.getEntity().getWorld().spawnParticle(Particle.LAVA, e.getEntity().getLocation().add(0, 1, 0),
10);
}
break;
case 2:
if (i <= 10) {
e.setDamage(e.getDamage() * 1.75);
e.getEntity().getWorld().playEffect(e.getEntity().getLocation(), Effect.BOW_FIRE, 3);
e.getEntity().getWorld().spawnParticle(Particle.LAVA, e.getEntity().getLocation().add(0, 1, 0), 10);
}
break;
case 3:
if (i <= 15) {
e.setDamage(e.getDamage() * 2);
e.getEntity().getWorld().playEffect(e.getEntity().getLocation(), Effect.BOW_FIRE, 4);
e.getEntity().getWorld().spawnParticle(Particle.LAVA, e.getEntity().getLocation().add(0, 1, 0), 10);
}
break;
case 4:
if (i <= 100) {
e.setDamage(e.getDamage() * 2);
e.getEntity().getWorld().playEffect(e.getEntity().getLocation(), Effect.BOW_FIRE, 4);
e.getEntity().getWorld().spawnParticle(Particle.LAVA, e.getEntity().getLocation().add(0, 1, 0), 10);
break;
}