Package simpleserver.nbt

Examples of simpleserver.nbt.NBTCompound.containsKey()


  }

  public void getVisitableHomes(String playerName, List<String> invitedHomes, List<String> publicHomes) {
    for (String name : playerData.names()) {
      NBTCompound player = playerData.get(name);
      if (player.containsKey(HOME)) {
        HomePoint home = new HomePoint(player.getCompound(HOME));
        if (home.isPublic) {
          publicHomes.add(name);
        } else if (home.invites.contains(new NBTString(playerName)) || name.equals(playerName.toLowerCase())) {
          invitedHomes.add(name);
View Full Code Here


    }
  }

  public void remove(String playerName) {
    NBTCompound player = playerData.get(playerName);
    if (player.containsKey(HOME)) {
      player.remove(HOME);
    }
  }

  public void set(String playerName, HomePoint homePoint) {
View Full Code Here

    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

    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

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.