spring-cleaning, update all the dependencies

This commit is contained in:
nossr50
2024-05-19 13:48:25 -07:00
parent 32ff8c6818
commit 364d4cd6e7
15 changed files with 64 additions and 70 deletions

View File

@@ -18,7 +18,6 @@ import com.gmail.nossr50.util.player.UserManager;
import com.gmail.nossr50.util.scoreboards.ScoreboardManager.SidebarType;
import com.gmail.nossr50.util.skills.SkillTools;
import com.tcoded.folialib.wrapper.task.WrappedTask;
import org.apache.commons.lang.Validate;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.scoreboard.DisplaySlot;
@@ -30,6 +29,8 @@ import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.Map;
import static java.util.Objects.requireNonNull;
public class ScoreboardWrapper {
public static final String SIDE_OBJECTIVE = "mcMMO_sideObjective";
public static final String POWER_OBJECTIVE = "mcMMO_powerObjective";
@@ -485,7 +486,7 @@ public class ScoreboardWrapper {
break;
case SKILL_BOARD:
Validate.notNull(targetSkill);
requireNonNull(targetSkill);
if (!SkillTools.isChildSkill(targetSkill)) {
int currentXP = mcMMOPlayer.getSkillXpLevel(targetSkill);

View File

@@ -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) {