Skip to content

Commit

Permalink
Fix invalid javadoc for ProtocolTranslator#getPlayNetworkUserConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed May 20, 2024
1 parent 2e0018b commit 6b115b7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ public static void setTargetVersion(final ProtocolVersion newVersion, final bool
* Resets the previous version if it is set. Calling {@link #setTargetVersion(ProtocolVersion, boolean)} with revertOnDisconnect set to true will set it.
*/
public static void injectPreviousVersionReset(final Channel channel) {
if (previousVersion == null) return;

if (previousVersion == null) {
return;
}
channel.closeFuture().addListener(future -> {
setTargetVersion(previousVersion);
previousVersion = null;
Expand Down Expand Up @@ -229,8 +230,7 @@ public static UserConnection createDummyUserConnection(final ProtocolVersion cli
}

/**
* @return Returns the current UserConnection of the connection to the server, if the player isn't connected to a server it will return null
* @throws IllegalStateException If the player is not connected to a server
* @return the current UserConnection of the connection to the server, if the player isn't connected to a server it will return null
*/
public static UserConnection getPlayNetworkUserConnection() {
final ClientPlayNetworkHandler handler = MinecraftClient.getInstance().getNetworkHandler();
Expand Down

0 comments on commit 6b115b7

Please sign in to comment.