mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Null pointer check for Perm 2.7.4 prefix/suffix
This commit is contained in:
parent
ed29f29622
commit
4f31d2779d
@ -9,7 +9,7 @@ import org.bukkit.plugin.Plugin;
|
||||
public class Permissions2Handler implements IPermissionsHandler
|
||||
{
|
||||
private final transient PermissionHandler permissionHandler;
|
||||
|
||||
|
||||
Permissions2Handler(final Plugin permissionsPlugin)
|
||||
{
|
||||
permissionHandler = ((Permissions)permissionsPlugin).getHandler();
|
||||
@ -37,12 +37,13 @@ public class Permissions2Handler implements IPermissionsHandler
|
||||
|
||||
public String getPrefix(final Player base)
|
||||
{
|
||||
return permissionHandler.getGroupPrefix(base.getWorld().getName(), getGroup(base));
|
||||
final String prefix = permissionHandler.getGroupPrefix(base.getWorld().getName(), getGroup(base));
|
||||
return prefix == null ? "" : prefix;
|
||||
}
|
||||
|
||||
public String getSuffix(final Player base)
|
||||
{
|
||||
return permissionHandler.getGroupSuffix(base.getWorld().getName(), getGroup(base));
|
||||
final String suffix = permissionHandler.getGroupSuffix(base.getWorld().getName(), getGroup(base));
|
||||
return suffix == null ? "" : suffix;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user