mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-26 18:47:42 +01:00
Merge pull request #869 from Cube-Space/permission-api
Added getPermissions() to the CommandSender API
This commit is contained in:
commit
b3627652f2
@ -82,4 +82,10 @@ public interface CommandSender
|
|||||||
* @param value the value of the node
|
* @param value the value of the node
|
||||||
*/
|
*/
|
||||||
public void setPermission(String permission, boolean value);
|
public void setPermission(String permission, boolean value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all Permissions which this CommandSender has
|
||||||
|
* @return a unmodifiable Collection of Strings which represent their permissions
|
||||||
|
*/
|
||||||
|
public Collection<String> getPermissions();
|
||||||
}
|
}
|
||||||
|
@ -400,6 +400,12 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<String> getPermissions()
|
||||||
|
{
|
||||||
|
return Collections.unmodifiableCollection(permissions);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
@ -82,4 +82,10 @@ public class ConsoleCommandSender implements CommandSender
|
|||||||
{
|
{
|
||||||
throw new UnsupportedOperationException( "Console has all permissions" );
|
throw new UnsupportedOperationException( "Console has all permissions" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<String> getPermissions()
|
||||||
|
{
|
||||||
|
return Collections.emptySet();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user