me.armar.plugins.autorank.validations
Class PermissionGroupValidation

java.lang.Object
  extended by me.armar.plugins.autorank.validations.PermissionGroupValidation

public class PermissionGroupValidation
extends java.lang.Object


Field Summary
private  Autorank autorank
           
 
Constructor Summary
PermissionGroupValidation(Autorank instance)
           
 
Method Summary
 boolean isValidChange(java.lang.String group)
          Checks whether the @group variable is the same as rankFrom group.
 boolean validateAdvancedGroups(SimpleYamlConfiguration config)
          This will check if the groups defined in the advanced config are correct.
 boolean validateSimpleGroups(SimpleYamlConfiguration config)
          Validates whether the groups in the Simple Config are correct.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

autorank

private final Autorank autorank
Constructor Detail

PermissionGroupValidation

public PermissionGroupValidation(Autorank instance)
Method Detail

validateAdvancedGroups

public boolean validateAdvancedGroups(SimpleYamlConfiguration config)
This will check if the groups defined in the advanced config are correct.

Parameters:
config - Advanced Config
Returns:
true if correct; false otherwise

isValidChange

public boolean isValidChange(java.lang.String group)
Checks whether the @group variable is the same as rankFrom group. It also checks whether the rankTo group is defined as a group in the permission plugin

Parameters:
group -
Returns:
true if (rankFrom.equals(group) && rankTo is defined in the config); false otherwise

validateSimpleGroups

public boolean validateSimpleGroups(SimpleYamlConfiguration config)
Validates whether the groups in the Simple Config are correct.

Parameters:
config - SimpleConfig
Returns:
true if they are valid; false otherwise.