Always specify Locale on toLowerCase and toUpperCase usages, fixes AuthMe not working correctly on machines with turkish locale. ('I'.toLowerCase() => 'ı')
This commit is contained in:
@@ -11,6 +11,7 @@ import fr.xephi.authme.util.AtomicIntervalCounter;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import static fr.xephi.authme.service.BukkitService.TICKS_PER_MINUTE;
|
||||
@@ -176,7 +177,7 @@ public class AntiBotService implements SettingsDependent {
|
||||
* @return true if the given name has been kicked because of Antibot
|
||||
*/
|
||||
public boolean wasPlayerKicked(String name) {
|
||||
return antibotKicked.contains(name.toLowerCase());
|
||||
return antibotKicked.contains(name.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,7 +187,7 @@ public class AntiBotService implements SettingsDependent {
|
||||
* @param name the name to add
|
||||
*/
|
||||
public void addPlayerKick(String name) {
|
||||
antibotKicked.addIfAbsent(name.toLowerCase());
|
||||
antibotKicked.addIfAbsent(name.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
public enum AntiBotStatus {
|
||||
|
||||
Reference in New Issue
Block a user