Merge pull request #869 from Cube-Space/permission-api

Added getPermissions() to the CommandSender API
This commit is contained in:
md-5
2014-02-09 14:36:15 +11:00
3 changed files with 18 additions and 0 deletions

View File

@@ -400,6 +400,12 @@ public final class UserConnection implements ProxiedPlayer
}
}
@Override
public Collection<String> getPermissions()
{
return Collections.unmodifiableCollection(permissions);
}
@Override
public String toString()
{

View File

@@ -82,4 +82,10 @@ public class ConsoleCommandSender implements CommandSender
{
throw new UnsupportedOperationException( "Console has all permissions" );
}
@Override
public Collection<String> getPermissions()
{
return Collections.emptySet();
}
}