Return null if user/player is null

Relates to https://github.com/BentoBoxWorld/Level/issues/86
This commit is contained in:
tastybento 2019-09-20 11:58:33 -07:00
parent ad33d7fc9d
commit c5c5731ce3

View File

@ -43,8 +43,7 @@ abstract class BasicPlaceholderExpansion extends PlaceholderExpansion {
@Override @Override
public String onPlaceholderRequest(Player p, String placeholder) { public String onPlaceholderRequest(Player p, String placeholder) {
User user = User.getInstance(p); User user = User.getInstance(p);
if (user != null && placeholders.containsKey(placeholder)) {
if (placeholders.containsKey(placeholder)) {
return placeholders.get(placeholder).onReplace(user); return placeholders.get(placeholder).onReplace(user);
} }
return null; return null;