#765 Replace Utils usages with TeleportService + misc householding

- Remove some legacy settings
- Move Utils "addNormal" method to AuthGroupHandler

(Reapplied changes from orphaned fe29089)
This commit is contained in:
ljacqu
2016-07-03 19:53:44 +02:00
parent 7ea0763966
commit 7788ad6230
13 changed files with 78 additions and 64 deletions
@@ -86,4 +86,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);
}
}