Skip to content

Commit

Permalink
Alterado tipo de Locale
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock committed Feb 21, 2024
1 parent 5028f43 commit d9598ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ private boolean processGreenThumbPlants(BlockState blockState, BlockBreakEvent b
return false;
}

if (!crops.contains(blockState.getType().getKey().getKey().toLowerCase(Locale.ROOT))) {
if (!crops.contains(blockState.getType().getKey().getKey().toLowerCase(Locale.ENGLISH))) {
return false;
}

Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/gmail/nossr50/util/Permissions.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,27 +111,27 @@ private Permissions() {}
/* XP PERKS */
public static boolean quadrupleXp(Permissible permissible, PrimarySkillType skill) {
return permissible.hasPermission("mcmmo.perks.xp.quadruple.all")
|| permissible.hasPermission("mcmmo.perks.xp.quadruple." + skill.toString().toLowerCase(Locale.ENGLISH));
|| permissible.hasPermission("mcmmo.perks.xp.quadruple." + skill.toString().toLowerCase(Locale.ENGLISH));
}

public static boolean tripleXp(Permissible permissible, PrimarySkillType skill) {
return permissible.hasPermission("mcmmo.perks.xp.triple.all")
|| permissible.hasPermission("mcmmo.perks.xp.triple." + skill.toString().toLowerCase(Locale.ENGLISH));
|| permissible.hasPermission("mcmmo.perks.xp.triple." + skill.toString().toLowerCase(Locale.ENGLISH));
}

public static boolean doubleAndOneHalfXp(Permissible permissible, PrimarySkillType skill) {
return permissible.hasPermission("mcmmo.perks.xp.150percentboost.all")
|| permissible.hasPermission("mcmmo.perks.xp.150percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
|| permissible.hasPermission("mcmmo.perks.xp.150percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
}

public static boolean doubleXp(Permissible permissible, PrimarySkillType skill) {
return permissible.hasPermission("mcmmo.perks.xp.double.all")
|| permissible.hasPermission("mcmmo.perks.xp.double." + skill.toString().toLowerCase(Locale.ENGLISH));
|| permissible.hasPermission("mcmmo.perks.xp.double." + skill.toString().toLowerCase(Locale.ENGLISH));
}

public static boolean oneAndOneHalfXp(Permissible permissible, PrimarySkillType skill) {
return permissible.hasPermission("mcmmo.perks.xp.50percentboost.all")
|| permissible.hasPermission("mcmmo.perks.xp.50percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
|| permissible.hasPermission("mcmmo.perks.xp.50percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
}

public static boolean oneAndAQuarterXp(Permissible permissible, PrimarySkillType skill) {
Expand All @@ -141,7 +141,7 @@ public static boolean oneAndAQuarterXp(Permissible permissible, PrimarySkillType

public static boolean oneAndOneTenthXp(Permissible permissible, PrimarySkillType skill) {
return permissible.hasPermission("mcmmo.perks.xp.10percentboost.all")
|| permissible.hasPermission("mcmmo.perks.xp.10percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
|| permissible.hasPermission("mcmmo.perks.xp.10percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
}

public static boolean customXpBoost(Permissible permissible, PrimarySkillType skill) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ public static boolean isInvalidSkill(CommandSender sender, String skillName) {
}

public static boolean shouldEnableToggle(String arg) {
return TRUE_OPTIONS.contains(arg.toLowerCase(Locale.ROOT));
return TRUE_OPTIONS.contains(arg.toLowerCase(Locale.ENGLISH));
}

public static boolean shouldDisableToggle(String arg) {
return FALSE_OPTIONS.contains(arg.toLowerCase(Locale.ROOT));
return FALSE_OPTIONS.contains(arg.toLowerCase(Locale.ENGLISH));
}

/**
Expand Down Expand Up @@ -276,7 +276,7 @@ private static List<String> matchPlayer(String partialName) {
break;
}

if (playerName.toLowerCase(Locale.ROOT).contains(partialName.toLowerCase(Locale.ROOT))) {
if (playerName.toLowerCase(Locale.ENGLISH).contains(partialName.toLowerCase(Locale.ENGLISH))) {
// Partial match
matchedPlayers.add(playerName);
}
Expand Down

0 comments on commit d9598ec

Please sign in to comment.