Misc code fixes

This commit is contained in:
nossr50
2020-07-13 11:39:03 -07:00
parent 428c093ae4
commit 7eae59a0b3
153 changed files with 1139 additions and 1474 deletions

View File

@ -14,7 +14,7 @@ import org.bukkit.entity.Player;
public final class ParticleEffectUtils {
private ParticleEffectUtils() {};
private ParticleEffectUtils() {}
public static void playGreenThumbEffect(Location location) {
World world = location.getWorld();

View File

@ -11,7 +11,7 @@ public final class PerksUtils {
private static final int LUCKY_SKILL_ACTIVATION_CHANCE = 75;
private static final int NORMAL_SKILL_ACTIVATION_CHANCE = 100;
private PerksUtils() {};
private PerksUtils() {}
public static int handleCooldownPerks(Player player, int cooldown) {
if (Permissions.halvedCooldowns(player)) {
@ -47,7 +47,6 @@ public final class PerksUtils {
public static float handleXpPerks(Player player, float xp, PrimarySkillType skill) {
double modifier = 1.0F;
double originalXP = xp;
if (Permissions.customXpBoost(player, skill)) {
if(UserManager.getPlayer(player) != null && UserManager.getPlayer(player).isDebugMode()) {
@ -79,7 +78,7 @@ public final class PerksUtils {
if(UserManager.getPlayer(player) != null && UserManager.getPlayer(player).isDebugMode()) {
player.sendMessage(ChatColor.GOLD + "[DEBUG] " + ChatColor.RESET + "XP Perk Multiplier - " + ChatColor.GOLD + modifier);
player.sendMessage(ChatColor.GOLD + "[DEBUG] " + ChatColor.RESET + "Original XP before perk boosts " + ChatColor.RED + originalXP);
player.sendMessage(ChatColor.GOLD + "[DEBUG] " + ChatColor.RESET + "Original XP before perk boosts " + ChatColor.RED + (double) xp);
player.sendMessage(ChatColor.GOLD + "[DEBUG] " + ChatColor.RESET + "XP AFTER PERKS " + ChatColor.DARK_RED + modifiedXP);
}

View File

@ -276,8 +276,7 @@ public class RankUtils {
if (subSkillRanks == null)
subSkillRanks = new HashMap<>();
if (subSkillRanks.get(s) == null)
subSkillRanks.put(s, new HashMap<>());
subSkillRanks.computeIfAbsent(s, k -> new HashMap<>());
}
/* public static int getSubSkillUnlockRequirement(SubSkillType subSkillType)