Package simpleserver.nbt

Examples of simpleserver.nbt.NBTCompound


  public void loadOldConfig() {
    LegacyStats old = new LegacyStats();
    old.load();
    for (String name : old.stats.keySet()) {
      Statistic oldStats = old.stats.get(name);
      NBTCompound tag = playerData.get(name);
      NBTCompound stats = new NBTCompound(STATS);
      stats.put(new NBTInt(StatField.PLAY_TIME.toString(), oldStats.minutes));
      stats.put(new NBTInt(StatField.BLOCKS_DESTROYED.toString(), oldStats.blocksDestroyed));
      stats.put(new NBTInt(StatField.BLOCKS_PLACED.toString(), oldStats.blocksPlaced));
      tag.put(stats);
    }
    old.save();
  }
View Full Code Here


    }
    return new Position(node.getCompound(name));
  }

  public void set(String name, Position pos) {
    NBTCompound tag = pos.tag();
    tag.rename(name.toLowerCase());
    tag.put(new NBTArray(CAPS, capitals(name)));
    node.put(tag);
  }
View Full Code Here

        return;
      } catch (Exception e) {
        System.out.println("[WARNING] Warp list is corrupt. Replacing it with empty list...");
      }
    }
    node = new NBTCompound(WARP);
    data.put(node);
  }
View Full Code Here

TOP

Related Classes of simpleserver.nbt.NBTCompound

Copyright © 2018 www.massapicom. 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.