Skip to content

Commit

Permalink
[PATCH] Add More Information to session.lock Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Luohuayu committed Sep 12, 2021
1 parent a807da5 commit 21b9704
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions patches/net/minecraft/world/storage/SaveHandler.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,33 @@
public SaveHandler(File p_i46648_1_, String saveDirectoryNameIn, boolean p_i46648_3_, DataFixer dataFixerIn)
{
this.dataFixer = dataFixerIn;
@@ -73,7 +79,7 @@
catch (IOException ioexception)
{
ioexception.printStackTrace();
- throw new RuntimeException("Failed to check session lock, aborting");
+ throw new RuntimeException("Failed to check session lock for world located at " + this.worldDirectory + ", aborting. Stop the server and delete the session.lock in this world to prevent further issues."); // Spigot
}
}

@@ -93,7 +99,7 @@
{
if (datainputstream.readLong() != this.initializationTime)
{
- throw new MinecraftException("The save is being accessed from another location, aborting");
+ throw new MinecraftException("The save for world located at " + this.worldDirectory + " is being accessed from another location, aborting"); // Spigot
}
}
finally
@@ -103,7 +109,7 @@
}
catch (IOException var7)
{
- throw new MinecraftException("Failed to check session lock, aborting");
+ throw new MinecraftException("Failed to check session lock for world located at " + this.worldDirectory + ", aborting. Stop the server and delete the session.lock in this world to prevent further issues."); // Spigot
}
}

@@ -119,7 +125,7 @@

if (file1.exists())
Expand Down

0 comments on commit 21b9704

Please sign in to comment.