mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 22:26:46 +01:00
null check on player debug command
This commit is contained in:
parent
db70d56493
commit
27b1c6b094
@ -22,6 +22,10 @@ public class PlayerDebugCommand extends BaseCommand {
|
||||
public void onCommand(CommandSender sender) {
|
||||
if(sender instanceof Player) {
|
||||
McMMOPlayer mcMMOPlayer = plugin.getUserManager().getPlayer((Player) sender);
|
||||
|
||||
if(mcMMOPlayer == null)
|
||||
return;
|
||||
|
||||
mcMMOPlayer.toggleDebugMode(); //Toggle debug mode
|
||||
plugin.getNotificationManager().sendPlayerInformationChatOnlyPrefixed(mcMMOPlayer.getPlayer(), "Commands.Mmodebug.Toggle", String.valueOf(mcMMOPlayer.isDebugMode()));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user