11/*
2- * Copyright (c) 2019-2022 GeyserMC. http://geysermc.org
2+ * Copyright (c) 2019-2026 GeyserMC. http://geysermc.org
33 *
44 * Permission is hereby granted, free of charge, to any person obtaining a copy
55 * of this software and associated documentation files (the "Software"), to deal
2626package org .geysermc .api ;
2727
2828import org .checkerframework .checker .nullness .qual .MonotonicNonNull ;
29- import org .checkerframework .checker .nullness .qual .NonNull ;
30- import org .checkerframework .checker .nullness .qual .Nullable ;
3129import org .checkerframework .common .value .qual .IntRange ;
3230import org .geysermc .api .connection .Connection ;
3331import org .geysermc .api .util .ApiVersion ;
3432import org .geysermc .cumulus .form .Form ;
3533import org .geysermc .cumulus .form .util .FormBuilder ;
34+ import org .jspecify .annotations .Nullable ;
3635
3736import java .util .List ;
3837import java .util .UUID ;
@@ -48,25 +47,23 @@ public interface GeyserApiBase {
4847 * @param uuid the UUID of the connection
4948 * @return the connection from the given UUID, if applicable
5049 */
51- @ Nullable
52- Connection connectionByUuid (@ NonNull UUID uuid );
50+ @ Nullable Connection connectionByUuid (UUID uuid );
5351
5452 /**
5553 * Gets the connection from the given XUID, if applicable. This method only works for online connections.
5654 *
5755 * @param xuid the XUID of the session
5856 * @return the connection from the given UUID, if applicable
5957 */
60- @ Nullable
61- Connection connectionByXuid (@ NonNull String xuid );
58+ @ Nullable Connection connectionByXuid (String xuid );
6259
6360 /**
6461 * Method to determine if the given <b>online</b> player is a Bedrock player.
6562 *
6663 * @param uuid the uuid of the online player
6764 * @return true if the given online player is a Bedrock player
6865 */
69- boolean isBedrockPlayer (@ NonNull UUID uuid );
66+ boolean isBedrockPlayer (UUID uuid );
7067
7168 /**
7269 * Sends a form to the given connection and opens it.
@@ -75,7 +72,7 @@ public interface GeyserApiBase {
7572 * @param form the form to send
7673 * @return whether the form was successfully sent
7774 */
78- boolean sendForm (@ NonNull UUID uuid , @ NonNull Form form );
75+ boolean sendForm (UUID uuid , Form form );
7976
8077 /**
8178 * Sends a form to the given connection and opens it.
@@ -84,7 +81,7 @@ public interface GeyserApiBase {
8481 * @param formBuilder the formBuilder to send
8582 * @return whether the form was successfully sent
8683 */
87- boolean sendForm (@ NonNull UUID uuid , @ NonNull FormBuilder <?, ?, ?> formBuilder );
84+ boolean sendForm (UUID uuid , FormBuilder <?, ?, ?> formBuilder );
8885
8986 /**
9087 * Transfer the given connection to a server. A Bedrock player can successfully transfer to the same server they are
@@ -95,12 +92,11 @@ public interface GeyserApiBase {
9592 * @param port the port of the server
9693 * @return true if the transfer was a success
9794 */
98- boolean transfer (@ NonNull UUID uuid , @ NonNull String address , @ IntRange (from = 0 , to = 65535 ) int port );
95+ boolean transfer (UUID uuid , String address , @ IntRange (from = 0 , to = 65535 ) int port );
9996
10097 /**
10198 * Returns all the online connections.
10299 */
103- @ NonNull
104100 List <? extends Connection > onlineConnections ();
105101
106102 /**
0 commit comments