mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 04:25:26 +02:00
spring-cleaning, update all the dependencies
This commit is contained in:
@@ -3,7 +3,7 @@ package com.gmail.nossr50.util.skills;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.sounds.SoundManager;
|
||||
import com.gmail.nossr50.util.sounds.SoundType;
|
||||
import org.apache.commons.lang.math.RandomUtils;
|
||||
import org.apache.commons.lang3.RandomUtils;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@@ -42,31 +42,22 @@ public final class ParticleEffectUtils {
|
||||
|
||||
double offSetVal = 0.3D;
|
||||
|
||||
switch(RandomUtils.nextInt(10)) {
|
||||
|
||||
case 0:
|
||||
return new Location(world, x - offSetVal, y, z);
|
||||
case 1:
|
||||
return new Location(world, x + offSetVal, y, z);
|
||||
case 2:
|
||||
return new Location(world, x, y + offSetVal, z);
|
||||
case 3:
|
||||
return new Location(world, x, y - offSetVal, z);
|
||||
case 4: Location locE = new Location(world, x, y, z + offSetVal);
|
||||
return new Location(world, x, y, z - offSetVal);
|
||||
case 5:
|
||||
return new Location(world, x + offSetVal, y, z + offSetVal);
|
||||
case 6:
|
||||
return new Location(world, x - offSetVal, y, z - offSetVal);
|
||||
case 7:
|
||||
return new Location(world, x - offSetVal, y - offSetVal, z - offSetVal);
|
||||
case 8:
|
||||
return new Location(world, x + offSetVal, y - offSetVal, z + offSetVal);
|
||||
case 9:
|
||||
return new Location(world, x - offSetVal, y + offSetVal, z - offSetVal);
|
||||
default:
|
||||
return new Location(world, x + offSetVal, y + offSetVal, z - offSetVal);
|
||||
}
|
||||
return switch (RandomUtils.nextInt(0, 10)) {
|
||||
case 0 -> new Location(world, x - offSetVal, y, z);
|
||||
case 1 -> new Location(world, x + offSetVal, y, z);
|
||||
case 2 -> new Location(world, x, y + offSetVal, z);
|
||||
case 3 -> new Location(world, x, y - offSetVal, z);
|
||||
case 4 -> {
|
||||
Location locE = new Location(world, x, y, z + offSetVal);
|
||||
yield new Location(world, x, y, z - offSetVal);
|
||||
}
|
||||
case 5 -> new Location(world, x + offSetVal, y, z + offSetVal);
|
||||
case 6 -> new Location(world, x - offSetVal, y, z - offSetVal);
|
||||
case 7 -> new Location(world, x - offSetVal, y - offSetVal, z - offSetVal);
|
||||
case 8 -> new Location(world, x + offSetVal, y - offSetVal, z + offSetVal);
|
||||
case 9 -> new Location(world, x - offSetVal, y + offSetVal, z - offSetVal);
|
||||
default -> new Location(world, x + offSetVal, y + offSetVal, z - offSetVal);
|
||||
};
|
||||
}
|
||||
|
||||
public static void playDodgeEffect(Player player) {
|
||||
|
Reference in New Issue
Block a user