updated manialink code for FML 1.1

This commit is contained in:
Steffen Schröder
2014-04-27 16:22:12 +02:00
parent 332f8d76fb
commit 483d673e5f
26 changed files with 222 additions and 137 deletions

View File

@ -230,10 +230,15 @@ class AuthenticationManager implements CallbackListener {
/**
* Get Name of the Authentication Level from Level Int
*
* @param int $authLevelInt
* @param mixed $authLevelInt
* @return string
*/
public static function getAuthLevelName($authLevelInt) {
if ($authLevelInt instanceof Player) {
$authLevelInt = $authLevelInt->authLevel;
} else {
$authLevelInt = (int) $authLevelInt;
}
if ($authLevelInt == self::AUTH_LEVEL_MASTERADMIN) {
return 'MasterAdmin';
}
@ -252,10 +257,15 @@ class AuthenticationManager implements CallbackListener {
/**
* Get the Abbreviation of the Authentication Level from Level Int
*
* @param int $authLevelInt
* @param mixed $authLevelInt
* @return string
*/
public static function getAuthLevelAbbreviation($authLevelInt) {
if ($authLevelInt instanceof Player) {
$authLevelInt = $authLevelInt->authLevel;
} else {
$authLevelInt = (int) $authLevelInt;
}
if ($authLevelInt == self::AUTH_LEVEL_MASTERADMIN) {
return 'MA';
}