mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 11:15:24 +01:00
Return null if user/player is null
Relates to https://github.com/BentoBoxWorld/Level/issues/86
This commit is contained in:
parent
ad33d7fc9d
commit
c5c5731ce3
@ -43,8 +43,7 @@ abstract class BasicPlaceholderExpansion extends PlaceholderExpansion {
|
||||
@Override
|
||||
public String onPlaceholderRequest(Player p, String placeholder) {
|
||||
User user = User.getInstance(p);
|
||||
|
||||
if (placeholders.containsKey(placeholder)) {
|
||||
if (user != null && placeholders.containsKey(placeholder)) {
|
||||
return placeholders.get(placeholder).onReplace(user);
|
||||
}
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user