Advertisement
Guest User

Untitled

a guest
Mar 17th, 2015
721
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. try {
  2. OutputStream os = new FileOutputStream(file.getAbsolutePath());
  3. NBTOutputStream n = new NBTOutputStream(os);
  4.  
  5. Tag tag = new StringTag("Data.LevelName", "test");
  6. n.writeTag(tag);
  7. n.close();
  8.  
  9. System.out.println("[World Reset] Successfully edited level.dat...");
  10. } catch (IOException e) {
  11. System.out.println("[World Reset] Failed to edit level.dat...")
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement