group
info
Determines the "group name" that should be shown in the player list. Other than that, this permission has no relevance
Question is the group is just the group name not the file.name (Default or Default.json)?
the playergroup is the players permissions when 1. not in an area or 2. in an area that the player is not assigned to or said area has no default permission set.
i would stay away from the default permissions file in the base of the permissions folder. this file is for when there is a player on the server that has no assigned permission. in the server config you want to set the Permissions_DefaultNewPlayerPermissionGroup= to an actual group you have created. in my case its Permissions_DefaultNewPlayerPermissionGroup=Pve.
when getting playergroup() this returns either the name from the json or the actual name of the file (Pve,json returns Pve) im not 100% as i set the filename and the name setting the same.
when a player is assigned to an area (in my case "Owner") the permission you want Area.getPlayerPermission(player) this returns the string of the assigned group in the area.
from my understanding when a player is in an area where the default area permissions is set and the player is not assigned to the are you want to use Area.getActivePlayerPermission(player). for some reason this currently always returns null(maybe im doing something wrong or its not implemented yet). for this reason im setting the area's default permissions name as an attribute. this permission can also be found in the the rights table of the areas database.
//im sure there is a better way of doing this but this works for me.
for context my permissions are playergroups Pve Pvp
my area permissions are Owner and friend
my default area permissions are Pve Pvp Bank
the below 2 methods are used to control and sort my areas.
public void areaModePlayer(Player player){
Area area = player.getCurrentArea();
String playerAreaMode = (String)player.getAttribute("Area_Mode");
if(playerAreaMode.equalsIgnoreCase("Pve")){
}if(playerAreaMode.equalsIgnoreCase("Pvp")){
player.setPermissionGroup("Pve");
player.setAttribute("Area_Mode", "Pve");
player.showStatusMessage("<color=yellow>LEFT PVP ZONE</color>", 5);
if(area.hasAttribute("Area_Mode")){
String areaMode = (String)area.getAttribute("Area_Mode");
if(areaMode.equalsIgnoreCase("Pve")){
player.setPermissionGroup("Pve");
if(player.hasAttribute("Area_Mode")){
String playerAreaMode = (String)player.getAttribute("Area_Mode");
if(playerAreaMode.equalsIgnoreCase("Pve")){
}if(playerAreaMode.equalsIgnoreCase("Pvp")){
player.setAttribute("Area_Mode", "Pve");
player.showStatusMessage("<color=yellow>LEFT PVP ZONE</color>", 5);
}if(!player.hasAttribute("Area_Mode")){
player.setPermissionGroup("Pve");
player.setAttribute("Area_Mode", "Pve");
}if(areaMode.equalsIgnoreCase("Pvp")){
player.setPermissionGroup("Pvp");
player.setAttribute("Area_Mode", "Pvp");
player.showStatusMessage("<color=red>PVP ZONE</color>", 15);
}if(!area.hasAttribute("Area_Mode")){
player.setPermissionGroup("Pve");
player.setAttribute("Area_Mode", "Pve");
// player.showStatusMessage("<color=yellow>LEFT PVP ZONE</color>", 5);
public void updateAreaRights(Player player){
Area area = player.getCurrentArea();
UILabel Area_Rights_Label = (UILabel)player.getAttribute("Area_Rights_Label");
String playerGroup = player.getPermissionGroup();
if(playerGroup.equalsIgnoreCase("Admin")){
Area_Rights_Label.setText("Rights: "+playerGroup);
}if(playerGroup.equalsIgnoreCase("Pve")){
Area_Rights_Label.setText("Rights: "+playerGroup);
}if(playerGroup.equalsIgnoreCase("Pvp")){
Area_Rights_Label.setText("Rights: "+playerGroup);
String playerPermission = area.getPlayerPermission(player);
if(playerPermission!=null){
if(playerPermission.equalsIgnoreCase("Owner")){
Area_Rights_Label.setText("Rights: "+playerPermission);
}if(playerPermission.equalsIgnoreCase("Friend")){
Area_Rights_Label.setText("Rights: "+playerPermission);
}if(playerPermission==null){
String activeAreaPermission = player.getActiveAreaPermission();
if(activeAreaPermission!=null){
if(activeAreaPermission.equalsIgnoreCase("Pve")){
Area_Rights_Label.setText("Rights: "+activeAreaPermission);
}if(activeAreaPermission.equalsIgnoreCase("Pvp")){
Area_Rights_Label.setText("Rights: "+activeAreaPermission);
}if(activeAreaPermission.equalsIgnoreCase("Bank")){
Area_Rights_Label.setText("Rights: "+activeAreaPermission);
}if(activeAreaPermission==null){
Area_Rights_Label.setText("Rights: None");
Display More