Revert "Case shouldn't really matter for groups and permissions"
This reverts commit a67d4a1697
.
This commit is contained in:
parent
5620c4679d
commit
c615b2362f
@ -238,7 +238,7 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
{
|
{
|
||||||
for ( String group : groups )
|
for ( String group : groups )
|
||||||
{
|
{
|
||||||
playerGroups.add( group.toLowerCase() );
|
playerGroups.add( group );
|
||||||
for ( String permission : bungee.getConfigurationAdapter().getPermissions( group ) )
|
for ( String permission : bungee.getConfigurationAdapter().getPermissions( group ) )
|
||||||
{
|
{
|
||||||
setPermission( permission, true );
|
setPermission( permission, true );
|
||||||
@ -252,7 +252,7 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
{
|
{
|
||||||
for ( String group : groups )
|
for ( String group : groups )
|
||||||
{
|
{
|
||||||
playerGroups.remove( group.toLowerCase() );
|
playerGroups.remove( group );
|
||||||
for ( String permission : bungee.getConfigurationAdapter().getPermissions( group ) )
|
for ( String permission : bungee.getConfigurationAdapter().getPermissions( group ) )
|
||||||
{
|
{
|
||||||
setPermission( permission, false );
|
setPermission( permission, false );
|
||||||
@ -264,7 +264,7 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
@Synchronized("permMutex")
|
@Synchronized("permMutex")
|
||||||
public boolean hasPermission(String permission)
|
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
|
@Override
|
||||||
@ -273,10 +273,10 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
{
|
{
|
||||||
if ( value )
|
if ( value )
|
||||||
{
|
{
|
||||||
permissions.add( permission.toLowerCase() );
|
permissions.add( permission );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
permissions.remove( permission.toLowerCase() );
|
permissions.remove( permission );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ public class YamlConfig implements ConfigurationAdapter
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Collection<String> getGroups(String player)
|
public Collection<String> getGroups(String player)
|
||||||
{
|
{
|
||||||
Collection<String> groups = get( "groups." + player.toLowerCase(), null );
|
Collection<String> groups = get( "groups." + player, null );
|
||||||
Collection<String> ret = ( groups == null ) ? new HashSet<String>() : new HashSet<>( groups );
|
Collection<String> ret = ( groups == null ) ? new HashSet<String>() : new HashSet<>( groups );
|
||||||
ret.add( "default" );
|
ret.add( "default" );
|
||||||
return ret;
|
return ret;
|
||||||
@ -211,6 +211,6 @@ public class YamlConfig implements ConfigurationAdapter
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Collection<String> getPermissions(String group)
|
public Collection<String> getPermissions(String group)
|
||||||
{
|
{
|
||||||
return get( "permissions." + group.toLowerCase(), Collections.EMPTY_LIST );
|
return get( "permissions." + group, Collections.EMPTY_LIST );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user