Package com.bergerkiller.bukkit.common.nbt

Examples of com.bergerkiller.bukkit.common.nbt.CommonTagCompound.writeTo()


        // Write the Last Pos/Rot to the official world file instead
        CommonTagCompound data = read(posFile, human);
        data.putListValues(DATA_TAG_LASTPOS, loc.getX(), loc.getY(), loc.getZ());
        data.putListValues(DATA_TAG_LASTROT, loc.getYaw(), loc.getPitch());
        data.writeTo(posFile);
      }

      // Save data to the destination file
      tagcompound.writeTo(destFile);
View Full Code Here


        // Update the world in the main file
        CommonTagCompound maincompound = read(mainFile, human);
        maincompound.put("Pos", tagcompound.get("Pos"));
        maincompound.put("Rotation", tagcompound.get("Rotation"));
        maincompound.putUUID("World", human.getWorld().getUID());
        maincompound.writeTo(mainFile);
      }
    } catch (Exception exception) {
      Bukkit.getLogger().warning("Failed to save player data for " + human.getName());
      exception.printStackTrace();
    }
View Full Code Here

      try {
      CommonTagCompound root = new CommonTagCompound();
      root.put("Data", data);
      FileOutputStream out = StreamUtil.createOutputStream(getDataFile());
      try {
        root.writeTo(out);
      } finally {
        out.close();
      }
      return true;
    } catch (IOException e) {
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.