Package de.neo.rankbridge.shared.manager
Class PermissionManager
java.lang.Object
de.neo.rankbridge.shared.manager.PermissionManager
public class PermissionManager
extends java.lang.Object
The Manager for Discord and Teamspeak permissions.
- Version:
- 1.0
- Author:
- Neo8
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashMap<java.lang.String,java.lang.Long>discord_groupsprivate java.util.HashMap<java.lang.Long,java.lang.String>group_discordprivate java.util.HashMap<java.lang.Integer,java.lang.String>group_teamspeakprivate static PermissionManagerINSTANCEprivate MinecraftManagermgrprivate java.util.HashMap<java.lang.String,java.lang.Integer>teamspeak_group -
Constructor Summary
Constructors Constructor Description PermissionManager(MinecraftManager mgr)New Instance. -
Method Summary
Modifier and Type Method Description java.lang.BooleancheckMinecraft(int[] groups, java.lang.String uuid)Formats raw values and invokescheckMinecraft(String, String)java.lang.BooleancheckMinecraft(java.lang.String s1, java.lang.String uuid)Updates the Minecraft permission.java.lang.BooleancheckTeamspeak(int[] groups, java.lang.String uuid)Formats raw values and invokescheckTeamspeak(String, String)java.lang.BooleancheckTeamspeak(java.lang.String s1, java.lang.String uuid)Updates the Teamspeak groups.java.lang.StringgetDiscordGroup(java.lang.Long l)Returns a permission by role.java.lang.LonggetDiscordGroup(java.lang.String s)Returns a role by permission.static PermissionManagergetInstance()Returns the Instance.java.lang.StringgetTeamspeakGroup(java.lang.Integer l)Returns a permission by group.java.lang.IntegergetTeamspeakGroup(java.lang.String s)Returns a group by permission.java.lang.BooleanisDiscordRole(java.lang.Long l)Is the role synchronized?java.lang.BooleanisTeamspeakGroup(java.lang.Integer l)Is the group synchronized?
-
Field Details
-
discord_groups
private java.util.HashMap<java.lang.String,java.lang.Long> discord_groups -
group_discord
private java.util.HashMap<java.lang.Long,java.lang.String> group_discord -
teamspeak_group
private java.util.HashMap<java.lang.String,java.lang.Integer> teamspeak_group -
group_teamspeak
private java.util.HashMap<java.lang.Integer,java.lang.String> group_teamspeak -
mgr
-
INSTANCE
-
-
Constructor Details
-
PermissionManager
New Instance.- Parameters:
mgr- the MinecraftManager.
-
-
Method Details
-
getDiscordGroup
public java.lang.String getDiscordGroup(java.lang.Long l)Returns a permission by role.- Parameters:
l- the role.- Returns:
- the permission.
-
getDiscordGroup
public java.lang.Long getDiscordGroup(java.lang.String s)Returns a role by permission.- Parameters:
s- the permission.- Returns:
- the role.
-
getTeamspeakGroup
public java.lang.String getTeamspeakGroup(java.lang.Integer l)Returns a permission by group.- Parameters:
l- the group.- Returns:
- the permission.
-
getTeamspeakGroup
public java.lang.Integer getTeamspeakGroup(java.lang.String s)Returns a group by permission.- Parameters:
s- the permission.- Returns:
- the group.
-
isDiscordRole
public java.lang.Boolean isDiscordRole(java.lang.Long l)Is the role synchronized?- Parameters:
l- the role- Returns:
- Boolean whether the role is synchronized or not.
-
isTeamspeakGroup
public java.lang.Boolean isTeamspeakGroup(java.lang.Integer l)Is the group synchronized?- Parameters:
l- the group- Returns:
- Boolean whether the group is synchronized or not.
-
checkTeamspeak
public java.lang.Boolean checkTeamspeak(int[] groups, java.lang.String uuid)Formats raw values and invokescheckTeamspeak(String, String)- Parameters:
groups- array of integers with groups.uuid- the uuid of the player. only used to give this tocheckTeamspeak(String, String)- Returns:
- return value of
checkTeamspeak(String, String)
-
checkTeamspeak
public java.lang.Boolean checkTeamspeak(java.lang.String s1, java.lang.String uuid)Updates the Teamspeak groups.- Parameters:
s1- the Groups as String.uuid- the Minecraft uuid.- Returns:
- Boolean whether the verification is up to date or not.
-
checkMinecraft
public java.lang.Boolean checkMinecraft(int[] groups, java.lang.String uuid)Formats raw values and invokescheckMinecraft(String, String)- Parameters:
groups- array of integers with groups.uuid- the uuid of the player. only used to give this tocheckMinecraft(String, String)- Returns:
- return value of
checkMinecraft(String, String)
-
checkMinecraft
public java.lang.Boolean checkMinecraft(java.lang.String s1, java.lang.String uuid)Updates the Minecraft permission.- Parameters:
s1- the Groups as String.uuid- the Minecraft uuid.- Returns:
- Boolean whether the verification is up to date or not.
-
getInstance
Returns the Instance.- Returns:
- the instance.
-