Last active
July 4, 2018 20:27
-
-
Save phit/4242da3236e327248295a3b7747d7502 to your computer and use it in GitHub Desktop.
java.lang.IllegalArgumentException: timeout value is negative minecraft server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long maxTickTime = server.getMaxTickTime(); // value from server.properties | |
long i = this.server.getCurrentTime(); // starttime of current tick | |
long j = MinecraftServer.getCurrentTimeMillis(); // current time | |
Thread.sleep(i + maxTickTime - j); // error is thrown when the sleep time is negative | |
long cutoff = i + maxTickTime; // cutoff time for current tick | |
cutoff - j // if this result < 0 then somehow a tick took longer than the cutoff allowed but it wasnt killed, | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment