[ci skip] Add javadocs warnings about unsupported operations (#1250)

* Document possible blank spaces in the command of the CommandExecuteEvent

* Added Javadocs warning about unimplemented methods in Velocity

* Improved KickedFromServerEvent documentation

* Fixed `apiNote` javadoc generation
This commit is contained in:
Adrian
2024-02-23 14:11:42 -05:00
committed by GitHub
parent 7ca0689989
commit 409ab7b118
8 changed files with 152 additions and 44 deletions

View File

@@ -943,7 +943,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player,
}
@Override
public boolean sendPluginMessage(ChannelIdentifier identifier, byte[] data) {
public boolean sendPluginMessage(@NotNull ChannelIdentifier identifier, byte @NotNull [] data) {
Preconditions.checkNotNull(identifier, "identifier");
Preconditions.checkNotNull(data, "data");
PluginMessagePacket message = new PluginMessagePacket(identifier.getId(),
@@ -1099,12 +1099,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player,
}
@Override
public Collection<ResourcePackInfo> getAppliedResourcePacks() {
public @NotNull Collection<ResourcePackInfo> getAppliedResourcePacks() {
return this.resourcePackHandler.getAppliedResourcePacks();
}
@Override
public Collection<ResourcePackInfo> getPendingResourcePacks() {
public @NotNull Collection<ResourcePackInfo> getPendingResourcePacks() {
return this.resourcePackHandler.getPendingResourcePacks();
}

View File

@@ -34,7 +34,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.NotNull;
/**
* Legacy (Minecraft <1.17) ResourcePackHandler.
* Legacy (Minecraft &lt;1.17) ResourcePackHandler.
*/
public sealed class LegacyResourcePackHandler extends ResourcePackHandler
permits Legacy117ResourcePackHandler {

View File

@@ -117,27 +117,27 @@ public abstract sealed class ResourcePackHandler
/**
* Processes a client response to a sent resource-pack.
* <ul>
* <p>Cases in which no action will be taken:</p>
* <ul>
*
* <br><li><b>DOWNLOADED</b>
* <li><b>DOWNLOADED</b>
* <p>In this case the resource pack is downloaded and will be applied to the client,
* no action is required in Velocity.</p>
*
* <br><li><b>INVALID_URL</b>
* <li><b>INVALID_URL</b>
* <p>In this case, the client has received a resource pack request
* and the first check it performs is if the URL is valid, if not,
* it will return this value</p>
*
* <br><li><b>FAILED_RELOAD</b>
* <li><b>FAILED_RELOAD</b>
* <p>In this case, when trying to reload the client's resources,
* an error occurred while reloading a resource pack</p>
* </ul>
*
* <br><li><b>DECLINED</b>
* <li><b>DECLINED</b>
* <p>Only in modern versions, as the resource pack has already been rejected,
* there is nothing to do, if the resource pack is required,
* the client will be kicked out of the server.</p>
* </ul>
*
* @param bundle the resource pack response bundle
*/

View File

@@ -46,7 +46,7 @@ public class PlayPacketQueueHandler extends ChannelDuplexHandler {
private final Queue<MinecraftPacket> queue = PlatformDependent.newMpscQueue();
/**
* Provides registries for client & server bound packets.
* Provides registries for client &amp; server bound packets.
*
* @param version the protocol version
*/