From b6fc3ee978675769c0f2af3f07de6b2201ebae31 Mon Sep 17 00:00:00 2001 From: jglrxavpok Date: Sun, 20 Sep 2020 15:04:07 +0200 Subject: [PATCH] Publish with Javadoc & Sources --- build.gradle | 3 +++ src/main/java/net/minestom/server/UpdateManager.java | 2 +- src/main/java/net/minestom/server/chat/ChatParser.java | 2 +- src/main/java/net/minestom/server/chat/RichMessage.java | 2 +- src/main/java/net/minestom/server/command/CommandSender.java | 2 +- .../java/net/minestom/server/command/builder/Command.java | 2 +- src/main/java/net/minestom/server/data/SerializableData.java | 2 +- src/main/java/net/minestom/server/entity/LivingEntity.java | 2 +- .../server/entity/type/other/EntityAreaEffectCloud.java | 2 +- .../minestom/server/event/player/PlayerBlockBreakEvent.java | 2 +- .../server/event/player/PlayerChangeHeldSlotEvent.java | 2 +- src/main/java/net/minestom/server/instance/Chunk.java | 4 ++-- src/main/java/net/minestom/server/instance/DynamicChunk.java | 3 ++- .../java/net/minestom/server/instance/ExplosionSupplier.java | 2 +- src/main/java/net/minestom/server/instance/Instance.java | 2 +- .../java/net/minestom/server/instance/block/BlockManager.java | 4 ++-- src/main/java/net/minestom/server/inventory/Inventory.java | 4 ++-- src/main/java/net/minestom/server/item/ItemStack.java | 2 +- src/main/java/net/minestom/server/map/LargeFramebuffer.java | 2 +- src/main/java/net/minestom/server/map/MapColors.java | 2 +- src/main/java/net/minestom/server/reader/DataReader.java | 4 ++-- .../java/net/minestom/server/utils/binary/BinaryWriter.java | 2 +- .../net/minestom/server/utils/block/CustomBlockUtils.java | 4 ++-- 23 files changed, 31 insertions(+), 27 deletions(-) diff --git a/build.gradle b/build.gradle index 7ad511486..2136d00bd 100644 --- a/build.gradle +++ b/build.gradle @@ -74,6 +74,9 @@ java { withJavadocJar() withSourcesJar() } + + withJavadocJar() + withSourcesJar() } test { diff --git a/src/main/java/net/minestom/server/UpdateManager.java b/src/main/java/net/minestom/server/UpdateManager.java index 1af893cce..af9bc6fc3 100644 --- a/src/main/java/net/minestom/server/UpdateManager.java +++ b/src/main/java/net/minestom/server/UpdateManager.java @@ -125,7 +125,7 @@ public final class UpdateManager { * Change the server thread provider * * @param threadProvider the new thread provider - * @throws NullPointerException if {@param threadProvider} is null + * @throws NullPointerException if threadProvider is null */ public synchronized void setThreadProvider(ThreadProvider threadProvider) { Check.notNull(threadProvider, "The thread provider cannot be null"); diff --git a/src/main/java/net/minestom/server/chat/ChatParser.java b/src/main/java/net/minestom/server/chat/ChatParser.java index 181fd2668..daf317d19 100644 --- a/src/main/java/net/minestom/server/chat/ChatParser.java +++ b/src/main/java/net/minestom/server/chat/ChatParser.java @@ -16,7 +16,7 @@ public class ChatParser { /** * Convert a simple colored message json (text/color) to a {@link ColoredText} * - * @param json the json containing the text & color + * @param json the json containing the text and color * @return a {@link ColoredText} representing the text */ public static ColoredText toColoredText(String json) { diff --git a/src/main/java/net/minestom/server/chat/RichMessage.java b/src/main/java/net/minestom/server/chat/RichMessage.java index 222ff29ac..62695d2c8 100644 --- a/src/main/java/net/minestom/server/chat/RichMessage.java +++ b/src/main/java/net/minestom/server/chat/RichMessage.java @@ -9,7 +9,7 @@ import java.util.List; /** * Represent multiple {@link ColoredText} batched together with the possibility to add - * click & hover events + * click and hover events */ public class RichMessage { diff --git a/src/main/java/net/minestom/server/command/CommandSender.java b/src/main/java/net/minestom/server/command/CommandSender.java index 6ca2ec5fd..c48362b4c 100644 --- a/src/main/java/net/minestom/server/command/CommandSender.java +++ b/src/main/java/net/minestom/server/command/CommandSender.java @@ -55,7 +55,7 @@ public interface CommandSender { /** * Checks if the given permission is possessed by this command sender. - * Simple shortcut to
getAllPermissions().contains(permission) && permission.isValidFor(this)
for readability. + * Simple shortcut to
getAllPermissions().contains(permission) && permission.isValidFor(this)
for readability. * @param p permission to check against * @return */ diff --git a/src/main/java/net/minestom/server/command/builder/Command.java b/src/main/java/net/minestom/server/command/builder/Command.java index 06967333f..8d31108e8 100644 --- a/src/main/java/net/minestom/server/command/builder/Command.java +++ b/src/main/java/net/minestom/server/command/builder/Command.java @@ -128,7 +128,7 @@ public class Command { /** * Allow for tab auto completion, this is called everytime the player press a key in the chat - * when in a dynamic argument ({@link ArgumentDynamicWord} & {@link ArgumentDynamicStringArray}) + * when in a dynamic argument ({@link ArgumentDynamicWord} and {@link ArgumentDynamicStringArray}) * * @param text the whole player text * @return the array containing all the suggestion for the current arg (split " ") diff --git a/src/main/java/net/minestom/server/data/SerializableData.java b/src/main/java/net/minestom/server/data/SerializableData.java index 050831da1..581040f41 100644 --- a/src/main/java/net/minestom/server/data/SerializableData.java +++ b/src/main/java/net/minestom/server/data/SerializableData.java @@ -40,7 +40,7 @@ public interface SerializableData extends Data { byte[] getIndexedSerializedData(); /** - * Get the index info (class name -> class index) + * Get the index info (class name -> class index) *

* Sized by a var-int * diff --git a/src/main/java/net/minestom/server/entity/LivingEntity.java b/src/main/java/net/minestom/server/entity/LivingEntity.java index 790152ae0..0950a9bc6 100644 --- a/src/main/java/net/minestom/server/entity/LivingEntity.java +++ b/src/main/java/net/minestom/server/entity/LivingEntity.java @@ -327,7 +327,7 @@ public abstract class LivingEntity extends Entity implements EquipmentHandler { } /** - * Change the entity health, kill it if {@code health} is <= 0 and is not dead yet + * Change the entity health, kill it if {@code health} is >= 0 and is not dead yet * * @param health the new entity health */ diff --git a/src/main/java/net/minestom/server/entity/type/other/EntityAreaEffectCloud.java b/src/main/java/net/minestom/server/entity/type/other/EntityAreaEffectCloud.java index 9cda4b0b6..7c8da9101 100644 --- a/src/main/java/net/minestom/server/entity/type/other/EntityAreaEffectCloud.java +++ b/src/main/java/net/minestom/server/entity/type/other/EntityAreaEffectCloud.java @@ -110,7 +110,7 @@ public class EntityAreaEffectCloud extends ObjectEntity { * Used to add data to the particle * * @param particleDataConsumer the particle data consumer - * @see @see Particle data + * @see Particle data */ public void setParticleDataConsumer(Consumer particleDataConsumer) { this.particleDataConsumer = particleDataConsumer; diff --git a/src/main/java/net/minestom/server/event/player/PlayerBlockBreakEvent.java b/src/main/java/net/minestom/server/event/player/PlayerBlockBreakEvent.java index a2d2e2183..0795566a0 100644 --- a/src/main/java/net/minestom/server/event/player/PlayerBlockBreakEvent.java +++ b/src/main/java/net/minestom/server/event/player/PlayerBlockBreakEvent.java @@ -91,7 +91,7 @@ public class PlayerBlockBreakEvent extends CancellableEvent { * Get the custom block id result, which will be placed after the event *

* Warning: the visual block will not be changed, be sure to call {@link #setResultBlockId(short)} - * if you want the visual to be the same as {@link CustomBlock#getBlockStateId()} + * if you want the visual to be the same as {@link CustomBlock#getDefaultBlockStateId()} ()} ()} * * @return the custom block id that will be set at {@link #getBlockPosition()} * set to 0 to remove diff --git a/src/main/java/net/minestom/server/event/player/PlayerChangeHeldSlotEvent.java b/src/main/java/net/minestom/server/event/player/PlayerChangeHeldSlotEvent.java index 2aa0d80bc..896267b0b 100644 --- a/src/main/java/net/minestom/server/event/player/PlayerChangeHeldSlotEvent.java +++ b/src/main/java/net/minestom/server/event/player/PlayerChangeHeldSlotEvent.java @@ -40,7 +40,7 @@ public class PlayerChangeHeldSlotEvent extends CancellableEvent { * Change the final held slot of the player * * @param slot the new held slot - * @throws IllegalArgumentException if {@param slot} is not between 0 and 8 + * @throws IllegalArgumentException if slot is not between 0 and 8 */ public void setSlot(byte slot) { Check.argCondition(!MathUtils.isBetween(slot, 0, 8), "The held slot needs to be between 0 and 8"); diff --git a/src/main/java/net/minestom/server/instance/Chunk.java b/src/main/java/net/minestom/server/instance/Chunk.java index 581df4e08..7af168410 100644 --- a/src/main/java/net/minestom/server/instance/Chunk.java +++ b/src/main/java/net/minestom/server/instance/Chunk.java @@ -81,7 +81,7 @@ public abstract class Chunk implements Viewable { *

* This is used when the previous block has to be destroyed, meaning that it clears the previous data and update method *

- * WARNING: this method is not thread-safe (in order to bring performance improvement with {@link ChunkBatch} & {@link BlockBatch}) + * WARNING: this method is not thread-safe (in order to bring performance improvement with {@link ChunkBatch} & {@link BlockBatch}) * The thread-safe version is {@link InstanceContainer#setSeparateBlocks(int, int, int, short, short, Data)} (or any similar instance methods) * Otherwise, you can simply do not forget to have this chunk synchronized when this is called * @@ -92,7 +92,7 @@ public abstract class Chunk implements Viewable { * @param customBlockId the custom block id * @param data the data of the block, can be null * @param updatable true if the block has an update method - * Warning: {@param customBlockId} cannot be 0 and needs to be valid since the update delay and method + * Warning: customBlockId cannot be 0 and needs to be valid since the update delay and method * will be retrieved from the associated {@link CustomBlock} object */ public abstract void setBlock(int x, int y, int z, short blockStateId, short customBlockId, Data data, boolean updatable); diff --git a/src/main/java/net/minestom/server/instance/DynamicChunk.java b/src/main/java/net/minestom/server/instance/DynamicChunk.java index 8c369d15e..03d0f863a 100644 --- a/src/main/java/net/minestom/server/instance/DynamicChunk.java +++ b/src/main/java/net/minestom/server/instance/DynamicChunk.java @@ -11,6 +11,7 @@ import net.minestom.server.network.packet.server.play.ChunkDataPacket; import net.minestom.server.reader.ChunkReader; import net.minestom.server.utils.MathUtils; import net.minestom.server.utils.binary.BinaryWriter; +import net.minestom.server.utils.chunk.ChunkCallback; import net.minestom.server.world.biomes.Biome; import java.util.concurrent.CopyOnWriteArraySet; @@ -129,7 +130,7 @@ public class DynamicChunk extends Chunk { } /** - * Serialize this {@link Chunk} based on {@link ChunkReader#readChunk(byte[], Instance, int, int, Consumer)} + * Serialize this {@link Chunk} based on {@link ChunkReader#readChunk(byte[], Instance, int, int, ChunkCallback)} *

* It is also used by the default {@link IChunkLoader} which is {@link MinestomBasicChunkLoader} * diff --git a/src/main/java/net/minestom/server/instance/ExplosionSupplier.java b/src/main/java/net/minestom/server/instance/ExplosionSupplier.java index a3d5b3ae3..5c2692cd0 100644 --- a/src/main/java/net/minestom/server/instance/ExplosionSupplier.java +++ b/src/main/java/net/minestom/server/instance/ExplosionSupplier.java @@ -12,7 +12,7 @@ public interface ExplosionSupplier { * @param centerY center Y of the explosion * @param centerZ center Z of the explosion * @param strength strength of the explosion - * @param additionalData data passed via {@link Instance#explode)}. Can be null + * @param additionalData data passed via {@link Instance#explode(float, float, float, float, Data)} )}. Can be null * @return Explosion object representing the algorithm to use */ Explosion createExplosion(float centerX, float centerY, float centerZ, float strength, Data additionalData); diff --git a/src/main/java/net/minestom/server/instance/Instance.java b/src/main/java/net/minestom/server/instance/Instance.java index 9e572f267..7d2a467f2 100644 --- a/src/main/java/net/minestom/server/instance/Instance.java +++ b/src/main/java/net/minestom/server/instance/Instance.java @@ -592,7 +592,7 @@ public abstract class Instance implements BlockModifier, EventHandler, DataConta * @param blockPosition * @param actionId * @param actionParam - * @see Packet information for the action id & param + * @see Packet information for the action id & param */ public void sendBlockAction(BlockPosition blockPosition, byte actionId, byte actionParam) { final short blockStateId = getBlockStateId(blockPosition); diff --git a/src/main/java/net/minestom/server/instance/block/BlockManager.java b/src/main/java/net/minestom/server/instance/block/BlockManager.java index f0d5871e9..f6f0b1e95 100644 --- a/src/main/java/net/minestom/server/instance/block/BlockManager.java +++ b/src/main/java/net/minestom/server/instance/block/BlockManager.java @@ -19,7 +19,7 @@ public class BlockManager { * Register a {@link CustomBlock} * * @param customBlock the custom block to register - * @throws IllegalArgumentException if {@param customBlock} block id is negative + * @throws IllegalArgumentException if customBlock block id is negative */ public void registerCustomBlock(CustomBlock customBlock) { final short id = customBlock.getCustomBlockId(); @@ -33,7 +33,7 @@ public class BlockManager { * Register a {@link BlockPlacementRule} * * @param blockPlacementRule the block placement rule to register - * @throws IllegalArgumentException if {@param blockPlacementRule} block id is negative + * @throws IllegalArgumentException if blockPlacementRule block id is negative */ public void registerBlockPlacementRule(BlockPlacementRule blockPlacementRule) { final short id = blockPlacementRule.getBlockId(); diff --git a/src/main/java/net/minestom/server/inventory/Inventory.java b/src/main/java/net/minestom/server/inventory/Inventory.java index 695f05489..9688323e2 100644 --- a/src/main/java/net/minestom/server/inventory/Inventory.java +++ b/src/main/java/net/minestom/server/inventory/Inventory.java @@ -244,7 +244,7 @@ public class Inventory implements InventoryModifier, InventoryClickHandler, View /** * Change the cursor item of a viewer, - * does nothing if {@param player} is not a viewer + * does nothing if player is not a viewer * * @param player the player to change the cursor item * @param cursorItem the new player cursor item @@ -313,7 +313,7 @@ public class Inventory implements InventoryModifier, InventoryClickHandler, View * * @param property the property to send * @param value the value of the property - * @see https://wiki.vg/Protocol#Window_Property */ protected void sendProperty(InventoryProperty property, short value) { WindowPropertyPacket windowPropertyPacket = new WindowPropertyPacket(); diff --git a/src/main/java/net/minestom/server/item/ItemStack.java b/src/main/java/net/minestom/server/item/ItemStack.java index b1fa6a702..1957b6f94 100644 --- a/src/main/java/net/minestom/server/item/ItemStack.java +++ b/src/main/java/net/minestom/server/item/ItemStack.java @@ -626,7 +626,7 @@ public class ItemStack implements DataContainer { * * @param player the player * @return the custom {@link ItemDisplay} for {@code player}, - * null to use the normal item display name & lore + * null to use the normal item display name & lore */ public ItemDisplay getCustomDisplay(Player player) { throw new UnsupportedOperationException("Not implemented yet"); diff --git a/src/main/java/net/minestom/server/map/LargeFramebuffer.java b/src/main/java/net/minestom/server/map/LargeFramebuffer.java index 4e7b73294..5c946b5c8 100644 --- a/src/main/java/net/minestom/server/map/LargeFramebuffer.java +++ b/src/main/java/net/minestom/server/map/LargeFramebuffer.java @@ -12,7 +12,7 @@ public interface LargeFramebuffer { /** * Returns a new Framebuffer that represent a 128x128 sub-view of this framebuffer. - * Implementations are free (but not guaranteed) to throw exceptions if left & top produces out-of-bounds coordinates. + * Implementations are free (but not guaranteed) to throw exceptions if left & top produces out-of-bounds coordinates. * @param left * @param top * @return diff --git a/src/main/java/net/minestom/server/map/MapColors.java b/src/main/java/net/minestom/server/map/MapColors.java index 4c9083e37..fbfb09e21 100644 --- a/src/main/java/net/minestom/server/map/MapColors.java +++ b/src/main/java/net/minestom/server/map/MapColors.java @@ -332,7 +332,7 @@ public enum MapColors { } /** - * How does Minestom compute RGB->MapColor transitions? + * How does Minestom compute RGB to MapColor transitions? */ public enum ColorMappingStrategy { /** diff --git a/src/main/java/net/minestom/server/reader/DataReader.java b/src/main/java/net/minestom/server/reader/DataReader.java index 99bbcbd9e..914b7a8a8 100644 --- a/src/main/java/net/minestom/server/reader/DataReader.java +++ b/src/main/java/net/minestom/server/reader/DataReader.java @@ -29,7 +29,7 @@ public class DataReader { *

* WARNING: the {@link DataManager} needs to have all the required types as the {@link SerializableData} has * - * @param typeToIndexMap the map which index all the type contained in the data (className->classIndex) + * @param typeToIndexMap the map which index all the type contained in the data (className->classIndex) * @param reader the reader * @return a {@link SerializableData} based on the data input */ @@ -92,7 +92,7 @@ public class DataReader { } /** - * Get a map containing the indexes of your data (type name -> type index) + * Get a map containing the indexes of your data (type name -> type index) * * @param binaryReader the reader * @return a map containing the indexes of your data diff --git a/src/main/java/net/minestom/server/utils/binary/BinaryWriter.java b/src/main/java/net/minestom/server/utils/binary/BinaryWriter.java index d78c480f0..85702efd1 100644 --- a/src/main/java/net/minestom/server/utils/binary/BinaryWriter.java +++ b/src/main/java/net/minestom/server/utils/binary/BinaryWriter.java @@ -214,7 +214,7 @@ public class BinaryWriter extends OutputStream { /** * Write an {@link UUID} - * It is done by writing both long, the most & least significant bits + * It is done by writing both long, the most and least significant bits * * @param uuid the {@link UUID} to write */ diff --git a/src/main/java/net/minestom/server/utils/block/CustomBlockUtils.java b/src/main/java/net/minestom/server/utils/block/CustomBlockUtils.java index 5dfeb2a30..12352375c 100644 --- a/src/main/java/net/minestom/server/utils/block/CustomBlockUtils.java +++ b/src/main/java/net/minestom/server/utils/block/CustomBlockUtils.java @@ -12,7 +12,7 @@ public class CustomBlockUtils { * Get if a custom block id has an update method * * @param customBlockId the custom block id - * @return true if {@param customBlockId} has an update method + * @return true if customBlockId has an update method */ public static boolean hasUpdate(short customBlockId) { final CustomBlock customBlock = BLOCK_MANAGER.getCustomBlock(customBlockId); @@ -23,7 +23,7 @@ public class CustomBlockUtils { * Get if a {@link CustomBlock} has an update method * * @param customBlock the {@link CustomBlock} - * @return true if {@param customBlock} has an update method + * @return true if customBlock has an update method */ public static boolean hasUpdate(CustomBlock customBlock) { return customBlock != null && customBlock.hasUpdate();