Guest User

Untitled

a guest
Jun 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. diff --git a/world.py b/world.py
  2. index 131cfce..99728c1 100644
  3. --- a/world.py
  4. +++ b/world.py
  5. @@ -299,6 +299,11 @@ def get_worlds():
  6. "Returns {world # : level.dat information}"
  7. ret = {}
  8. save_dir = get_save_dir()
  9. +
  10. + # No dirs found - most likely not running from inside minecraft-dir
  11. + if save_dir is None:
  12. + return None
  13. +
  14. for dir in os.listdir(save_dir):
  15. if dir.startswith("World") and len(dir) == 6:
  16. world_n = int(dir[-1])
Add Comment
Please, Sign In to add comment