public Tag<?> getValue(String name, T value) { return new CompoundTag(name, value.save()); } }
public Tag<?> getValue(String name, T value) { return new CompoundTag(name, value.save()); } }
public Tag<?> getValue(String name, T value) { return new CompoundTag(name, value.save()); } }
public CompoundTag clone() { CompoundMap map = new CompoundMap(value); return new CompoundTag(getName(), map); } }
public CompoundTag clone() { CompoundMap map = new CompoundMap(value); return new CompoundTag(getName(), map); } }
public CompoundTag clone() { CompoundMap map = new CompoundMap(value); return new CompoundTag(getName(), map); } }
public void saveServers(ServerInfo[] servers) throws IOException { if(file.exists()) if(!file.delete()) throw new IOException("Could not overwrite '".concat(file.getAbsolutePath()).concat("'")); final FileOutputStream fos = new FileOutputStream(file); NBTOutputStream nbtOutputStream = new NBTOutputStream(fos, false); ArrayList<CompoundTag> serversList = new ArrayList<CompoundTag>(); for(ServerInfo server : servers){ serversList.add(new CompoundTag("", createCompoundFromServer(server))); } ListTag<CompoundTag> listTag = new ListTag<CompoundTag>("servers", CompoundTag.class, serversList); CompoundTag root = new CompoundTag("", new CompoundMap()); root.getValue().put("servers", listTag); nbtOutputStream.writeTag(root); nbtOutputStream.flush(); fos.flush(); nbtOutputStream.close(); fos.close(); } }
public void save(OutputStream stream, boolean compressed) throws IOException { NBTOutputStream os = new NBTOutputStream(stream, compressed); os.writeTag(new CompoundTag("", save())); }
public void save(OutputStream stream, boolean compressed) throws IOException { NBTOutputStream os = new NBTOutputStream(stream, compressed); os.writeTag(new CompoundTag("", save())); }
public void save(OutputStream stream, boolean compressed) throws IOException { NBTOutputStream os = new NBTOutputStream(stream, compressed); os.writeTag(new CompoundTag("", save())); }
@Before public void setUp() { subject = new ExampleHolder(); CompoundMap map = new CompoundMap(); map.put(new StringTag("name", "helloworld")); CompoundTag mapTag = new CompoundTag("", map); subject.load(mapTag); }
return new CompoundTag(name, compoundTagList);
return new CompoundTag(name, compoundTagList);
return new CompoundTag(name, compoundTagList);