Fix premature player kicks on shutdown
When the server is stopping, the default execution handler method will throw a RejectedExecutionException in order to prevent further execution, this causes us to lose the actual kick reason. To mitigate this, we'll use a seperate marked class in order to gracefully ignore these.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package io.papermc.paper.util;
|
||||
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
public class ServerStopRejectedExecutionException extends RejectedExecutionException {
|
||||
public ServerStopRejectedExecutionException() {
|
||||
}
|
||||
|
||||
public ServerStopRejectedExecutionException(final String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public ServerStopRejectedExecutionException(final String message, final Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public ServerStopRejectedExecutionException(final Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user