added check to make sure sender is still online

This commit is contained in:
Vlammar 2021-02-07 12:36:26 +01:00
parent de0390c046
commit 54e30cc020
1 changed files with 3 additions and 2 deletions

View File

@ -120,8 +120,9 @@ public class DeleteCommand extends IoMCommand {
RawText msg = deleteMsg(getClass(), sender, map);
RawMessage.send(sender, msg);
} else {
MapManager.clear(sender.getInventory(), map);
if (sender != null && sender.isOnline() && sender.getInventory() != null) {
MapManager.clear(sender.getInventory(), map);
}
try {
MapManager.deleteMap(map);