Merge 765-teleport-handling into jsoncache-fix

This commit is contained in:
ljacqu
2016-07-04 18:46:37 +02:00
13 changed files with 79 additions and 95 deletions
@@ -85,4 +85,28 @@ public class AuthGroupHandler {
}
}
/**
* TODO: This method requires better explanation.
* <p>
* Set the normal group of a player.
*
* @param player The player.
* @param group The normal group.
*
* @return True on success, false on failure.
*/
public boolean addNormal(Player player, String group) {
// Check whether the permissions check is enabled
if (!settings.getProperty(PluginSettings.ENABLE_PERMISSION_CHECK)) {
return false;
}
// Remove old groups
permissionsManager.removeGroups(player, Arrays.asList(Settings.unRegisteredGroup,
Settings.getRegisteredGroup, Settings.getUnloggedinGroup));
// Add the normal group, return the result
return permissionsManager.addGroup(player, group);
}
}