Merge pull request #179 from Project-Cepi/remove-player-init

Add removePlayerInitialization function
This commit is contained in:
TheMode 2021-03-23 14:04:26 +01:00 committed by GitHub
commit 14af9a1b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,6 +302,17 @@ public final class ConnectionManager {
this.playerInitializations.add(playerInitialization);
}
/**
* Removes an existing player initialization consumer.
* <p>
* Removal of player initializations should be done by reference, and not cloning.
*
* @param playerInitialization the {@link Player} initialization consumer
*/
public void removePlayerInitialization(@NotNull Consumer<Player> playerInitialization) {
this.playerInitializations.remove(playerInitialization);
}
/**
* Gets the kick reason when the server is shutdown using {@link MinecraftServer#stopCleanly()}.
*