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