Examples of ItemMap


Examples of org.getspout.spoutapi.inventory.ItemMap

    for (File worldFolder : Bukkit.getWorldContainer().listFiles()) {
      if ((new File(worldFolder, "spout_meta/worldItemMap.txt")).exists()) {
        World world = Bukkit.getWorld(worldFolder.getName());
        if (world != null) {
          ItemMap worldItemMap = SpoutManager.getChunkDataManager().getItemMap(world);
          if (worldItemMap != null) {
            worldItemMap.rename(fullOldKey, fullNewKey);
            continue;
          }
        }
        FlatFileStore<Integer> fs = new FlatFileStore<Integer>(new File(worldFolder, "spout_meta/worldItemMap.txt"), Integer.class);
        fs.load();
        ItemMap worldItemMap = new ItemMap(ItemMap.getRootMap(), fs, null);
        worldItemMap.rename(fullOldKey, fullNewKey);
      }
    }
  }
View Full Code Here

Examples of org.getspout.spoutapi.inventory.ItemMap

    itemMapConfig = new FlatFileStore<Integer>(new File(this.getDataFolder(), "itemMap.txt"), Integer.class);
    if (!itemMapConfig.load()) {
      System.out.println("[SpoutPlugin] Unable to load global item map");
    } else {
      serverItemMap = new ItemMap(null, itemMapConfig, null);
    }
    ItemMap.setRootMap(serverItemMap);

    if (ConfigReader.runDeadlockMonitor()) {
      new DeadlockMonitor().start();
View Full Code Here

Examples of org.getspout.spoutapi.inventory.ItemMap

    return md;
  }

  private ItemMap getWorldItemMap(World world) {
    UUID uid = world.getUID();
    ItemMap worldItemMap = worldItemMaps.get(uid);
    if (worldItemMap == null) {
      File dir = new File(world.getWorldFolder(), "spout_meta");
      dir.mkdirs();

      FlatFileStore<Integer> fs = new FlatFileStore<Integer>(new File(dir, "worldItemMap.txt"), Integer.class);
      fs.load();
      worldItemMap = new ItemMap(ItemMap.getRootMap(), fs, null);
    }
    worldItemMaps.put(uid, worldItemMap);
    return worldItemMap;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.