Fix null reference when you do /undo physics but your rank can't do it (Thanks goodlyay/Cheesse)

This commit is contained in:
UnknownShadow200 2017-01-31 11:00:17 +11:00
parent 0b9ec61ee1
commit d5361d4693

View File

@ -74,7 +74,7 @@ namespace MCGalaxy.Commands.Building {
}
void UndoPhysics(Player p, TimeSpan delta) {
if (!CheckExtraPerm(p, 1)) { MessageNeedExtra(p, 2); return; }
if (!CheckExtraPerm(p, 1)) { MessageNeedExtra(p, 1); return; }
if (p != null && !p.group.CanExecute("physics")) {
Player.Message(p, "You can only undo physics if you can use /physics."); return;
}