mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 13:15:28 +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
|
@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;
|
||||||
|
Loading…
Reference in New Issue
Block a user