summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-07-21 02:09:54 +0200
committersnowleo <schneeleo@gmail.com>2011-07-21 02:09:54 +0200
commit4f31d2779db23090fbc005c7282bc1fb061d2686 (patch)
tree0e1ba4e40af9368c5fba39af8828db8e6a499f1a
parented29f296228fc8395c980f125525e3e083a6f4bd (diff)
downloadEssentials-4f31d2779db23090fbc005c7282bc1fb061d2686.tar
Essentials-4f31d2779db23090fbc005c7282bc1fb061d2686.tar.gz
Essentials-4f31d2779db23090fbc005c7282bc1fb061d2686.tar.lz
Essentials-4f31d2779db23090fbc005c7282bc1fb061d2686.tar.xz
Essentials-4f31d2779db23090fbc005c7282bc1fb061d2686.zip
Null pointer check for Perm 2.7.4 prefix/suffix
-rw-r--r--Essentials/src/com/earth2me/essentials/Permissions2Handler.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Permissions2Handler.java b/Essentials/src/com/earth2me/essentials/Permissions2Handler.java
index c588bb5fa..23353c643 100644
--- a/Essentials/src/com/earth2me/essentials/Permissions2Handler.java
+++ b/Essentials/src/com/earth2me/essentials/Permissions2Handler.java
@@ -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;
}
-
}