Fix more javadoc warnings

This commit is contained in:
ImMorpheus committed 2021-03-22 22:26:06 +01:00
1 parent 77b5cda328
commit 2bb3de1527
7 files changed
+12 -8

No files matched your search

@@ -2608,7 +2608,6 @@ public final class Keys {
*
* <p>Vanishing an {@link Entity} ridden by other entities (see
* {@link #PASSENGERS} will cause problems.</p>
* <p>
*/
public static final Key<Value<Boolean>> VANISH = Keys.key(ResourceKey.sponge("vanish"), TypeTokens.BOOLEAN_VALUE_TOKEN);
@@ -233,7 +233,7 @@ public interface ServerPlayer extends Player, Subject {
/**
* Gets the {@link WorldBorder} for this player, if present. If no border is
* set, an empty {@code Optional} is returned.
* set, {@link Optional#empty()} is returned.
*
* @return The {@code WorldBorder} of this player as an {@code Optional}, if
* present
@@ -42,7 +42,7 @@ public interface ChangeWorldBorderEvent extends Event, Cancellable {
/**
* Gets the border that was previously used as an {@link Optional}. There
* may be no border set for the target (especially, if it is a player), in
* which case, an empty {@code Optional} is returned.
* which case, {@link Optional#empty()} is returned.
*
* @return The border that was previously in use, if there was one.
*/
@@ -51,7 +51,7 @@ public interface ChangeWorldBorderEvent extends Event, Cancellable {
/**
* Gets the border that will be used as an {@link Optional}. For some
* targets, the border may be unset and therefore they may not always have a
* border. It is in these instances that an empty {@code Optional} is
* border. It is in these instances that {@link Optional#empty()} is
* returned.
*
* @return The border that will be in use, if there is one.
@@ -40,9 +40,8 @@ import java.util.function.BiFunction;
* randomization based on {@link ItemStackGenerator}s for populating
* {@link ItemStack}s and finally generating a {@link TradeOffer}.
* <p>
* <p>
* <strong>Can be directly implemented as a lambda as follows:</strong>
* <p><pre> {@code
* </p><pre> {@code
* final TradeOfferGenerator generator = (merchant, random) -> TradeOffer.builder()
* .firstBuyingItem(ItemStack.of(ItemTypes.EMERALD, 64))
* .sellingItem(ItemStack.builder()
@@ -85,6 +85,7 @@ public interface PacketDispatcher {
*
* @param player The player to send the packet to
* @param packet The packet to send
* @return A future which will complete when the operation has finished
*/
default CompletableFuture<Void> sendTo(final ServerPlayer player, final Packet packet) {
return this.sendTo(player.connection(), packet);
@@ -103,6 +104,7 @@ public interface PacketDispatcher {
* belongs to.</p>
*
* @param packet The packet to send
* @return A future which will complete when the operation has finished
* @throws IllegalStateException If the server connection isn't in the play phase
*/
default CompletableFuture<Void> sendToServer(final Packet packet) {
@@ -121,6 +123,7 @@ public interface PacketDispatcher {
*
* @param connection The connection to send the packet to
* @param packet The packet to send
* @return A future which will complete when the operation has finished
*/
CompletableFuture<Void> sendTo(EngineConnection connection, Packet packet);
}
@@ -143,6 +143,7 @@ public interface RawPlayDataChannel {
*
* @param player The player to send the message to
* @param payload A consumer to write the data to
* @return A future which will complete when the operation has finished
*/
default CompletableFuture<Void> sendTo(final ServerPlayer player, final Consumer<ChannelBuf> payload) {
return this.sendTo(player.connection(), payload);
@@ -154,6 +155,7 @@ public interface RawPlayDataChannel {
* from the client side.
*
* @param payload A consumer to write the data to
* @return A future which will complete when the operation has finished
*/
default CompletableFuture<Void> sendToServer(final Consumer<ChannelBuf> payload) {
final EngineConnection connection = Sponge.client().connection()
@@ -167,6 +169,7 @@ public interface RawPlayDataChannel {
*
* @param connection The client connection to send the message to
* @param payload A consumer to write the data to
* @return A future which will complete when the operation has finished
*/
CompletableFuture<Void> sendTo(EngineConnection connection, Consumer<ChannelBuf> payload);
}
@@ -227,7 +227,7 @@ public interface RayTrace<T extends Locatable> {
*
* <pre> {@code
* block -> {
* final BlockType type = block.getBlockState().getType();
* final BlockType type = block.blockState().type();
* return type == BlockTypes.AIR.get() ||
* type == BlockTypes.CAVE_AIR.get() ||
* type == BlockTypes.VOID_AIR.get();
@@ -267,7 +267,7 @@ public interface RayTrace<T extends Locatable> {
*
* <pre> {@code
* block -> {
* final BlockType type = block.getBlockState().getType();
* final BlockType type = block.blockState().type();
* return !(type == BlockTypes.AIR.get() &&
* type == BlockTypes.CAVE_AIR.get() &&
* type == BlockTypes.VOID_AIR.get());