Examples of NbtCompound


Examples of simpleserver.nbt.NBTCompound

      player.remove(HOME);
    }
  }

  public void set(String playerName, HomePoint homePoint) {
    NBTCompound player = playerData.get(playerName);
    player.put(homePoint.tag());
  }
View Full Code Here

Examples of simpleserver.nbt.NBTCompound

    public boolean getPlayerInvited(Player player) {
      return invites.contains(new NBTString(player.getName()));
    }

    public NBTCompound tag() {
      NBTCompound tag = position.tag();
      tag.rename(HOME);
      NBTByte publicValue = new NBTByte(PUBLIC, isPublic ? (byte) 1 : (byte) 0);
      tag.put(publicValue);
      tag.put(invites);
      return tag;
    }
View Full Code Here

Examples of simpleserver.nbt.NBTCompound

    tag.set(tag.get() + amount);
    return tag.get();
  }

  private NBTCompound getStats(String name) {
    NBTCompound player = playerData.get(name);
    if (player.containsKey(STATS)) {
      return player.getCompound(STATS);
    } else {
      NBTCompound tag = new NBTCompound(STATS);
      player.put(tag);
      return tag;
    }
  }
View Full Code Here

Examples of simpleserver.nbt.NBTCompound

    return hours;
  }

  private NBTInt getInt(String name, String key) {
    NBTCompound player = getStats(name);
    if (player.containsKey(key)) {
      return player.getInt(key);
    } else {
      NBTInt tag = new NBTInt(key, 0);
      player.put(tag);
      return tag;
    }
  }
View Full Code Here

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

Examples of simpleserver.nbt.NBTCompound

    }
    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

Examples of simpleserver.nbt.NBTCompound

        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
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.