示例#1
0
 @Override
 public void save(DataKey key) {
   key.removeKey("list");
   for (int i = 0; i < anchors.size(); i++)
     key.setString("list." + String.valueOf(i), anchors.get(i).stringValue());
 }
示例#2
0
 private void saveOrRemove(DataKey key, ItemStack item) {
   if (item != null) ItemStorage.saveItem(key, item);
   else {
     if (key.keyExists("")) key.removeKey("");
   }
 }