mirror of https://github.com/Minestom/Minestom.git
Publish with Javadoc & Sources
This commit is contained in:
parent
99c48c8ee1
commit
b6fc3ee978
|
@ -74,6 +74,9 @@ java {
|
||||||
withJavadocJar()
|
withJavadocJar()
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withJavadocJar()
|
||||||
|
withSourcesJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|
|
@ -125,7 +125,7 @@ public final class UpdateManager {
|
||||||
* Change the server thread provider
|
* Change the server thread provider
|
||||||
*
|
*
|
||||||
* @param threadProvider the new thread provider
|
* @param threadProvider the new thread provider
|
||||||
* @throws NullPointerException if {@param threadProvider} is null
|
* @throws NullPointerException if <code>threadProvider</code> is null
|
||||||
*/
|
*/
|
||||||
public synchronized void setThreadProvider(ThreadProvider threadProvider) {
|
public synchronized void setThreadProvider(ThreadProvider threadProvider) {
|
||||||
Check.notNull(threadProvider, "The thread provider cannot be null");
|
Check.notNull(threadProvider, "The thread provider cannot be null");
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class ChatParser {
|
||||||
/**
|
/**
|
||||||
* Convert a simple colored message json (text/color) to a {@link ColoredText}
|
* 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
|
* @return a {@link ColoredText} representing the text
|
||||||
*/
|
*/
|
||||||
public static ColoredText toColoredText(String json) {
|
public static ColoredText toColoredText(String json) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represent multiple {@link ColoredText} batched together with the possibility to add
|
* Represent multiple {@link ColoredText} batched together with the possibility to add
|
||||||
* click & hover events
|
* click and hover events
|
||||||
*/
|
*/
|
||||||
public class RichMessage {
|
public class RichMessage {
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ public interface CommandSender {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the given permission is possessed by this command sender.
|
* Checks if the given permission is possessed by this command sender.
|
||||||
* Simple shortcut to <pre>getAllPermissions().contains(permission) && permission.isValidFor(this)</pre> for readability.
|
* Simple shortcut to <pre>getAllPermissions().contains(permission) && permission.isValidFor(this)</pre> for readability.
|
||||||
* @param p permission to check against
|
* @param p permission to check against
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -128,7 +128,7 @@ public class Command {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow for tab auto completion, this is called everytime the player press a key in the chat
|
* 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
|
* @param text the whole player text
|
||||||
* @return the array containing all the suggestion for the current arg (split " ")
|
* @return the array containing all the suggestion for the current arg (split " ")
|
||||||
|
|
|
@ -40,7 +40,7 @@ public interface SerializableData extends Data {
|
||||||
byte[] getIndexedSerializedData();
|
byte[] getIndexedSerializedData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the index info (class name -> class index)
|
* Get the index info (class name -> class index)
|
||||||
* <p>
|
* <p>
|
||||||
* Sized by a var-int
|
* Sized by a var-int
|
||||||
*
|
*
|
||||||
|
|
|
@ -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
|
* @param health the new entity health
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class EntityAreaEffectCloud extends ObjectEntity {
|
||||||
* Used to add data to the particle
|
* Used to add data to the particle
|
||||||
*
|
*
|
||||||
* @param particleDataConsumer the particle data consumer
|
* @param particleDataConsumer the particle data consumer
|
||||||
* @see @see <a href="https://wiki.vg/Data_types#Particle">Particle data</a>
|
* @see <a href="https://wiki.vg/Data_types#Particle">Particle data</a>
|
||||||
*/
|
*/
|
||||||
public void setParticleDataConsumer(Consumer<BinaryWriter> particleDataConsumer) {
|
public void setParticleDataConsumer(Consumer<BinaryWriter> particleDataConsumer) {
|
||||||
this.particleDataConsumer = particleDataConsumer;
|
this.particleDataConsumer = particleDataConsumer;
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class PlayerBlockBreakEvent extends CancellableEvent {
|
||||||
* Get the custom block id result, which will be placed after the event
|
* Get the custom block id result, which will be placed after the event
|
||||||
* <p>
|
* <p>
|
||||||
* Warning: the visual block will not be changed, be sure to call {@link #setResultBlockId(short)}
|
* 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()}
|
* @return the custom block id that will be set at {@link #getBlockPosition()}
|
||||||
* set to 0 to remove
|
* set to 0 to remove
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class PlayerChangeHeldSlotEvent extends CancellableEvent {
|
||||||
* Change the final held slot of the player
|
* Change the final held slot of the player
|
||||||
*
|
*
|
||||||
* @param slot the new held slot
|
* @param slot the new held slot
|
||||||
* @throws IllegalArgumentException if {@param slot} is not between 0 and 8
|
* @throws IllegalArgumentException if <code>slot</code> is not between 0 and 8
|
||||||
*/
|
*/
|
||||||
public void setSlot(byte slot) {
|
public void setSlot(byte slot) {
|
||||||
Check.argCondition(!MathUtils.isBetween(slot, 0, 8), "The held slot needs to be between 0 and 8");
|
Check.argCondition(!MathUtils.isBetween(slot, 0, 8), "The held slot needs to be between 0 and 8");
|
||||||
|
|
|
@ -81,7 +81,7 @@ public abstract class Chunk implements Viewable {
|
||||||
* <p>
|
* <p>
|
||||||
* This is used when the previous block has to be destroyed, meaning that it clears the previous data and update method
|
* This is used when the previous block has to be destroyed, meaning that it clears the previous data and update method
|
||||||
* <p>
|
* <p>
|
||||||
* 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)
|
* 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
|
* 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 customBlockId the custom block id
|
||||||
* @param data the data of the block, can be null
|
* @param data the data of the block, can be null
|
||||||
* @param updatable true if the block has an update method
|
* @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: <code>customBlockId</code> cannot be 0 and needs to be valid since the update delay and method
|
||||||
* will be retrieved from the associated {@link CustomBlock} object
|
* 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);
|
public abstract void setBlock(int x, int y, int z, short blockStateId, short customBlockId, Data data, boolean updatable);
|
||||||
|
|
|
@ -11,6 +11,7 @@ import net.minestom.server.network.packet.server.play.ChunkDataPacket;
|
||||||
import net.minestom.server.reader.ChunkReader;
|
import net.minestom.server.reader.ChunkReader;
|
||||||
import net.minestom.server.utils.MathUtils;
|
import net.minestom.server.utils.MathUtils;
|
||||||
import net.minestom.server.utils.binary.BinaryWriter;
|
import net.minestom.server.utils.binary.BinaryWriter;
|
||||||
|
import net.minestom.server.utils.chunk.ChunkCallback;
|
||||||
import net.minestom.server.world.biomes.Biome;
|
import net.minestom.server.world.biomes.Biome;
|
||||||
|
|
||||||
import java.util.concurrent.CopyOnWriteArraySet;
|
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)}
|
||||||
* <p>
|
* <p>
|
||||||
* It is also used by the default {@link IChunkLoader} which is {@link MinestomBasicChunkLoader}
|
* It is also used by the default {@link IChunkLoader} which is {@link MinestomBasicChunkLoader}
|
||||||
*
|
*
|
||||||
|
|
|
@ -12,7 +12,7 @@ public interface ExplosionSupplier {
|
||||||
* @param centerY center Y of the explosion
|
* @param centerY center Y of the explosion
|
||||||
* @param centerZ center Z of the explosion
|
* @param centerZ center Z of the explosion
|
||||||
* @param strength strength 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
|
* @return Explosion object representing the algorithm to use
|
||||||
*/
|
*/
|
||||||
Explosion createExplosion(float centerX, float centerY, float centerZ, float strength, Data additionalData);
|
Explosion createExplosion(float centerX, float centerY, float centerZ, float strength, Data additionalData);
|
||||||
|
|
|
@ -592,7 +592,7 @@ public abstract class Instance implements BlockModifier, EventHandler, DataConta
|
||||||
* @param blockPosition
|
* @param blockPosition
|
||||||
* @param actionId
|
* @param actionId
|
||||||
* @param actionParam
|
* @param actionParam
|
||||||
* @see <a href="https://wiki.vg/Protocol#Block_Action">Packet information</a> for the action id & param
|
* @see <a href="https://wiki.vg/Protocol#Block_Action">Packet information</a> for the action id & param
|
||||||
*/
|
*/
|
||||||
public void sendBlockAction(BlockPosition blockPosition, byte actionId, byte actionParam) {
|
public void sendBlockAction(BlockPosition blockPosition, byte actionId, byte actionParam) {
|
||||||
final short blockStateId = getBlockStateId(blockPosition);
|
final short blockStateId = getBlockStateId(blockPosition);
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class BlockManager {
|
||||||
* Register a {@link CustomBlock}
|
* Register a {@link CustomBlock}
|
||||||
*
|
*
|
||||||
* @param customBlock the custom block to register
|
* @param customBlock the custom block to register
|
||||||
* @throws IllegalArgumentException if {@param customBlock} block id is negative
|
* @throws IllegalArgumentException if <code>customBlock</code> block id is negative
|
||||||
*/
|
*/
|
||||||
public void registerCustomBlock(CustomBlock customBlock) {
|
public void registerCustomBlock(CustomBlock customBlock) {
|
||||||
final short id = customBlock.getCustomBlockId();
|
final short id = customBlock.getCustomBlockId();
|
||||||
|
@ -33,7 +33,7 @@ public class BlockManager {
|
||||||
* Register a {@link BlockPlacementRule}
|
* Register a {@link BlockPlacementRule}
|
||||||
*
|
*
|
||||||
* @param blockPlacementRule the block placement rule to register
|
* @param blockPlacementRule the block placement rule to register
|
||||||
* @throws IllegalArgumentException if {@param blockPlacementRule} block id is negative
|
* @throws IllegalArgumentException if <code>blockPlacementRule</code> block id is negative
|
||||||
*/
|
*/
|
||||||
public void registerBlockPlacementRule(BlockPlacementRule blockPlacementRule) {
|
public void registerBlockPlacementRule(BlockPlacementRule blockPlacementRule) {
|
||||||
final short id = blockPlacementRule.getBlockId();
|
final short id = blockPlacementRule.getBlockId();
|
||||||
|
|
|
@ -244,7 +244,7 @@ public class Inventory implements InventoryModifier, InventoryClickHandler, View
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the cursor item of a viewer,
|
* Change the cursor item of a viewer,
|
||||||
* does nothing if {@param player} is not a viewer
|
* does nothing if <code>player</code> is not a viewer
|
||||||
*
|
*
|
||||||
* @param player the player to change the cursor item
|
* @param player the player to change the cursor item
|
||||||
* @param cursorItem the new player 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 property the property to send
|
||||||
* @param value the value of the property
|
* @param value the value of the property
|
||||||
* @see <a href="https://wiki.vg/Protocol#Window_Property</a>
|
* @see <a href="https://wiki.vg/Protocol#Window_Property">https://wiki.vg/Protocol#Window_Property</a>
|
||||||
*/
|
*/
|
||||||
protected void sendProperty(InventoryProperty property, short value) {
|
protected void sendProperty(InventoryProperty property, short value) {
|
||||||
WindowPropertyPacket windowPropertyPacket = new WindowPropertyPacket();
|
WindowPropertyPacket windowPropertyPacket = new WindowPropertyPacket();
|
||||||
|
|
|
@ -626,7 +626,7 @@ public class ItemStack implements DataContainer {
|
||||||
*
|
*
|
||||||
* @param player the player
|
* @param player the player
|
||||||
* @return the custom {@link ItemDisplay} for {@code 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) {
|
public ItemDisplay getCustomDisplay(Player player) {
|
||||||
throw new UnsupportedOperationException("Not implemented yet");
|
throw new UnsupportedOperationException("Not implemented yet");
|
||||||
|
|
|
@ -12,7 +12,7 @@ public interface LargeFramebuffer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new Framebuffer that represent a 128x128 sub-view of this framebuffer.
|
* 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 left
|
||||||
* @param top
|
* @param top
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -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 {
|
public enum ColorMappingStrategy {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class DataReader {
|
||||||
* <p>
|
* <p>
|
||||||
* WARNING: the {@link DataManager} needs to have all the required types as the {@link SerializableData} has
|
* 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
|
* @param reader the reader
|
||||||
* @return a {@link SerializableData} based on the data input
|
* @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
|
* @param binaryReader the reader
|
||||||
* @return a map containing the indexes of your data
|
* @return a map containing the indexes of your data
|
||||||
|
|
|
@ -214,7 +214,7 @@ public class BinaryWriter extends OutputStream {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write an {@link UUID}
|
* 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
|
* @param uuid the {@link UUID} to write
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class CustomBlockUtils {
|
||||||
* Get if a custom block id has an update method
|
* Get if a custom block id has an update method
|
||||||
*
|
*
|
||||||
* @param customBlockId the custom block id
|
* @param customBlockId the custom block id
|
||||||
* @return true if {@param customBlockId} has an update method
|
* @return true if <code>customBlockId</code> has an update method
|
||||||
*/
|
*/
|
||||||
public static boolean hasUpdate(short customBlockId) {
|
public static boolean hasUpdate(short customBlockId) {
|
||||||
final CustomBlock customBlock = BLOCK_MANAGER.getCustomBlock(customBlockId);
|
final CustomBlock customBlock = BLOCK_MANAGER.getCustomBlock(customBlockId);
|
||||||
|
@ -23,7 +23,7 @@ public class CustomBlockUtils {
|
||||||
* Get if a {@link CustomBlock} has an update method
|
* Get if a {@link CustomBlock} has an update method
|
||||||
*
|
*
|
||||||
* @param customBlock the {@link CustomBlock}
|
* @param customBlock the {@link CustomBlock}
|
||||||
* @return true if {@param customBlock} has an update method
|
* @return true if <code>customBlock</code> has an update method
|
||||||
*/
|
*/
|
||||||
public static boolean hasUpdate(CustomBlock customBlock) {
|
public static boolean hasUpdate(CustomBlock customBlock) {
|
||||||
return customBlock != null && customBlock.hasUpdate();
|
return customBlock != null && customBlock.hasUpdate();
|
||||||
|
|
Loading…
Reference in New Issue