Skip to content

Commit

Permalink
refactor: add @NotNull annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Jun 13, 2024
1 parent f88143f commit 9f236d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,5 +471,5 @@ default void openBook(@NotNull Book book) {
* @since 3.3.0
* @sinceMinecraft 1.21
*/
void setServerLinks(List<ServerLink> links);
void setServerLinks(@NotNull List<ServerLink> links);
}
Original file line number Diff line number Diff line change
Expand Up @@ -1061,8 +1061,8 @@ public void requestCookie(final Key key) {
}

@Override
public void setServerLinks(List<ServerLink> links) {
Preconditions.checkNotNull(links);
public void setServerLinks(final @NotNull List<ServerLink> links) {
Preconditions.checkNotNull(links, "links");
Preconditions.checkArgument(
this.getProtocolVersion().noLessThan(ProtocolVersion.MINECRAFT_1_21),
"Player version must be at least 1.21 to be able to set server links");
Expand Down

0 comments on commit 9f236d7

Please sign in to comment.