Return empty string instead of null in VaultChatHook
This commit is contained in:
parent
6602b23f09
commit
e1e7bc8e0d
@ -26,6 +26,7 @@
|
|||||||
package me.lucko.luckperms.bukkit.vault;
|
package me.lucko.luckperms.bukkit.vault;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
|
import com.google.common.base.Strings;
|
||||||
|
|
||||||
import me.lucko.luckperms.api.ChatMetaType;
|
import me.lucko.luckperms.api.ChatMetaType;
|
||||||
import me.lucko.luckperms.api.Contexts;
|
import me.lucko.luckperms.api.Contexts;
|
||||||
@ -94,7 +95,7 @@ public class VaultChatHook extends AbstractVaultChat {
|
|||||||
if (log()) {
|
if (log()) {
|
||||||
logMsg("#getPlayerPrefix: %s - %s - %s", user.getFriendlyName(), contexts.getContexts().toMultimap(), ret);
|
logMsg("#getPlayerPrefix: %s - %s - %s", user.getFriendlyName(), contexts.getContexts().toMultimap(), ret);
|
||||||
}
|
}
|
||||||
return ret;
|
return Strings.nullToEmpty(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -110,7 +111,7 @@ public class VaultChatHook extends AbstractVaultChat {
|
|||||||
if (log()) {
|
if (log()) {
|
||||||
logMsg("#getPlayerSuffix: %s - %s - %s", user.getFriendlyName(), contexts.getContexts().toMultimap(), ret);
|
logMsg("#getPlayerSuffix: %s - %s - %s", user.getFriendlyName(), contexts.getContexts().toMultimap(), ret);
|
||||||
}
|
}
|
||||||
return ret;
|
return Strings.nullToEmpty(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -174,7 +175,7 @@ public class VaultChatHook extends AbstractVaultChat {
|
|||||||
if (log()) {
|
if (log()) {
|
||||||
logMsg("#getGroupPrefix: %s - %s - %s", group.getName(), contexts.getContexts().toMultimap(), ret);
|
logMsg("#getGroupPrefix: %s - %s - %s", group.getName(), contexts.getContexts().toMultimap(), ret);
|
||||||
}
|
}
|
||||||
return ret;
|
return Strings.nullToEmpty(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -190,7 +191,7 @@ public class VaultChatHook extends AbstractVaultChat {
|
|||||||
if (log()) {
|
if (log()) {
|
||||||
logMsg("#getGroupSuffix: %s - %s - %s", group.getName(), contexts.getContexts().toMultimap(), ret);
|
logMsg("#getGroupSuffix: %s - %s - %s", group.getName(), contexts.getContexts().toMultimap(), ret);
|
||||||
}
|
}
|
||||||
return ret;
|
return Strings.nullToEmpty(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user