#1100 Check that auth exists for /email show
- This case should never happen, but better to be safe
This commit is contained in:
parent
6eaa91278e
commit
3c45ca8425
@ -24,7 +24,7 @@ public class ShowEmailCommand extends PlayerCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void runCommand(Player player, List<String> arguments) {
|
public void runCommand(Player player, List<String> arguments) {
|
||||||
PlayerAuth auth = playerCache.getAuth(player.getName());
|
PlayerAuth auth = playerCache.getAuth(player.getName());
|
||||||
if (auth.getEmail() != null && !"your@email.com".equalsIgnoreCase(auth.getEmail())) {
|
if (auth != null && auth.getEmail() != null && !"your@email.com".equalsIgnoreCase(auth.getEmail())) {
|
||||||
commonService.send(player, MessageKey.EMAIL_SHOW, auth.getEmail());
|
commonService.send(player, MessageKey.EMAIL_SHOW, auth.getEmail());
|
||||||
} else {
|
} else {
|
||||||
commonService.send(player, MessageKey.SHOW_NO_EMAIL);
|
commonService.send(player, MessageKey.SHOW_NO_EMAIL);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user