| Constructor and Description |
|---|
RoleImpl(java.lang.String id,
Guild guild) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
getColor()
The color this
Role is displayed in. |
Guild |
getGuild()
Returns the
Guild this Role exists in |
java.lang.String |
getId()
The ID of this
Role. |
JDA |
getJDA()
Returns the
JDA instance of this Role |
RoleManager |
getManager()
Returns the
RoleManager for this Role. |
java.lang.String |
getName()
The Name of the
Role. |
java.util.List<Permission> |
getPermissions()
A list of the literal
Permissions that this Role has.NOTE: these do not necessarily represent the permissions this role will have in a Channel. |
int |
getPermissionsRaw()
|
int |
getPosition()
|
int |
hashCode() |
boolean |
hasPermission(Permission perm)
Checks if this
Role a
Guild level Permission.This does not check the Channel-specific override Permission. |
boolean |
isGrouped()
Is this
Role grouped?(Users with this Role are grouped in the online-list) |
boolean |
isManaged()
Is this
Role managed?(Via plugins like Twitch). |
RoleImpl |
setColor(int color) |
RoleImpl |
setGrouped(boolean grouped) |
RoleImpl |
setManaged(boolean managed) |
RoleImpl |
setName(java.lang.String name) |
RoleImpl |
setPermissions(int permissions) |
RoleImpl |
setPosition(int position) |
java.lang.String |
toString() |
public RoleImpl(java.lang.String id,
Guild guild)
public Guild getGuild()
RoleGuild this Role exists inpublic JDA getJDA()
RoleJDA instance of this Rolepublic int getPermissionsRaw()
Roleint representation of the literal permissions that this Role has.Channel.getPermissionsRaw in interface Rolepublic java.util.List<Permission> getPermissions()
RolePermissions that this Role has.Channel.getPermissions in interface Rolepublic java.lang.String getName()
RoleRole.public int getColor()
RoleRole is displayed in.public int getPosition()
RoleRole in the Guild hierarchy.Role always return -1getPosition in interface RoleRole as integer.public boolean hasPermission(Permission perm)
RoleRole a
Guild level Permission.Permission.hasPermission in interface Roleperm - The Permission to check forPermission is available to this Rolepublic boolean isManaged()
RoleRole managed?public boolean isGrouped()
RoleRole grouped?public RoleManager getManager()
RoleRoleManager for this Role.
In the RoleManager, you can modify all its values.getManager in interface Rolepublic RoleImpl setName(java.lang.String name)
public RoleImpl setColor(int color)
public RoleImpl setPosition(int position)
public RoleImpl setPermissions(int permissions)
public RoleImpl setManaged(boolean managed)
public RoleImpl setGrouped(boolean grouped)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object