public Inventory getLastInventory() {
   JsonConfig conf = getPlayerConfig();
   if (!conf.contains("lastinventory")) {
     return null;
   }
   return InventoryUtil.convertStringToInventory(
       conf.getString("lastinventory"), r.mes("inventoryOfflineTitle", "%Name", name));
 }
 public void updateLastInventory() {
   JsonConfig conf = getPlayerConfig();
   conf.set(
       "lastinventory", InventoryUtil.convertInventoryToString(getOnlinePlayer().getInventory()));
   conf.save();
 }