Always use root locale for case conversions
This commit is contained in:
@@ -724,7 +724,7 @@ public class BungeeCord extends ProxyServer
|
||||
@Override
|
||||
public boolean apply(ProxiedPlayer input)
|
||||
{
|
||||
return ( input == null ) ? false : input.getName().toLowerCase().startsWith( partialName.toLowerCase() );
|
||||
return ( input == null ) ? false : input.getName().toLowerCase( Locale.ROOT ).startsWith( partialName.toLowerCase( Locale.ROOT ) );
|
||||
}
|
||||
} ) );
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@ package net.md_5.bungee;
|
||||
import com.google.common.base.Preconditions;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufAllocator;
|
||||
import java.util.Locale;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
@@ -296,7 +297,7 @@ public class ServerConnector extends PacketHandler
|
||||
{
|
||||
ServerInfo def = user.updateAndGetNextServer( target );
|
||||
ServerKickEvent event = new ServerKickEvent( user, target, ComponentSerializer.parse( kick.getMessage() ), def, ServerKickEvent.State.CONNECTING );
|
||||
if ( event.getKickReason().toLowerCase().contains( "outdated" ) && def != null )
|
||||
if ( event.getKickReason().toLowerCase( Locale.ROOT ).contains( "outdated" ) && def != null )
|
||||
{
|
||||
// Pre cancel the event if we are going to try another server
|
||||
event.setCancelled( true );
|
||||
|
@@ -15,6 +15,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -243,7 +244,7 @@ public class YamlConfig implements ConfigurationAdapter
|
||||
InetSocketAddress address = Util.getAddr( host );
|
||||
Map<String, String> forced = new CaseInsensitiveMap<>( get( "forced_hosts", forcedDef, val ) );
|
||||
String tabListName = get( "tab_list", "GLOBAL_PING", val );
|
||||
DefaultTabList value = DefaultTabList.valueOf( tabListName.toUpperCase() );
|
||||
DefaultTabList value = DefaultTabList.valueOf( tabListName.toUpperCase( Locale.ROOT ) );
|
||||
if ( value == null )
|
||||
{
|
||||
value = DefaultTabList.GLOBAL_PING;
|
||||
|
Reference in New Issue
Block a user