From c615b2362f558243e5b5f5a6acf5f9ce98f8ddb4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 14 Apr 2013 11:57:50 +1000 Subject: [PATCH] Revert "Case shouldn't really matter for groups and permissions" This reverts commit a67d4a1697312b2fa8b41ac6893336d0bef2d81d. --- .../src/main/java/net/md_5/bungee/UserConnection.java | 10 +++++----- .../main/java/net/md_5/bungee/config/YamlConfig.java | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index 07d5ab4a..66d1cb8b 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -238,7 +238,7 @@ public final class UserConnection implements ProxiedPlayer { for ( String group : groups ) { - playerGroups.add( group.toLowerCase() ); + playerGroups.add( group ); for ( String permission : bungee.getConfigurationAdapter().getPermissions( group ) ) { setPermission( permission, true ); @@ -252,7 +252,7 @@ public final class UserConnection implements ProxiedPlayer { for ( String group : groups ) { - playerGroups.remove( group.toLowerCase() ); + playerGroups.remove( group ); for ( String permission : bungee.getConfigurationAdapter().getPermissions( group ) ) { setPermission( permission, false ); @@ -264,7 +264,7 @@ public final class UserConnection implements ProxiedPlayer @Synchronized("permMutex") public boolean hasPermission(String permission) { - return bungee.getPluginManager().callEvent( new PermissionCheckEvent( this, permission, permissions.contains( permission.toLowerCase() ) ) ).hasPermission(); + return bungee.getPluginManager().callEvent( new PermissionCheckEvent( this, permission, permissions.contains( permission ) ) ).hasPermission(); } @Override @@ -273,10 +273,10 @@ public final class UserConnection implements ProxiedPlayer { if ( value ) { - permissions.add( permission.toLowerCase() ); + permissions.add( permission ); } else { - permissions.remove( permission.toLowerCase() ); + permissions.remove( permission ); } } diff --git a/proxy/src/main/java/net/md_5/bungee/config/YamlConfig.java b/proxy/src/main/java/net/md_5/bungee/config/YamlConfig.java index 5985d29a..e3d779c6 100644 --- a/proxy/src/main/java/net/md_5/bungee/config/YamlConfig.java +++ b/proxy/src/main/java/net/md_5/bungee/config/YamlConfig.java @@ -201,7 +201,7 @@ public class YamlConfig implements ConfigurationAdapter @SuppressWarnings("unchecked") public Collection getGroups(String player) { - Collection groups = get( "groups." + player.toLowerCase(), null ); + Collection groups = get( "groups." + player, null ); Collection ret = ( groups == null ) ? new HashSet() : new HashSet<>( groups ); ret.add( "default" ); return ret; @@ -211,6 +211,6 @@ public class YamlConfig implements ConfigurationAdapter @SuppressWarnings("unchecked") public Collection getPermissions(String group) { - return get( "permissions." + group.toLowerCase(), Collections.EMPTY_LIST ); + return get( "permissions." + group, Collections.EMPTY_LIST ); } }