mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 08:47:35 +01:00
Pulling all pending Bukkit-JavaDoc changes
By: Edmond Poon <sagaciouszzzz@gmail.com>
This commit is contained in:
parent
745a0d7683
commit
761a84cb1b
@ -49,7 +49,7 @@ public enum Achievement {
|
||||
|
||||
/**
|
||||
* Gets the ID for this achievement.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that this is offset using {@link #STATISTIC_OFFSET}
|
||||
*
|
||||
* @return ID of this achievement
|
||||
@ -60,7 +60,7 @@ public enum Achievement {
|
||||
|
||||
/**
|
||||
* Gets the achievement associated with the given ID.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that the ID must already be offset using {@link #STATISTIC_OFFSET}
|
||||
*
|
||||
* @param id ID of the achievement to return
|
||||
|
@ -86,7 +86,7 @@ public enum Art {
|
||||
|
||||
/**
|
||||
* Get a painting by its unique name
|
||||
* <p />
|
||||
* <p>
|
||||
* This ignores underscores and capitalization
|
||||
*
|
||||
* @param name The name
|
||||
|
@ -50,7 +50,7 @@ public final class Bukkit {
|
||||
|
||||
/**
|
||||
* Attempts to set the {@link Server} singleton.
|
||||
* <p />
|
||||
* <p>
|
||||
* This cannot be done if the Server is already set.
|
||||
*
|
||||
* @param server Server instance
|
||||
|
@ -16,28 +16,28 @@ public enum EntityEffect {
|
||||
|
||||
/**
|
||||
* When a mob dies.
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>This will cause client-glitches!
|
||||
*/
|
||||
DEATH(3),
|
||||
|
||||
/**
|
||||
* The smoke when taming a wolf fails.
|
||||
* <p />
|
||||
* <p>
|
||||
* Without client-mods this will be ignored if the entity is not a wolf.
|
||||
*/
|
||||
WOLF_SMOKE(6),
|
||||
|
||||
/**
|
||||
* The hearts when taming a wolf succeeds.
|
||||
* <p />
|
||||
* <p>
|
||||
* Without client-mods this will be ignored if the entity is not a wolf.
|
||||
*/
|
||||
WOLF_HEARTS(7),
|
||||
|
||||
/**
|
||||
* When a wolf shakes (after being wet).
|
||||
* <p />
|
||||
* <p>
|
||||
* Without client-mods this will be ignored if the entity is not a wolf.
|
||||
*/
|
||||
WOLF_SHAKE(8),
|
||||
|
@ -50,7 +50,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
|
||||
/**
|
||||
* Gets a {@link Player} object that this represents, if there is one
|
||||
* <p />
|
||||
* <p>
|
||||
* If the player is online, this will return that player. Otherwise,
|
||||
* it will return null.
|
||||
*
|
||||
@ -60,7 +60,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
|
||||
/**
|
||||
* Gets the first date and time that this player was witnessed on this server.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the player has never played before, this will return 0. Otherwise, it will be
|
||||
* the amount of milliseconds since midnight, January 1, 1970 UTC.
|
||||
*
|
||||
@ -70,7 +70,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
|
||||
/**
|
||||
* Gets the last date and time that this player was witnessed on this server.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the player has never played before, this will return 0. Otherwise, it will be
|
||||
* the amount of milliseconds since midnight, January 1, 1970 UTC.
|
||||
*
|
||||
|
@ -37,14 +37,14 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
public interface Server extends PluginMessageRecipient {
|
||||
/**
|
||||
* Used for all administrative messages, such as an operator using a command.
|
||||
* <p />
|
||||
* <p>
|
||||
* For use in {@link #broadcast(java.lang.String, java.lang.String)}
|
||||
*/
|
||||
public static final String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin";
|
||||
|
||||
/**
|
||||
* Used for all announcement messages, such as informing users that a player has joined.
|
||||
* <p />
|
||||
* <p>
|
||||
* For use in {@link #broadcast(java.lang.String, java.lang.String)}
|
||||
*/
|
||||
public static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user";
|
||||
@ -176,7 +176,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
|
||||
/**
|
||||
* Broadcast a message to all players.
|
||||
* <p />
|
||||
* <p>
|
||||
* This is the same as calling {@link #broadcast(java.lang.String, java.lang.String)} to {@link #BROADCAST_CHANNEL_USERS}
|
||||
*
|
||||
* @param message the message
|
||||
@ -187,7 +187,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
/**
|
||||
* Gets the name of the update folder. The update folder is used to safely update
|
||||
* plugins at the right moment on a plugin load.
|
||||
* <p />
|
||||
* <p>
|
||||
* The update folder name is relative to the plugins folder.
|
||||
*
|
||||
* @return The name of the update folder
|
||||
@ -211,17 +211,17 @@ public interface Server extends PluginMessageRecipient {
|
||||
|
||||
/**
|
||||
* Gets default ticks per animal spawns value
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn monsters every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn monsters every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to 0, animal spawning will be disabled. We recommend using spawn-animals to control this instead.
|
||||
* <p />
|
||||
* <p>
|
||||
* Minecraft default: 400.
|
||||
*
|
||||
* @return The default ticks per animal spawns value
|
||||
@ -230,17 +230,17 @@ public interface Server extends PluginMessageRecipient {
|
||||
|
||||
/**
|
||||
* Gets the default ticks per monster spawns value
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn monsters every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn monsters every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to 0, monsters spawning will be disabled. We recommend using spawn-monsters to control this instead.
|
||||
* <p />
|
||||
* <p>
|
||||
* Minecraft default: 1.
|
||||
*
|
||||
* @return The default ticks per monsters spawn value
|
||||
@ -249,7 +249,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
|
||||
/**
|
||||
* Gets a player object by the given username
|
||||
* <p />
|
||||
* <p>
|
||||
* This method may not return objects for offline players
|
||||
*
|
||||
* @param name Name to look up
|
||||
@ -268,7 +268,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
/**
|
||||
* Attempts to match any players with the given name, and returns a list
|
||||
* of all possibly matches
|
||||
* <p />
|
||||
* <p>
|
||||
* This list is not sorted in any particular order. If an exact match is found,
|
||||
* the returned list will only contain a single result.
|
||||
*
|
||||
@ -307,7 +307,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
|
||||
/**
|
||||
* Creates or loads a world with the given name using the specified options.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the world is already loaded, it will just return the equivalent of
|
||||
* getWorld(creator.name()).
|
||||
*
|
||||
@ -510,7 +510,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
|
||||
/**
|
||||
* Gets the player by the given name, regardless if they are offline or online.
|
||||
* <p />
|
||||
* <p>
|
||||
* This will return an object even if the player does not exist. To this method, all players will exist.
|
||||
*
|
||||
* @param name Name of the player to retrieve
|
||||
|
@ -2,7 +2,7 @@ package org.bukkit;
|
||||
|
||||
/**
|
||||
* An Enum of Sounds the server is able to send to players.
|
||||
* <p />
|
||||
* <p>
|
||||
* WARNING: At any time, sounds may be added/removed from this Enum or even MineCraft itself! There is no guarantee the sounds will play.
|
||||
* There is no guarantee values will not be removed from this Enum. As such, you should not depend on the ordinal values of this class.
|
||||
*/
|
||||
|
@ -48,7 +48,7 @@ public enum Statistic {
|
||||
|
||||
/**
|
||||
* Checks if this is a substatistic.
|
||||
* <p />
|
||||
* <p>
|
||||
* A substatistic exists in mass for each block or item, depending on {@link #isBlock()}
|
||||
*
|
||||
* @return true if this is a substatistic
|
||||
|
@ -163,7 +163,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Loads the {@link Chunk} at the specified coordinates
|
||||
* <p />
|
||||
* <p>
|
||||
* If the chunk does not exist, it will be generated.
|
||||
* This method is analogous to {@link #loadChunk(int, int, boolean)} where generate is true.
|
||||
*
|
||||
@ -184,7 +184,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Safely unloads and saves the {@link Chunk} at the specified coordinates
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is analogous to {@link #unloadChunk(int, int, boolean, boolean)} where safe and saveis true
|
||||
*
|
||||
* @param chunk the chunk to unload
|
||||
@ -194,7 +194,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Safely unloads and saves the {@link Chunk} at the specified coordinates
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is analogous to {@link #unloadChunk(int, int, boolean, boolean)} where safe and saveis true
|
||||
*
|
||||
* @param x X-coordinate of the chunk
|
||||
@ -205,7 +205,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Safely unloads and optionally saves the {@link Chunk} at the specified coordinates
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is analogous to {@link #unloadChunk(int, int, boolean, boolean)} where save is true
|
||||
*
|
||||
* @param x X-coordinate of the chunk
|
||||
@ -228,7 +228,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Safely queues the {@link Chunk} at the specified coordinates for unloading
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is analogous to {@link #unloadChunkRequest(int, int, boolean)} where safe is true
|
||||
*
|
||||
* @param x X-coordinate of the chunk
|
||||
@ -438,7 +438,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the relative in-game time of this world.
|
||||
* <p />
|
||||
* <p>
|
||||
* The relative time is analogous to hours * 1000
|
||||
*
|
||||
* @return The current relative time
|
||||
@ -448,9 +448,9 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Sets the relative in-game time on the server.
|
||||
* <p />
|
||||
* <p>
|
||||
* The relative time is analogous to hours * 1000
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that setting the relative time below the current relative time will
|
||||
* actually move the clock forward a day. If you require to rewind time, please
|
||||
* see setFullTime
|
||||
@ -470,7 +470,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Sets the in-game time on the server
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that this sets the full time of the world, which may cause adverse
|
||||
* effects such as breaking redstone clocks and any scheduled events
|
||||
*
|
||||
@ -655,7 +655,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
/**
|
||||
* Spawn a {@link FallingBlock} entity at the given {@link Location} of the specified {@link Material}.
|
||||
* The material dictates what is falling. When the FallingBlock hits the ground, it will place that block.
|
||||
* <p />
|
||||
* <p>
|
||||
* The Material must be a block type, check with {@link Material#isBlock() material.isBlock()}.
|
||||
* The Material may not be air.
|
||||
*
|
||||
@ -771,7 +771,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the temperature for the given block coordinates.
|
||||
* <p />
|
||||
* <p>
|
||||
* It is safe to run this method when the block does not exist, it will not create the block.
|
||||
*
|
||||
* @param x X coordinate of the block
|
||||
@ -782,7 +782,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the humidity for the given block coordinates.
|
||||
* <p />
|
||||
* <p>
|
||||
* It is safe to run this method when the block does not exist, it will not create the block.
|
||||
*
|
||||
* @param x X coordinate of the block
|
||||
@ -793,7 +793,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the maximum height of this world.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the max height is 100, there are only blocks from y=0 to y=99.
|
||||
*
|
||||
* @return Maximum height of the world
|
||||
@ -802,7 +802,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the sea level for this world.
|
||||
* <p />
|
||||
* <p>
|
||||
* This is often half of {@link #getMaxHeight()}
|
||||
*
|
||||
* @return Sea level
|
||||
@ -874,19 +874,19 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the world's ticks per animal spawns value
|
||||
* <p />
|
||||
* <p>
|
||||
* This value determines how many ticks there are between attempts to spawn animals.
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn animals in this world every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn animals in this world every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to 0, animal spawning will be disabled for this world. We recommend using {@link #setSpawnFlags(boolean, boolean)} to control this instead.
|
||||
* <p />
|
||||
* <p>
|
||||
* Minecraft default: 400.
|
||||
*
|
||||
* @return The world's ticks per animal spawns value
|
||||
@ -895,19 +895,19 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Sets the world's ticks per animal spawns value
|
||||
* <p />
|
||||
* <p>
|
||||
* This value determines how many ticks there are between attempts to spawn animals.
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn animals in this world every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn animals in this world every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to 0, animal spawning will be disabled for this world. We recommend using {@link #setSpawnFlags(boolean, boolean)} to control this instead.
|
||||
* <p />
|
||||
* <p>
|
||||
* Minecraft default: 400.
|
||||
*
|
||||
* @param ticksPerAnimalSpawns the ticks per animal spawns value you want to set the world to
|
||||
@ -916,19 +916,19 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the world's ticks per monster spawns value
|
||||
* <p />
|
||||
* <p>
|
||||
* This value determines how many ticks there are between attempts to spawn monsters.
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn monsters in this world every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn monsters in this world every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to 0, monsters spawning will be disabled for this world. We recommend using {@link #setSpawnFlags(boolean, boolean)} to control this instead.
|
||||
* <p />
|
||||
* <p>
|
||||
* Minecraft default: 1.
|
||||
*
|
||||
* @return The world's ticks per monster spawns value
|
||||
@ -937,19 +937,19 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Sets the world's ticks per monster spawns value
|
||||
* <p />
|
||||
* <p>
|
||||
* This value determines how many ticks there are between attempts to spawn monsters.
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn monsters in this world on every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn monsters in this world every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to 0, monsters spawning will be disabled for this world. We recommend using {@link #setSpawnFlags(boolean, boolean)} to control this instead.
|
||||
* <p />
|
||||
* <p>
|
||||
* Minecraft default: 1.
|
||||
*
|
||||
* @param ticksPerMonsterSpawns the ticks per monster spawns value you want to set the world to
|
||||
@ -964,7 +964,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Sets the limit for number of monsters that can spawn in a chunk in this world
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to a negative number the world will use the server-wide spawn limit instead.
|
||||
*/
|
||||
@ -978,7 +978,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Sets the limit for number of animals that can spawn in a chunk in this world
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to a negative number the world will use the server-wide spawn limit instead.
|
||||
*/
|
||||
@ -992,7 +992,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Sets the limit for number of water animals that can spawn in a chunk in this world
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to a negative number the world will use the server-wide spawn limit instead.
|
||||
*/
|
||||
@ -1006,7 +1006,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Sets the limit for number of ambient mobs that can spawn in a chunk in this world
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to a negative number the world will use the server-wide spawn limit instead.
|
||||
*/
|
||||
@ -1014,7 +1014,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Play a Sound at the provided Location in the World
|
||||
* <p />
|
||||
* <p>
|
||||
* This function will fail silently if Location or Sound are null.
|
||||
*
|
||||
* @param location The location to play the sound
|
||||
@ -1033,7 +1033,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the current state of the specified rule
|
||||
* <p />
|
||||
* <p>
|
||||
* Will return null if rule passed is null
|
||||
*
|
||||
* @param rule Rule to look up value of
|
||||
@ -1043,10 +1043,10 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
|
||||
/**
|
||||
* Set the specified gamerule to specified value.
|
||||
* <p />
|
||||
* <p>
|
||||
* The rule may attempt to validate the value passed, will return true if
|
||||
* value was set.
|
||||
* <p />
|
||||
* <p>
|
||||
* If rule is null, the function will return false.
|
||||
*
|
||||
* @param rule Rule to set
|
||||
|
@ -140,7 +140,7 @@ public class WorldCreator {
|
||||
|
||||
/**
|
||||
* Gets the generator that will be used to create or load the world.
|
||||
* <p />
|
||||
* <p>
|
||||
* This may be null, in which case the "natural" generator for this environment
|
||||
* will be used.
|
||||
*
|
||||
@ -152,7 +152,7 @@ public class WorldCreator {
|
||||
|
||||
/**
|
||||
* Sets the generator that will be used to create or load the world.
|
||||
* <p />
|
||||
* <p>
|
||||
* This may be null, in which case the "natural" generator for this environment
|
||||
* will be used.
|
||||
*
|
||||
@ -167,10 +167,10 @@ public class WorldCreator {
|
||||
|
||||
/**
|
||||
* Sets the generator that will be used to create or load the world.
|
||||
* <p />
|
||||
* <p>
|
||||
* This may be null, in which case the "natural" generator for this environment
|
||||
* will be used.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the generator cannot be found for the given name, the natural environment generator
|
||||
* will be used instead and a warning will be printed to the console.
|
||||
*
|
||||
@ -185,10 +185,10 @@ public class WorldCreator {
|
||||
|
||||
/**
|
||||
* Sets the generator that will be used to create or load the world.
|
||||
* <p />
|
||||
* <p>
|
||||
* This may be null, in which case the "natural" generator for this environment
|
||||
* will be used.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the generator cannot be found for the given name, the natural environment generator
|
||||
* will be used instead and a warning will be printed to the specified output
|
||||
*
|
||||
@ -225,7 +225,7 @@ public class WorldCreator {
|
||||
|
||||
/**
|
||||
* Creates a world with the specified options.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the world already exists, it will be loaded from disk and some options
|
||||
* may be ignored.
|
||||
*
|
||||
@ -247,10 +247,10 @@ public class WorldCreator {
|
||||
|
||||
/**
|
||||
* Attempts to get the {@link ChunkGenerator} with the given name.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the generator is not found, null will be returned and a message will be
|
||||
* printed to the specified {@link CommandSender} explaining why.
|
||||
* <p />
|
||||
* <p>
|
||||
* The name must be in the "plugin:id" notation, or optionally just "plugin",
|
||||
* where "plugin" is the safe-name of a plugin and "id" is an optional unique
|
||||
* identifier for the generator you wish to request from the plugin.
|
||||
|
@ -36,7 +36,7 @@ public interface Block extends Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the block at the given face
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is equal to getRelative(face, 1)
|
||||
*
|
||||
* @param face Face of this block to return
|
||||
@ -47,7 +47,7 @@ public interface Block extends Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the block at the given distance of the given face
|
||||
* <p />
|
||||
* <p>
|
||||
* For example, the following method places water at 100,102,100; two blocks
|
||||
* above 100,100,100.
|
||||
*
|
||||
@ -86,7 +86,7 @@ public interface Block extends Metadatable {
|
||||
|
||||
/**
|
||||
* Get the amount of light at this block from the sky.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any light given from other sources (such as blocks like torches) will be ignored.
|
||||
*
|
||||
* @return Sky light level
|
||||
@ -95,7 +95,7 @@ public interface Block extends Metadatable {
|
||||
|
||||
/**
|
||||
* Get the amount of light at this block from nearby blocks.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any light given from other sources (such as the sun) will be ignored.
|
||||
*
|
||||
* @return Block light level
|
||||
@ -203,7 +203,7 @@ public interface Block extends Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the face relation of this block compared to the given block
|
||||
* <p />
|
||||
* <p>
|
||||
* For example:
|
||||
* <pre>
|
||||
* Block current = world.getBlockAt(100, 100, 100);
|
||||
@ -222,7 +222,7 @@ public interface Block extends Metadatable {
|
||||
/**
|
||||
* Captures the current state of this block. You may then cast that state
|
||||
* into any accepted type, such as Furnace or Sign.
|
||||
* <p />
|
||||
* <p>
|
||||
* The returned object will never be updated, and you are not guaranteed that
|
||||
* (for example) a sign is still a sign after you capture its state.
|
||||
*
|
||||
@ -291,7 +291,7 @@ public interface Block extends Metadatable {
|
||||
|
||||
/**
|
||||
* Checks if this block is empty.
|
||||
* <p />
|
||||
* <p>
|
||||
* A block is considered empty when {@link #getType()} returns {@link Material#AIR}.
|
||||
*
|
||||
* @return true if this block is empty
|
||||
@ -300,7 +300,7 @@ public interface Block extends Metadatable {
|
||||
|
||||
/**
|
||||
* Checks if this block is liquid.
|
||||
* <p />
|
||||
* <p>
|
||||
* A block is considered liquid when {@link #getType()} returns {@link Material#WATER}, {@link Material#STATIONARY_WATER}, {@link Material#LAVA} or {@link Material#STATIONARY_LAVA}.
|
||||
*
|
||||
* @return true if this block is liquid
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.metadata.Metadatable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a block, which will not change automatically.
|
||||
* <p />
|
||||
* <p>
|
||||
* Unlike Block, which only one object can exist per coordinate, BlockState can
|
||||
* exist multiple times for any given Block. Note that another plugin may change
|
||||
* the state of the block and you will not know, or they may change the block to
|
||||
@ -127,7 +127,7 @@ public interface BlockState extends Metadatable {
|
||||
/**
|
||||
* Attempts to update the block represented by this state, setting it to the
|
||||
* new values as defined by this state.
|
||||
* <p />
|
||||
* <p>
|
||||
* This has the same effect as calling update(false). That is to say,
|
||||
* this will not modify the state of a block if it is no longer the same
|
||||
* type as it was when this state was taken. It will return false in this
|
||||
@ -141,7 +141,7 @@ public interface BlockState extends Metadatable {
|
||||
/**
|
||||
* Attempts to update the block represented by this state, setting it to the
|
||||
* new values as defined by this state.
|
||||
* <p />
|
||||
* <p>
|
||||
* This has the same effect as calling update(force, true). That is to say,
|
||||
* this will trigger a physics update to surrounding blocks.
|
||||
*
|
||||
@ -153,14 +153,14 @@ public interface BlockState extends Metadatable {
|
||||
/**
|
||||
* Attempts to update the block represented by this state, setting it to the
|
||||
* new values as defined by this state.
|
||||
* <p />
|
||||
* <p>
|
||||
* Unless force is true, this will not modify the state of a block if it is
|
||||
* no longer the same type as it was when this state was taken. It will return
|
||||
* false in this eventuality.
|
||||
* <p />
|
||||
* <p>
|
||||
* If force is true, it will set the type of the block to match the new state,
|
||||
* set the state data and then return true.
|
||||
* <p />
|
||||
* <p>
|
||||
* If applyPhysics is true, it will trigger a physics update on surrounding
|
||||
* blocks which could cause them to update or disappear.
|
||||
*
|
||||
|
@ -7,7 +7,7 @@ public interface Dispenser extends BlockState, ContainerBlock {
|
||||
|
||||
/**
|
||||
* Attempts to dispense the contents of this block
|
||||
* <p />
|
||||
* <p>
|
||||
* If the block is no longer a dispenser, this will return false
|
||||
*
|
||||
* @return true if successful, otherwise false
|
||||
|
@ -9,14 +9,14 @@ public interface Dropper extends BlockState, InventoryHolder {
|
||||
/**
|
||||
* Tries to drop a randomly selected item from the Dropper's inventory,
|
||||
* following the normal behavior of a Dropper.
|
||||
* <p />
|
||||
* <p>
|
||||
* Normal behavior of a Dropper is as follows:
|
||||
* <p />
|
||||
* <p>
|
||||
* If the block that the Dropper is facing is an InventoryHolder or
|
||||
* ContainerBlock the randomly selected ItemStack is placed within that
|
||||
* Inventory in the first slot that's available, starting with 0 and
|
||||
* counting up. If the inventory is full, nothing happens.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the block that the Dropper is facing is not an InventoryHolder or
|
||||
* ContainerBlock, the randomly selected ItemStack is dropped on
|
||||
* the ground in the form of an {@link org.bukkit.entity.Item Item}.
|
||||
|
@ -38,7 +38,7 @@ public interface NoteBlock extends BlockState {
|
||||
|
||||
/**
|
||||
* Attempts to play the note at block
|
||||
* <p />
|
||||
* <p>
|
||||
* If the block is no longer a note block, this will return false
|
||||
*
|
||||
* @return true if successful, otherwise false
|
||||
|
@ -14,7 +14,7 @@ public interface Sign extends BlockState {
|
||||
|
||||
/**
|
||||
* Gets the line of text at the specified index.
|
||||
* <p />
|
||||
* <p>
|
||||
* For example, getLine(0) will return the first line of text.
|
||||
*
|
||||
* @param index Line number to get the text from, starting at 0
|
||||
@ -25,7 +25,7 @@ public interface Sign extends BlockState {
|
||||
|
||||
/**
|
||||
* Sets the line of text at the specified index.
|
||||
* <p />
|
||||
* <p>
|
||||
* For example, setLine(0, "Line One") will set the first line of text to
|
||||
* "Line One".
|
||||
*
|
||||
|
@ -126,7 +126,7 @@ public abstract class Command {
|
||||
|
||||
/**
|
||||
* Tests the given {@link CommandSender} to see if they can perform this command.
|
||||
* <p />
|
||||
* <p>
|
||||
* If they do not have permission, they will be informed that they cannot do this.
|
||||
*
|
||||
* @param target User to test
|
||||
@ -150,7 +150,7 @@ public abstract class Command {
|
||||
|
||||
/**
|
||||
* Tests the given {@link CommandSender} to see if they can perform this command.
|
||||
* <p />
|
||||
* <p>
|
||||
* No error is sent to the sender.
|
||||
*
|
||||
* @param target User to test
|
||||
|
@ -8,11 +8,11 @@ import java.util.Map;
|
||||
public interface Configuration extends ConfigurationSection {
|
||||
/**
|
||||
* Sets the default value of the given path as provided.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no source {@link Configuration} was provided as a default collection,
|
||||
* then a new {@link MemoryConfiguration} will be created to hold the new default
|
||||
* value.
|
||||
* <p />
|
||||
* <p>
|
||||
* If value is null, the value will be removed from the default Configuration source.
|
||||
*
|
||||
* @param path Path of the value to set.
|
||||
@ -23,7 +23,7 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the default values of the given paths as provided.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no source {@link Configuration} was provided as a default collection,
|
||||
* then a new {@link MemoryConfiguration} will be created to hold the new default
|
||||
* values.
|
||||
@ -35,11 +35,11 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the default values of the given paths as provided.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no source {@link Configuration} was provided as a default collection,
|
||||
* then a new {@link MemoryConfiguration} will be created to hold the new default
|
||||
* value.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will not hold a reference to the specified Configuration, nor will it
|
||||
* automatically update if that Configuration ever changes. If you require this,
|
||||
* you should set the default source with {@link #setDefaults(org.bukkit.configuration.Configuration)}.
|
||||
@ -51,7 +51,7 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the source of all default values for this {@link Configuration}.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a previous source was set, or previous default values were defined, then they will
|
||||
* not be copied to the new source.
|
||||
*
|
||||
@ -62,7 +62,7 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the source {@link Configuration} for this configuration.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no configuration source was set, but default values were added, then a
|
||||
* {@link MemoryConfiguration} will be returned. If no source was set and no
|
||||
* defaults were set, then this method will return null.
|
||||
@ -73,7 +73,7 @@ public interface Configuration extends ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the {@link ConfigurationOptions} for this {@link Configuration}.
|
||||
* <p />
|
||||
* <p>
|
||||
* All setters through this method are chainable.
|
||||
*
|
||||
* @return Options for this configuration
|
||||
|
@ -23,7 +23,7 @@ public class ConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets the char that will be used to separate {@link ConfigurationSection}s
|
||||
* <p />
|
||||
* <p>
|
||||
* This value does not affect how the {@link Configuration} is stored, only in
|
||||
* how you access the data. The default value is '.'.
|
||||
*
|
||||
@ -35,7 +35,7 @@ public class ConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets the char that will be used to separate {@link ConfigurationSection}s
|
||||
* <p />
|
||||
* <p>
|
||||
* This value does not affect how the {@link Configuration} is stored, only in
|
||||
* how you access the data. The default value is '.'.
|
||||
*
|
||||
@ -49,7 +49,7 @@ public class ConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Checks if the {@link Configuration} should copy values from its default {@link Configuration} directly.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this is true, all values in the default Configuration will be directly copied,
|
||||
* making it impossible to distinguish between values that were set and values that
|
||||
* are provided by default. As a result, {@link ConfigurationSection#contains(java.lang.String)} will always
|
||||
@ -64,7 +64,7 @@ public class ConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets if the {@link Configuration} should copy values from its default {@link Configuration} directly.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this is true, all values in the default Configuration will be directly copied,
|
||||
* making it impossible to distinguish between values that were set and values that
|
||||
* are provided by default. As a result, {@link ConfigurationSection#contains(java.lang.String)} will always
|
||||
|
@ -15,11 +15,11 @@ import org.bukkit.inventory.ItemStack;
|
||||
public interface ConfigurationSection {
|
||||
/**
|
||||
* Gets a set containing all keys in this section.
|
||||
* <p />
|
||||
* <p>
|
||||
* If deep is set to true, then this will contain all the keys within any child
|
||||
* {@link ConfigurationSection}s (and their children, etc). These will be in a
|
||||
* valid path notation for you to use.
|
||||
* <p />
|
||||
* <p>
|
||||
* If deep is set to false, then this will contain only the keys of any direct children,
|
||||
* and not their own children.
|
||||
*
|
||||
@ -30,11 +30,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets a Map containing all keys and their values for this section.
|
||||
* <p />
|
||||
* <p>
|
||||
* If deep is set to true, then this will contain all the keys and values within
|
||||
* any child {@link ConfigurationSection}s (and their children, etc). These
|
||||
* keys will be in a valid path notation for you to use.
|
||||
* <p />
|
||||
* <p>
|
||||
* If deep is set to false, then this will contain only the keys and values of any
|
||||
* direct children, and not their own children.
|
||||
*
|
||||
@ -45,7 +45,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if this {@link ConfigurationSection} contains the given path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the value for the requested path does not exist but a default value has
|
||||
* been specified, this will return true.
|
||||
*
|
||||
@ -57,7 +57,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if this {@link ConfigurationSection} has a value set for the given path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the value for the requested path does not exist but a default value has
|
||||
* been specified, this will still return false.
|
||||
*
|
||||
@ -69,12 +69,12 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the path of this {@link ConfigurationSection} from its root {@link Configuration}
|
||||
* <p />
|
||||
* <p>
|
||||
* For any {@link Configuration} themselves, this will return an empty string.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the section is no longer contained within its root for any reason, such as
|
||||
* being replaced with a different value, this may return null.
|
||||
* <p />
|
||||
* <p>
|
||||
* To retrieve the single name of this section, that is, the final part of the path
|
||||
* returned by this method, you may use {@link #getName()}.
|
||||
*
|
||||
@ -84,7 +84,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the name of this individual {@link ConfigurationSection}, in the path.
|
||||
* <p />
|
||||
* <p>
|
||||
* This will always be the final part of {@link #getCurrentPath()}, unless the
|
||||
* section is orphaned.
|
||||
*
|
||||
@ -94,9 +94,9 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the root {@link Configuration} that contains this {@link ConfigurationSection}
|
||||
* <p />
|
||||
* <p>
|
||||
* For any {@link Configuration} themselves, this will return its own object.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the section is no longer contained within its root for any reason, such as
|
||||
* being replaced with a different value, this may return null.
|
||||
*
|
||||
@ -107,9 +107,9 @@ public interface ConfigurationSection {
|
||||
/**
|
||||
* Gets the parent {@link ConfigurationSection} that directly contains this
|
||||
* {@link ConfigurationSection}.
|
||||
* <p />
|
||||
* <p>
|
||||
* For any {@link Configuration} themselves, this will return null.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the section is no longer contained within its parent for any reason, such as
|
||||
* being replaced with a different value, this may return null.
|
||||
*
|
||||
@ -119,7 +119,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested Object by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the Object does not exist but a default value has been specified, this
|
||||
* will return the default value. If the Object does not exist and no default
|
||||
* value was specified, this will return null.
|
||||
@ -131,7 +131,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested Object by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the Object does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -143,10 +143,10 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the specified path to the given value.
|
||||
* <p />
|
||||
* <p>
|
||||
* If value is null, the entry will be removed. Any existing entry will be
|
||||
* replaced, regardless of what the new value is.
|
||||
* <p />
|
||||
* <p>
|
||||
* Some implementations may have limitations on what you may store. See their
|
||||
* individual javadocs for details. No implementations should allow you to store
|
||||
* {@link Configuration}s or {@link ConfigurationSection}s, please use
|
||||
@ -159,7 +159,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates an empty {@link ConfigurationSection} at the specified path.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any value that was previously set at this path will be overwritten. If the
|
||||
* previous value was itself a {@link ConfigurationSection}, it will be orphaned.
|
||||
*
|
||||
@ -170,7 +170,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates a {@link ConfigurationSection} at the specified path, with specified values.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any value that was previously set at this path will be overwritten. If the
|
||||
* previous value was itself a {@link ConfigurationSection}, it will be orphaned.
|
||||
*
|
||||
@ -183,7 +183,7 @@ public interface ConfigurationSection {
|
||||
// Primitives
|
||||
/**
|
||||
* Gets the requested String by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the String does not exist but a default value has been specified, this
|
||||
* will return the default value. If the String does not exist and no default
|
||||
* value was specified, this will return null.
|
||||
@ -195,7 +195,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested String by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the String does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -207,7 +207,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a String.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a String, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a String and return
|
||||
@ -220,7 +220,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested int by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the int does not exist but a default value has been specified, this
|
||||
* will return the default value. If the int does not exist and no default
|
||||
* value was specified, this will return 0.
|
||||
@ -232,7 +232,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested int by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the int does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -244,7 +244,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is an int.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a int, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a int and return
|
||||
@ -257,7 +257,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested boolean by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the boolean does not exist but a default value has been specified, this
|
||||
* will return the default value. If the boolean does not exist and no default
|
||||
* value was specified, this will return false.
|
||||
@ -269,7 +269,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested boolean by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the boolean does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -281,7 +281,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a boolean.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a boolean, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a boolean and return
|
||||
@ -294,7 +294,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested double by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the double does not exist but a default value has been specified, this
|
||||
* will return the default value. If the double does not exist and no default
|
||||
* value was specified, this will return 0.
|
||||
@ -306,7 +306,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested double by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the double does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -318,7 +318,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a double.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a double, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a double and return
|
||||
@ -331,7 +331,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested long by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the long does not exist but a default value has been specified, this
|
||||
* will return the default value. If the long does not exist and no default
|
||||
* value was specified, this will return 0.
|
||||
@ -343,7 +343,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested long by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the long does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -355,7 +355,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a long.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a long, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a long and return
|
||||
@ -369,7 +369,7 @@ public interface ConfigurationSection {
|
||||
// Java
|
||||
/**
|
||||
* Gets the requested List by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return null.
|
||||
@ -381,7 +381,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -393,7 +393,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a List.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a List, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a List and return
|
||||
@ -406,11 +406,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of String by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a String if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -421,11 +421,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Integer by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Integer if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -436,11 +436,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Boolean by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Boolean if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -451,11 +451,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Double by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Double if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -466,11 +466,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Float by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Float if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -481,11 +481,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Long by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Long if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -496,11 +496,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Byte by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Byte if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -511,11 +511,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Character by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Character if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -526,11 +526,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Short by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Short if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -541,11 +541,11 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested List of Maps by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the List does not exist but a default value has been specified, this
|
||||
* will return the default value. If the List does not exist and no default
|
||||
* value was specified, this will return an empty List.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method will attempt to cast any values into a Map if possible, but may
|
||||
* miss any values out if they are not compatible.
|
||||
*
|
||||
@ -557,7 +557,7 @@ public interface ConfigurationSection {
|
||||
// Bukkit
|
||||
/**
|
||||
* Gets the requested Vector by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the Vector does not exist but a default value has been specified, this
|
||||
* will return the default value. If the Vector does not exist and no default
|
||||
* value was specified, this will return null.
|
||||
@ -569,7 +569,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested {@link Vector} by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the Vector does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -581,7 +581,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a Vector.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a Vector, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a Vector and return
|
||||
@ -594,7 +594,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested OfflinePlayer by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the OfflinePlayer does not exist but a default value has been specified, this
|
||||
* will return the default value. If the OfflinePlayer does not exist and no default
|
||||
* value was specified, this will return null.
|
||||
@ -606,7 +606,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested {@link OfflinePlayer} by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the OfflinePlayer does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -618,7 +618,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is an OfflinePlayer.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a OfflinePlayer, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a OfflinePlayer and return
|
||||
@ -631,7 +631,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested ItemStack by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the ItemStack does not exist but a default value has been specified, this
|
||||
* will return the default value. If the ItemStack does not exist and no default
|
||||
* value was specified, this will return null.
|
||||
@ -643,7 +643,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested {@link ItemStack} by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the ItemStack does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -655,7 +655,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is an ItemStack.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a ItemStack, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a ItemStack and return
|
||||
@ -668,7 +668,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested Color by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the Color does not exist but a default value has been specified, this
|
||||
* will return the default value. If the Color does not exist and no default
|
||||
* value was specified, this will return null.
|
||||
@ -680,7 +680,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested {@link Color} by path, returning a default value if not found.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the Color does not exist then the specified default value will returned
|
||||
* regardless of if a default has been identified in the root {@link Configuration}.
|
||||
*
|
||||
@ -692,7 +692,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a Color.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a Color, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a Color and return
|
||||
@ -705,7 +705,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the requested ConfigurationSection by path.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the ConfigurationSection does not exist but a default value has been specified, this
|
||||
* will return the default value. If the ConfigurationSection does not exist and no default
|
||||
* value was specified, this will return null.
|
||||
@ -717,7 +717,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Checks if the specified path is a ConfigurationSection.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the path exists but is not a ConfigurationSection, this will return false. If the path does not
|
||||
* exist, this will return false. If the path does not exist but a default value
|
||||
* has been specified, this will check if that default value is a ConfigurationSection and return
|
||||
@ -730,7 +730,7 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Gets the equivalent {@link ConfigurationSection} from the default {@link Configuration} defined in {@link #getRoot()}.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the root contains no defaults, or the defaults doesn't contain a value
|
||||
* for this path, or the value at this path is not a {@link ConfigurationSection} then
|
||||
* this will return null.
|
||||
@ -741,13 +741,13 @@ public interface ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Sets the default value in the root at the given path as provided.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no source {@link Configuration} was provided as a default collection,
|
||||
* then a new {@link MemoryConfiguration} will be created to hold the new default
|
||||
* value.
|
||||
* <p />
|
||||
* <p>
|
||||
* If value is null, the value will be removed from the default Configuration source.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the value as returned by {@link #getDefaultSection()} is null,
|
||||
* then this will create a new section at the path, replacing anything that
|
||||
* may have existed there previously.
|
||||
|
@ -27,7 +27,7 @@ public class MemorySection implements ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates an empty MemorySection for use as a root {@link Configuration} section.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that calling this without being yourself a {@link Configuration} will throw an
|
||||
* exception!
|
||||
*
|
||||
@ -746,7 +746,7 @@ public class MemorySection implements ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates a full path to the given {@link ConfigurationSection} from its root {@link Configuration}.
|
||||
* <p />
|
||||
* <p>
|
||||
* You may use this method for any given {@link ConfigurationSection}, not only {@link MemorySection}.
|
||||
*
|
||||
* @param section Section to create a path for.
|
||||
@ -759,7 +759,7 @@ public class MemorySection implements ConfigurationSection {
|
||||
|
||||
/**
|
||||
* Creates a relative path to the given {@link ConfigurationSection} from the given relative section.
|
||||
* <p />
|
||||
* <p>
|
||||
* You may use this method for any given {@link ConfigurationSection}, not only {@link MemorySection}.
|
||||
*
|
||||
* @param section Section to create a path for.
|
||||
|
@ -38,7 +38,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Saves this {@link FileConfiguration} to the specified location.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the file does not exist, it will be created. If already exists, it will
|
||||
* be overwritten. If it cannot be overwritten or created, an exception will be thrown.
|
||||
*
|
||||
@ -64,7 +64,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Saves this {@link FileConfiguration} to the specified location.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the file does not exist, it will be created. If already exists, it will
|
||||
* be overwritten. If it cannot be overwritten or created, an exception will be thrown.
|
||||
*
|
||||
@ -87,10 +87,10 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified location.
|
||||
* <p />
|
||||
* <p>
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given file.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the file cannot be loaded for any reason, an exception will be thrown.
|
||||
*
|
||||
* @param file File to load from.
|
||||
@ -107,7 +107,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified stream.
|
||||
* <p />
|
||||
* <p>
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given stream.
|
||||
*
|
||||
@ -140,10 +140,10 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified location.
|
||||
* <p />
|
||||
* <p>
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given file.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the file cannot be loaded for any reason, an exception will be thrown.
|
||||
*
|
||||
* @param file File to load from.
|
||||
@ -160,10 +160,10 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Loads this {@link FileConfiguration} from the specified string, as opposed to from file.
|
||||
* <p />
|
||||
* <p>
|
||||
* All the values contained within this configuration will be removed, leaving
|
||||
* only settings and defaults, and the new values will be loaded from the given string.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the string is invalid in any way, an exception will be thrown.
|
||||
*
|
||||
* @param contents Contents of a Configuration to load.
|
||||
@ -174,7 +174,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
|
||||
|
||||
/**
|
||||
* Compiles the header for this {@link FileConfiguration} and returns the result.
|
||||
* <p />
|
||||
* <p>
|
||||
* This will use the header from {@link #options()} -> {@link FileConfigurationOptions#header()},
|
||||
* respecting the rules of {@link FileConfigurationOptions#copyHeader()} if set.
|
||||
*
|
||||
|
@ -32,12 +32,12 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets the header that will be applied to the top of the saved output.
|
||||
* <p />
|
||||
* <p>
|
||||
* This header will be commented out and applied directly at the top of the
|
||||
* generated output of the {@link FileConfiguration}. It is not required to
|
||||
* include a newline at the end of the header as it will automatically be applied,
|
||||
* but you may include one if you wish for extra spacing.
|
||||
* <p />
|
||||
* <p>
|
||||
* Null is a valid value which will indicate that no header is to be applied.
|
||||
* The default value is null.
|
||||
*
|
||||
@ -49,12 +49,12 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets the header that will be applied to the top of the saved output.
|
||||
* <p />
|
||||
* <p>
|
||||
* This header will be commented out and applied directly at the top of the
|
||||
* generated output of the {@link FileConfiguration}. It is not required to
|
||||
* include a newline at the end of the header as it will automatically be applied,
|
||||
* but you may include one if you wish for extra spacing.
|
||||
* <p />
|
||||
* <p>
|
||||
* Null is a valid value which will indicate that no header is to be applied.
|
||||
*
|
||||
* @param value New header
|
||||
@ -67,15 +67,15 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets whether or not the header should be copied from a default source.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this is true, if a default {@link FileConfiguration} is passed to
|
||||
* {@link FileConfiguration#setDefaults(org.bukkit.configuration.Configuration)}
|
||||
* then upon saving it will use the header from that config, instead of the one provided here.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no default is set on the configuration, or the default is not of type FileConfiguration,
|
||||
* or that config has no header ({@link #header()} returns null) then the header
|
||||
* specified in this configuration will be used.
|
||||
* <p />
|
||||
* <p>
|
||||
* Defaults to true.
|
||||
*
|
||||
* @return Whether or not to copy the header
|
||||
@ -86,15 +86,15 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets whether or not the header should be copied from a default source.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this is true, if a default {@link FileConfiguration} is passed to
|
||||
* {@link FileConfiguration#setDefaults(org.bukkit.configuration.Configuration)}
|
||||
* then upon saving it will use the header from that config, instead of the one provided here.
|
||||
* <p />
|
||||
* <p>
|
||||
* If no default is set on the configuration, or the default is not of type FileConfiguration,
|
||||
* or that config has no header ({@link #header()} returns null) then the header
|
||||
* specified in this configuration will be used.
|
||||
* <p />
|
||||
* <p>
|
||||
* Defaults to true.
|
||||
*
|
||||
* @param value Whether or not to copy the header
|
||||
|
@ -158,7 +158,7 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
|
||||
/**
|
||||
* Creates a new {@link YamlConfiguration}, loading from the given file.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any errors loading the Configuration will be logged and then ignored.
|
||||
* If the specified input is not a valid config, a blank config will be returned.
|
||||
*
|
||||
@ -185,7 +185,7 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
|
||||
/**
|
||||
* Creates a new {@link YamlConfiguration}, loading from the given stream.
|
||||
* <p />
|
||||
* <p>
|
||||
* Any errors loading the Configuration will be logged and then ignored.
|
||||
* If the specified input is not a valid config, a blank config will be returned.
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ public class YamlConfigurationOptions extends FileConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Gets how much spaces should be used to indent each line.
|
||||
* <p />
|
||||
* <p>
|
||||
* The minimum value this may be is 2, and the maximum is 9.
|
||||
*
|
||||
* @return How much to indent by
|
||||
@ -54,7 +54,7 @@ public class YamlConfigurationOptions extends FileConfigurationOptions {
|
||||
|
||||
/**
|
||||
* Sets how much spaces should be used to indent each line.
|
||||
* <p />
|
||||
* <p>
|
||||
* The minimum value this may be is 2, and the maximum is 9.
|
||||
*
|
||||
* @param value New indent
|
||||
|
@ -4,7 +4,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Represents an object that may be serialized.
|
||||
* <p />
|
||||
* <p>
|
||||
* These objects MUST implement one of the following, in addition to the methods
|
||||
* as defined by this interface:
|
||||
* <ul>
|
||||
@ -22,7 +22,7 @@ import java.util.Map;
|
||||
public interface ConfigurationSerializable {
|
||||
/**
|
||||
* Creates a Map representation of this class.
|
||||
* <p />
|
||||
* <p>
|
||||
* This class must provide a method to restore this class, as defined in the
|
||||
* {@link ConfigurationSerializable} interface javadocs.
|
||||
*
|
||||
|
@ -135,10 +135,10 @@ public class ConfigurationSerialization {
|
||||
|
||||
/**
|
||||
* Attempts to deserialize the given arguments into a new instance of the given class.
|
||||
* <p />
|
||||
* <p>
|
||||
* The class must implement {@link ConfigurationSerializable}, including the extra methods
|
||||
* as specified in the javadoc of ConfigurationSerializable.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a new instance could not be made, an example being the class not fully implementing
|
||||
* the interface, null will be returned.
|
||||
*
|
||||
@ -152,10 +152,10 @@ public class ConfigurationSerialization {
|
||||
|
||||
/**
|
||||
* Attempts to deserialize the given arguments into a new instance of the given class.
|
||||
* <p />
|
||||
* <p>
|
||||
* The class must implement {@link ConfigurationSerializable}, including the extra methods
|
||||
* as specified in the javadoc of ConfigurationSerializable.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a new instance could not be made, an example being the class not fully implementing
|
||||
* the interface, null will be returned.
|
||||
*
|
||||
|
@ -9,10 +9,10 @@ import java.lang.annotation.Target;
|
||||
* Represents an "alias" that a {@link ConfigurationSerializable} may be stored as.
|
||||
* If this is not present on a {@link ConfigurationSerializable} class, it will use the
|
||||
* fully qualified name of the class.
|
||||
* <p />
|
||||
* <p>
|
||||
* This value will be stored in the configuration so that the configuration deserialization
|
||||
* can determine what type it is.
|
||||
* <p />
|
||||
* <p>
|
||||
* Using this annotation on any other class than a {@link ConfigurationSerializable} will
|
||||
* have no effect.
|
||||
* @see ConfigurationSerialization#registerClass(Class, String)
|
||||
@ -22,7 +22,7 @@ import java.lang.annotation.Target;
|
||||
public @interface SerializableAs {
|
||||
/**
|
||||
* This is the name your class will be stored and retrieved as.
|
||||
* <p />
|
||||
* <p>
|
||||
* This name MUST be unique. We recommend using names such as "MyPluginThing" instead of
|
||||
* "Thing".
|
||||
*
|
||||
|
@ -210,7 +210,7 @@ public abstract class Enchantment {
|
||||
|
||||
/**
|
||||
* Registers an enchantment with the given ID and object.
|
||||
* <p />
|
||||
* <p>
|
||||
* Generally not to be used from within a plugin.
|
||||
*
|
||||
* @param enchantment Enchantment to register
|
||||
|
@ -43,9 +43,9 @@ public interface Damageable extends Entity {
|
||||
|
||||
/**
|
||||
* Sets the maximum health this entity can have.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the health of the entity is above the value provided it will be set to that value.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note: An entity with a health bar ({@link Player}, {@link EnderDragon}, {@link Wither}, etc...} will have their bar scaled accordingly.
|
||||
*
|
||||
* @param health amount of health to set the maximum to
|
||||
|
@ -226,7 +226,7 @@ public interface Entity extends Metadatable {
|
||||
|
||||
/**
|
||||
* Gets the amount of ticks this entity has lived for.
|
||||
* <p />
|
||||
* <p>
|
||||
* This is the equivalent to "age" in entities.
|
||||
*
|
||||
* @return Age of entity
|
||||
@ -235,7 +235,7 @@ public interface Entity extends Metadatable {
|
||||
|
||||
/**
|
||||
* Sets the amount of ticks this entity has lived for.
|
||||
* <p />
|
||||
* <p>
|
||||
* This is the equivalent to "age" in entities. May not be less than one tick.
|
||||
*
|
||||
* @param value Age of entity
|
||||
@ -244,7 +244,7 @@ public interface Entity extends Metadatable {
|
||||
|
||||
/**
|
||||
* Performs the specified {@link EntityEffect} for this entity.
|
||||
* <p />
|
||||
* <p>
|
||||
* This will be viewable to all players near the entity.
|
||||
*
|
||||
* @param type Effect to play.
|
||||
|
@ -15,278 +15,309 @@ import org.bukkit.potion.PotionEffectType;
|
||||
*/
|
||||
public interface LivingEntity extends Entity, Damageable {
|
||||
/**
|
||||
* Gets the height of the entity's head above its Location
|
||||
* Gets the height of the living entity's eyes above its Location.
|
||||
*
|
||||
* @return Height of the entity's eyes above its Location
|
||||
* @return height of the living entity's eyes above its location
|
||||
*/
|
||||
public double getEyeHeight();
|
||||
|
||||
/**
|
||||
* Gets the height of the entity's head above its Location
|
||||
* Gets the height of the living entity's eyes above its Location.
|
||||
*
|
||||
* @param ignoreSneaking If set to true, the effects of sneaking will be ignored
|
||||
* @return Height of the entity's eyes above its Location
|
||||
* @param ignoreSneaking if set to true, the effects of sneaking
|
||||
* will be ignored
|
||||
* @return height of the living entity's eyes above its location
|
||||
*/
|
||||
public double getEyeHeight(boolean ignoreSneaking);
|
||||
|
||||
/**
|
||||
* Get a Location detailing the current eye position of the LivingEntity.
|
||||
* Get a Location detailing the current eye position of the living
|
||||
* entity.
|
||||
*
|
||||
* @return a Location at the eyes of the LivingEntity.
|
||||
* @return a location at the eyes of the living entity
|
||||
*/
|
||||
public Location getEyeLocation();
|
||||
|
||||
/**
|
||||
* Gets all blocks along the player's line of sight
|
||||
* List iterates from player's position to target inclusive
|
||||
* Gets all blocks along the living entity's line of sight.
|
||||
* <p>
|
||||
* This list contains all blocks from the living entity's eye position
|
||||
* to target inclusive.
|
||||
*
|
||||
* @param transparent HashSet containing all transparent block IDs. If set to null only air is considered transparent.
|
||||
* @param maxDistance This is the maximum distance to scan. This may be further limited by the server, but never to less than 100 blocks.
|
||||
* @return List containing all blocks along the player's line of sight
|
||||
* @param transparent HashSet containing all transparent block IDs
|
||||
* (set to null for only air)
|
||||
* @param maxDistance this is the maximum distance to scan (may be
|
||||
* limited by server by at least 100 blocks, no less)
|
||||
* @return list containing all blocks along the living entity's line
|
||||
* of sight
|
||||
*/
|
||||
public List<Block> getLineOfSight(HashSet<Byte> transparent, int maxDistance);
|
||||
|
||||
/**
|
||||
* Gets the block that the player has targeted
|
||||
* Gets the block that the living entity has targeted.
|
||||
*
|
||||
* @param transparent HashSet containing all transparent block IDs. If set to null only air is considered transparent.
|
||||
* @param maxDistance This is the maximum distance to scan. This may be further limited by the server, but never to less than 100 blocks.
|
||||
* @return Block that the player has targeted
|
||||
* @param transparent HashSet containing all transparent block IDs
|
||||
* (set to null for only air)
|
||||
* @param maxDistance this is the maximum distance to scan
|
||||
* (may be limited by server by at least 100 blocks, no less)
|
||||
* @return block that the living entity has targeted
|
||||
*/
|
||||
public Block getTargetBlock(HashSet<Byte> transparent, int maxDistance);
|
||||
|
||||
/**
|
||||
* Gets the last two blocks along the player's line of sight.
|
||||
* Gets the last two blocks along the living entity's line of sight.
|
||||
* <p>
|
||||
* The target block will be the last block in the list.
|
||||
*
|
||||
* @param transparent HashSet containing all transparent block IDs. If set to null only air is considered transparent.
|
||||
* @param maxDistance This is the maximum distance to scan. This may be further limited by the server, but never to less than 100 blocks
|
||||
* @return List containing the last 2 blocks along the player's line of sight
|
||||
* @param transparent HashSet containing all transparent block IDs
|
||||
* (set to null for only air)
|
||||
* @param maxDistance this is the maximum distance to scan. This may be
|
||||
* further limited by the server, but never to less than 100 blocks
|
||||
* @return list containing the last 2 blocks along the living entity's
|
||||
* line of sight
|
||||
*/
|
||||
public List<Block> getLastTwoTargetBlocks(HashSet<Byte> transparent, int maxDistance);
|
||||
|
||||
/**
|
||||
* Throws an egg from the entity.
|
||||
* Throws an egg from the living entity.
|
||||
*
|
||||
* @deprecated Use launchProjectile(Egg.class) instead
|
||||
* @return The egg thrown.
|
||||
* @deprecated use launchProjectile(Egg.class) instead
|
||||
* @return the egg thrown
|
||||
*/
|
||||
@Deprecated
|
||||
public Egg throwEgg();
|
||||
|
||||
/**
|
||||
* Throws a snowball from the entity.
|
||||
* Throws a snowball from the living entity.
|
||||
*
|
||||
* @deprecated Use launchProjectile(Snowball.class) instead
|
||||
* @return The snowball thrown.
|
||||
* @deprecated use launchProjectile(Snowball.class) instead
|
||||
* @return the snowball thrown
|
||||
*/
|
||||
@Deprecated
|
||||
public Snowball throwSnowball();
|
||||
|
||||
/**
|
||||
* Shoots an arrow from the entity.
|
||||
* Shoots an arrow from the living entity.
|
||||
*
|
||||
* @deprecated Use launchProjectile(Arrow.class) instead
|
||||
* @return The arrow shot.
|
||||
* @deprecated use launchProjectile(Arrow.class) instead
|
||||
* @return the arrow shot
|
||||
*/
|
||||
@Deprecated
|
||||
public Arrow shootArrow();
|
||||
|
||||
/**
|
||||
* Launches a {@link Projectile} from the entity.
|
||||
* Launches a {@link Projectile} from the living entity.
|
||||
*
|
||||
* @param projectile Class of the projectile to launch
|
||||
*
|
||||
* @return The launched projectile.
|
||||
* @param projectile class of the projectile to launch
|
||||
* @return the launched projectile
|
||||
*/
|
||||
public <T extends Projectile> T launchProjectile(Class<? extends T> projectile);
|
||||
|
||||
/**
|
||||
* Returns the amount of air that this entity has remaining, in ticks
|
||||
* Returns the amount of air that the living entity has remaining, in
|
||||
* ticks.
|
||||
*
|
||||
* @return Amount of air remaining
|
||||
* @return amount of air remaining
|
||||
*/
|
||||
public int getRemainingAir();
|
||||
|
||||
/**
|
||||
* Sets the amount of air that this entity has remaining, in ticks
|
||||
* Sets the amount of air that the living entity has remaining, in
|
||||
* ticks.
|
||||
*
|
||||
* @param ticks Amount of air remaining
|
||||
* @param ticks amount of air remaining
|
||||
*/
|
||||
public void setRemainingAir(int ticks);
|
||||
|
||||
/**
|
||||
* Returns the maximum amount of air this entity can have, in ticks
|
||||
* Returns the maximum amount of air the living entity can
|
||||
* have, in ticks.
|
||||
*
|
||||
* @return Maximum amount of air
|
||||
* @return maximum amount of air
|
||||
*/
|
||||
public int getMaximumAir();
|
||||
|
||||
/**
|
||||
* Sets the maximum amount of air this entity can have, in ticks
|
||||
* Sets the maximum amount of air the living entity can have, in ticks.
|
||||
*
|
||||
* @param ticks Maximum amount of air
|
||||
* @param ticks maximum amount of air
|
||||
*/
|
||||
public void setMaximumAir(int ticks);
|
||||
|
||||
/**
|
||||
* Returns the entities current maximum noDamageTicks
|
||||
* This is the time in ticks the entity will become unable to take
|
||||
* equal or less damage than the lastDamage
|
||||
* Returns the living entity's current maximum no damage ticks.
|
||||
* <p>
|
||||
* This is the maximum duration in which the living entity will not
|
||||
* take damage.
|
||||
*
|
||||
* @return noDamageTicks
|
||||
* @return maximum no damage ticks
|
||||
*/
|
||||
public int getMaximumNoDamageTicks();
|
||||
|
||||
/**
|
||||
* Sets the entities current maximum noDamageTicks
|
||||
* Sets the living entity's current maximum no damage ticks.
|
||||
*
|
||||
* @param ticks maximumNoDamageTicks
|
||||
* @param ticks maximum amount of no damage ticks
|
||||
*/
|
||||
public void setMaximumNoDamageTicks(int ticks);
|
||||
|
||||
/**
|
||||
* Returns the entities lastDamage taken in the current noDamageTicks time.
|
||||
* Only damage higher than this amount will further damage the entity.
|
||||
* Returns the living entity's last damage taken in the current no
|
||||
* damage ticks time.
|
||||
* <p>
|
||||
* Only damage higher than this amount will further damage the living
|
||||
* entity.
|
||||
*
|
||||
* @return lastDamage
|
||||
* @return damage taken since the last no damage ticks time period
|
||||
*/
|
||||
public int getLastDamage();
|
||||
|
||||
/**
|
||||
* Sets the entities current maximum noDamageTicks
|
||||
* Sets the damage dealt within the current no damage ticks time period.
|
||||
*
|
||||
* @param damage last damage
|
||||
* @param damage amount of damage
|
||||
*/
|
||||
public void setLastDamage(int damage);
|
||||
|
||||
/**
|
||||
* Returns the entities current noDamageTicks
|
||||
* Returns the living entity's current no damage ticks.
|
||||
*
|
||||
* @return noDamageTicks
|
||||
* @return amount of no damage ticks
|
||||
*/
|
||||
public int getNoDamageTicks();
|
||||
|
||||
/**
|
||||
* Sets the entities current noDamageTicks
|
||||
* Sets the living entity's current no damage ticks.
|
||||
*
|
||||
* @param ticks NoDamageTicks
|
||||
* @param ticks amount of no damage ticks
|
||||
*/
|
||||
public void setNoDamageTicks(int ticks);
|
||||
|
||||
/**
|
||||
* Gets the player identified as the killer of this entity.
|
||||
* <p />
|
||||
* Gets the player identified as the killer of the living entity.
|
||||
* <p>
|
||||
* May be null.
|
||||
*
|
||||
* @return Killer player, or null if none found.
|
||||
* @return killer player, or null if none found
|
||||
*/
|
||||
public Player getKiller();
|
||||
|
||||
/**
|
||||
* Adds the given {@link PotionEffect} to this entity.
|
||||
* Only one potion effect can be present for a given {@link PotionEffectType}.
|
||||
* Adds the given {@link PotionEffect} to the living entity.
|
||||
* <p>
|
||||
* Only one potion effect can be present for a given
|
||||
* {@link PotionEffectType}.
|
||||
*
|
||||
* @param effect PotionEffect to be added
|
||||
* @return Whether the effect could be added
|
||||
* @return whether the effect could be added
|
||||
*/
|
||||
public boolean addPotionEffect(PotionEffect effect);
|
||||
|
||||
/**
|
||||
* Adds the given {@link PotionEffect} to this entity.
|
||||
* Only one potion effect can be present for a given {@link PotionEffectType}.
|
||||
* Adds the given {@link PotionEffect} to the living entity.
|
||||
* <p>
|
||||
* Only one potion effect can be present for a given
|
||||
* {@link PotionEffectType}.
|
||||
*
|
||||
* @param effect PotionEffect to be added
|
||||
* @param force Whether conflicting effects should be removed
|
||||
* @return Whether the effect could be added
|
||||
* @param force whether conflicting effects should be removed
|
||||
* @return whether the effect could be added
|
||||
*/
|
||||
public boolean addPotionEffect(PotionEffect effect, boolean force);
|
||||
|
||||
/**
|
||||
* Attempts to add all of the given {@link PotionEffect} to this entity.
|
||||
* Attempts to add all of the given {@link PotionEffect} to the living
|
||||
* entity.
|
||||
*
|
||||
* @param effects The effects to add
|
||||
* @return Whether all of the effects could be added
|
||||
* @param effects the effects to add
|
||||
* @return whether all of the effects could be added
|
||||
*/
|
||||
public boolean addPotionEffects(Collection<PotionEffect> effects);
|
||||
|
||||
/**
|
||||
* Returns whether the entity already has an existing
|
||||
* effect of the given {@link PotionEffectType} applied to it.
|
||||
* Returns whether the living entity already has an existing effect of
|
||||
* the given {@link PotionEffectType} applied to it.
|
||||
*
|
||||
* @param type The potion type to check
|
||||
* @return Whether the player has this potion effect active on them.
|
||||
* @param type the potion type to check
|
||||
* @return whether the living entity has this potion effect active
|
||||
* on them
|
||||
*/
|
||||
public boolean hasPotionEffect(PotionEffectType type);
|
||||
|
||||
/**
|
||||
* Removes any effects present of the given {@link PotionEffectType}.
|
||||
*
|
||||
* @param type The potion type to remove
|
||||
* @param type the potion type to remove
|
||||
*/
|
||||
public void removePotionEffect(PotionEffectType type);
|
||||
|
||||
/**
|
||||
* Returns all currently active {@link PotionEffect}s on this entity.
|
||||
* Returns all currently active {@link PotionEffect}s on the
|
||||
* living entity.
|
||||
*
|
||||
* @return A collection of {@link PotionEffect}s
|
||||
* @return a collection of {@link PotionEffect}s
|
||||
*/
|
||||
public Collection<PotionEffect> getActivePotionEffects();
|
||||
|
||||
/**
|
||||
* Checks whether the entity has block line of sight to another.<br />
|
||||
* This uses the same algorithm that hostile mobs use to find the closest player.
|
||||
* Checks whether the living entity has block line of sight to another.
|
||||
* <p>
|
||||
* This uses the same algorithm that hostile mobs use to find the
|
||||
* closest player.
|
||||
*
|
||||
* @param other The entity to determine line of sight to.
|
||||
* @return true if there is a line of sight, false if not.
|
||||
* @param other the entity to determine line of sight to
|
||||
* @return true if there is a line of sight, false if not
|
||||
*/
|
||||
public boolean hasLineOfSight(Entity other);
|
||||
|
||||
/**
|
||||
* Returns if the entity despawns when away from players or not.<br />
|
||||
* By default animals are not removed while other mobs are.
|
||||
* Returns if the living entity despawns when away from players or not.
|
||||
* <p>
|
||||
* By default, animals are not removed while other mobs are.
|
||||
*
|
||||
* @return true if the entity is removed when away from players
|
||||
* @return true if the living entity is removed when away from players
|
||||
*/
|
||||
public boolean getRemoveWhenFarAway();
|
||||
|
||||
/**
|
||||
* Sets whether or not the entity despawns when away from players or not.
|
||||
* Sets whether or not the living entity despawns when away from
|
||||
* players or not.
|
||||
*
|
||||
* @param remove The remove status
|
||||
* @param remove the removal status
|
||||
*/
|
||||
public void setRemoveWhenFarAway(boolean remove);
|
||||
|
||||
/**
|
||||
* Gets the inventory with the equipment worn by this entity.
|
||||
* Gets the inventory with the equipment worn by the living entity.
|
||||
*
|
||||
* @return the entities inventory.
|
||||
* @return the living entity's inventory
|
||||
*/
|
||||
public EntityEquipment getEquipment();
|
||||
|
||||
/**
|
||||
* Sets whether or not the entity can pick up items
|
||||
* Sets whether or not the living entity can pick up items.
|
||||
*
|
||||
* @param pickup Whether or not the entity can pick up items
|
||||
* @param pickup whether or not the living entity can pick up items
|
||||
*/
|
||||
public void setCanPickupItems(boolean pickup);
|
||||
|
||||
/**
|
||||
* Gets if the entity can pick up items
|
||||
* Gets if the living entity can pick up items.
|
||||
*
|
||||
* @return whether or not the entity can pick up items
|
||||
* @return whether or not the living entity can pick up items
|
||||
*/
|
||||
public boolean getCanPickupItems();
|
||||
|
||||
/**
|
||||
* Sets a custom name on a mob. This name will be used in death messages
|
||||
* and can be sent to the client as a nameplate over the mob.
|
||||
* Sets a custom name on a mob. This name will be used in death
|
||||
* messages and can be sent to the client as a nameplate over the mob.
|
||||
* <p>
|
||||
* Setting the name to null or an empty string will clear it.
|
||||
* <p>
|
||||
* This value has no effect on players, they will always use their real
|
||||
* name.
|
||||
* @param name name to set
|
||||
*
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setCustomName(String name);
|
||||
|
||||
@ -296,6 +327,7 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
* <p>
|
||||
* This value has no effect on players, they will always use their real
|
||||
* name.
|
||||
*
|
||||
* @return name of the mob or null
|
||||
*/
|
||||
public String getCustomName();
|
||||
@ -306,7 +338,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
* <p>
|
||||
* This value has no effect on players, they will always display their
|
||||
* name.
|
||||
* @param flag show custom name
|
||||
*
|
||||
* @param flag custom name or not
|
||||
*/
|
||||
public void setCustomNameVisible(boolean flag);
|
||||
|
||||
@ -315,6 +348,7 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
* <p>
|
||||
* This value has no effect on players, they will always display their
|
||||
* name.
|
||||
*
|
||||
* @return if the custom name is displayed
|
||||
*/
|
||||
public boolean isCustomNameVisible();
|
||||
|
@ -67,7 +67,7 @@ public interface Minecart extends Vehicle {
|
||||
|
||||
/**
|
||||
* Gets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.
|
||||
* <p />
|
||||
* <p>
|
||||
* A derailed minecart's velocity is multiplied by this factor each tick.
|
||||
*
|
||||
* @return derailed visible speed
|
||||
|
@ -24,7 +24,7 @@ import org.bukkit.plugin.messaging.PluginMessageRecipient;
|
||||
public interface Player extends HumanEntity, Conversable, CommandSender, OfflinePlayer, PluginMessageRecipient {
|
||||
/**
|
||||
* Gets the "friendly" name to display of this player. This may include color.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that this name will not be displayed in game, only in chat and places
|
||||
* defined by plugins
|
||||
*
|
||||
@ -34,7 +34,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Sets the "friendly" name to display of this player. This may include color.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that this name will not be displayed in game, only in chat and places
|
||||
* defined by plugins
|
||||
*
|
||||
@ -51,11 +51,11 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Sets the name that is shown on the in-game player list.
|
||||
* <p />
|
||||
* <p>
|
||||
* The name cannot be longer than 16 characters, but {@link ChatColor} is supported.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the value is null, the name will be identical to {@link #getName()}.
|
||||
* <p />
|
||||
* <p>
|
||||
* This name is case sensitive and unique, two names with different casing will
|
||||
* appear as two different people. If a player joins afterwards with
|
||||
* a name that conflicts with a player's custom list name, the
|
||||
@ -155,7 +155,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Loads the players current location, health, inventory, motion, and other information from the username.dat file, in the world/player folder
|
||||
* <p />
|
||||
* <p>
|
||||
* Note: This will overwrite the players current inventory, health, motion, etc, with the state from the saved dat file.
|
||||
*/
|
||||
public void loadData();
|
||||
@ -202,7 +202,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Play a sound for a player at the location.
|
||||
* <p />
|
||||
* <p>
|
||||
* This function will fail silently if Location or Sound are null.
|
||||
*
|
||||
* @param location The location to play the sound
|
||||
@ -244,7 +244,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
* Send a chunk change. This fakes a chunk change packet for a user at
|
||||
* a certain location. The updated cuboid must be entirely within a single
|
||||
* chunk. This will not actually change the world in any way.
|
||||
* <p />
|
||||
* <p>
|
||||
* At least one of the dimensions of the cuboid must be even. The size of the
|
||||
* data buffer must be 2.5*sx*sy*sz and formatted in accordance with the Packet51
|
||||
* format.
|
||||
@ -270,7 +270,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Render a map and send it to the player in its entirety. This may be used
|
||||
* when streaming the map in the normal manner is not desirbale.
|
||||
* when streaming the map in the normal manner is not desirable.
|
||||
*
|
||||
* @param map The map to be sent
|
||||
*/
|
||||
@ -326,7 +326,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
/**
|
||||
* Sets the current time on the player's client. When relative is true the player's time
|
||||
* will be kept synchronized to its world time with the specified offset.
|
||||
* <p />
|
||||
* <p>
|
||||
* When using non relative time the player's time will stay fixed at the specified time parameter. It's up to
|
||||
* the caller to continue updating the player's time. To restore player time to normal use resetPlayerTime().
|
||||
*
|
||||
@ -403,7 +403,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Gets the players current experience points towards the next level.
|
||||
* <p />
|
||||
* <p>
|
||||
* This is a percentage value. 0 is "no progress" and 1 is "next level".
|
||||
*
|
||||
* @return Current experience points
|
||||
@ -412,7 +412,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Sets the players current experience points towards the next level
|
||||
* <p />
|
||||
* <p>
|
||||
* This is a percentage value. 0 is "no progress" and 1 is "next level".
|
||||
*
|
||||
* @param exp New experience points
|
||||
@ -449,7 +449,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Gets the players current exhaustion level.
|
||||
* <p />
|
||||
* <p>
|
||||
* Exhaustion controls how fast the food level drops. While you have a certain
|
||||
* amount of exhaustion, your saturation will drop to zero, and then your food
|
||||
* will drop to zero.
|
||||
@ -467,7 +467,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Gets the players current saturation level.
|
||||
* <p />
|
||||
* <p>
|
||||
* Saturation is a buffer for food level. Your food level will not drop if you
|
||||
* are saturated > 0.
|
||||
*
|
||||
@ -606,14 +606,14 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
||||
/**
|
||||
* Request that the player's client download and switch texture packs.
|
||||
* <p />
|
||||
* <p>
|
||||
* The player's client will download the new texture pack asynchronously in the background, and
|
||||
* will automatically switch to it once the download is complete. If the client has downloaded
|
||||
* and cached the same texture pack in the past, it will perform a quick timestamp check over
|
||||
* the network to determine if the texture pack has changed and needs to be downloaded again.
|
||||
* When this request is sent for the very first time from a given server, the client will first
|
||||
* display a confirmation GUI to the player before proceeding with the download.
|
||||
* <p />
|
||||
* <p>
|
||||
* Notes:
|
||||
* <ul>
|
||||
* <li>Players can disable server textures on their client, in which case this method will have no affect on them.</li>
|
||||
|
@ -24,7 +24,7 @@ public interface Projectile extends Entity {
|
||||
|
||||
/**
|
||||
* Determine if this projectile should bounce or not when it hits.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a small fireball does not bounce it will set the target on fire.
|
||||
*
|
||||
* @return true if it should bounce.
|
||||
|
@ -4,7 +4,7 @@ public interface Tameable {
|
||||
|
||||
/**
|
||||
* Check if this is tamed
|
||||
* <p />
|
||||
* <p>
|
||||
* If something is tamed then a player can not tame it through normal methods, even if it does not belong to anyone in particular.
|
||||
*
|
||||
* @return true if this has been tamed
|
||||
@ -13,7 +13,7 @@ public interface Tameable {
|
||||
|
||||
/**
|
||||
* Sets if this has been tamed. Not necessary if the method setOwner has been used, as it tames automatically.
|
||||
* <p />
|
||||
* <p>
|
||||
* If something is tamed then a player can not tame it through normal methods, even if it does not belong to anyone in particular.
|
||||
*
|
||||
* @param tame true if tame
|
||||
|
@ -14,7 +14,7 @@ public @interface EventHandler {
|
||||
|
||||
/**
|
||||
* Define the priority of the event.
|
||||
* <p />
|
||||
* <p>
|
||||
* First priority to the last priority executed:
|
||||
* <ol>
|
||||
* <li>LOWEST</li>
|
||||
@ -29,7 +29,7 @@ public @interface EventHandler {
|
||||
|
||||
/**
|
||||
* Define if the handler ignores a cancelled event.
|
||||
* <p />
|
||||
* <p>
|
||||
* If ignoreCancelled is true and the event is cancelled, the method is
|
||||
* not called. Otherwise, the method is always called.
|
||||
*/
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a block is broken by a player.
|
||||
* <p />
|
||||
* <p>
|
||||
* If you wish to have the block drop experience, you must set the experience value above 0.
|
||||
* By default, experience will be set in the event if:
|
||||
* <ol>
|
||||
@ -16,11 +16,11 @@ import org.bukkit.event.HandlerList;
|
||||
* <li />The player does not have silk touch
|
||||
* <li />The block drops experience in vanilla MineCraft
|
||||
* </ol>
|
||||
* <p />
|
||||
* <p>
|
||||
* Note:
|
||||
* Plugins wanting to simulate a traditional block drop should set the block to air and utilize their own methods for determining
|
||||
* what the default drop for the block being broken is and what to do about it, if anything.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Break event is cancelled, the block will not break and experience will not drop.
|
||||
*/
|
||||
public class BlockBreakEvent extends BlockExpEvent implements Cancellable {
|
||||
|
@ -6,7 +6,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a block is destroyed as a result of being burnt by fire.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Burn event is cancelled, the block will not be destroyed as a result of being burnt by fire.
|
||||
*/
|
||||
public class BlockBurnEvent extends BlockEvent implements Cancellable {
|
||||
|
@ -6,7 +6,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when we try to place a block, to see if we can build it here or not.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note:
|
||||
* <ul>
|
||||
* <li>The Block returned by getBlock() is the block we are trying to place on, not the block we are trying to place.</li>
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Called when a block is damaged by a player.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Damage event is cancelled, the block will not be damaged.
|
||||
*/
|
||||
public class BlockDamageEvent extends BlockEvent implements Cancellable {
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* Called when an item is dispensed from a block.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Dispense event is cancelled, the block will not dispense the item.
|
||||
*/
|
||||
public class BlockDispenseEvent extends BlockEvent implements Cancellable {
|
||||
@ -44,7 +44,7 @@ public class BlockDispenseEvent extends BlockEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the velocity.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note: Modifying the returned Vector will not change the velocity, you must use {@link #setVelocity(org.bukkit.util.Vector)} instead.
|
||||
*
|
||||
* @return A Vector for the dispensed item's velocity
|
||||
|
@ -7,13 +7,13 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a block fades, melts or disappears based on world conditions
|
||||
* <p />
|
||||
* <p>
|
||||
* Examples:
|
||||
* <ul>
|
||||
* <li>Snow melting due to being near a light source.</li>
|
||||
* <li>Ice melting due to being near a light source.</li>
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Fade event is cancelled, the block will not fade, melt or disappear.
|
||||
*/
|
||||
public class BlockFadeEvent extends BlockEvent implements Cancellable {
|
||||
|
@ -8,13 +8,13 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a block is formed or spreads based on world conditions.
|
||||
* Use {@link BlockSpreadEvent} to catch blocks that actually spread and don't just "randomly" form.
|
||||
* <p />
|
||||
* <p>
|
||||
* Examples:
|
||||
* <ul>
|
||||
* <li>Snow forming due to a snow storm.</li>
|
||||
* <li>Ice forming in a snowy Biome like Taiga or Tundra.</li>
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Form event is cancelled, the block will not be formed.
|
||||
*
|
||||
* @see BlockSpreadEvent
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Represents events with a source block and a destination block, currently only applies to liquid (lava and water)
|
||||
* and teleporting dragon eggs.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block From To event is cancelled, the block will not move (the liquid will not flow).
|
||||
*/
|
||||
public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a block grows naturally in the world.
|
||||
* <p />
|
||||
* <p>
|
||||
* Examples:
|
||||
* <ul>
|
||||
* <li>Wheat</li>
|
||||
@ -16,7 +16,7 @@ import org.bukkit.event.HandlerList;
|
||||
* <li>Watermelon</li>
|
||||
* <li>Pumpkin</li>
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Grow event is cancelled, the block will not grow.
|
||||
*/
|
||||
public class BlockGrowEvent extends BlockEvent implements Cancellable {
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a block is ignited. If you want to catch when a Player places fire, you need to use {@link BlockPlaceEvent}.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Ignite event is cancelled, the block will not be ignited.
|
||||
*/
|
||||
public class BlockIgniteEvent extends BlockEvent implements Cancellable {
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Called when a block is placed by a player.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Place event is cancelled, the block will not be placed.
|
||||
*/
|
||||
public class BlockPlaceEvent extends BlockEvent implements Cancellable {
|
||||
|
@ -7,13 +7,13 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a block spreads based on world conditions.
|
||||
* Use {@link BlockFormEvent} to catch blocks that "randomly" form instead of actually spread.
|
||||
* <p />
|
||||
* <p>
|
||||
* Examples:
|
||||
* <ul>
|
||||
* <li>Mushrooms spreading.</li>
|
||||
* <li>Fire spreading.</li>
|
||||
* </ul>
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Block Spread event is cancelled, the block will not spread.
|
||||
*
|
||||
* @see BlockFormEvent
|
||||
|
@ -6,7 +6,7 @@ import org.bukkit.entity.Entity;
|
||||
|
||||
/**
|
||||
* Called when a block is formed by entities.
|
||||
* <p />
|
||||
* <p>
|
||||
* Examples:
|
||||
* <ul>
|
||||
* <li>Snow formed by a {@link org.bukkit.entity.Snowman}.</li>
|
||||
|
@ -6,7 +6,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when leaves are decaying naturally.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Leaves Decay event is cancelled, the leaves will not decay.
|
||||
*/
|
||||
public class LeavesDecayEvent extends BlockEvent implements Cancellable {
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a sign is changed by a player.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Sign Change event is cancelled, the sign will not be changed.
|
||||
*/
|
||||
public class SignChangeEvent extends BlockEvent implements Cancellable {
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a creature is spawned into a world.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Creature Spawn event is cancelled, the creature will not spawn.
|
||||
*/
|
||||
public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a Creeper is struck by lightning.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a Creeper Power event is cancelled, the Creeper will not be powered.
|
||||
*/
|
||||
public class CreeperPowerEvent extends EntityEvent implements Cancellable {
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.entity.LivingEntity;
|
||||
|
||||
/**
|
||||
* Called when an {@link Entity} breaks a door
|
||||
* <p />
|
||||
* <p>
|
||||
* Canceling the event will cause the event to be delayed
|
||||
*/
|
||||
public class EntityBreakDoorEvent extends EntityChangeBlockEvent {
|
||||
|
@ -13,7 +13,7 @@ public class EntityCombustByBlockEvent extends EntityCombustEvent {
|
||||
|
||||
/**
|
||||
* The combuster can be lava or a block that is on fire.
|
||||
* <p />
|
||||
* <p>
|
||||
* WARNING: block may be null.
|
||||
*
|
||||
* @return the Block that set the combustee alight.
|
||||
|
@ -11,7 +11,7 @@ public class EntityCombustByEntityEvent extends EntityCombustEvent {
|
||||
}
|
||||
|
||||
/**
|
||||
* The combuster can be a WeatherStorm a Blaze, or an Entity holding a FIRE_ASPECT enchanted item.
|
||||
* Get the entity that caused the combustion event.
|
||||
*
|
||||
* @return the Entity that set the combustee alight.
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when an entity combusts.
|
||||
* <p />
|
||||
* <p>
|
||||
* If an Entity Combust event is cancelled, the entity will not combust.
|
||||
*/
|
||||
public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
@ -37,7 +37,7 @@ public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* The number of seconds the combustee should be alight for.
|
||||
* <p />
|
||||
* <p>
|
||||
* This value will only ever increase the combustion time, not decrease existing combustion times.
|
||||
*
|
||||
* @param duration the time in seconds to be alight for.
|
||||
|
@ -70,109 +70,109 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Damage caused when an entity contacts a block such as a Cactus.
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 1 (Cactus)
|
||||
*/
|
||||
CONTACT,
|
||||
/**
|
||||
* Damage caused when an entity attacks another entity.
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: variable
|
||||
*/
|
||||
ENTITY_ATTACK,
|
||||
/**
|
||||
* Damage caused when attacked by a projectile.
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: variable
|
||||
*/
|
||||
PROJECTILE,
|
||||
/**
|
||||
* Damage caused by being put in a block
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 1
|
||||
*/
|
||||
SUFFOCATION,
|
||||
/**
|
||||
* Damage caused when an entity falls a distance greater than 3 blocks
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: fall height - 3.0
|
||||
*/
|
||||
FALL,
|
||||
/**
|
||||
* Damage caused by direct exposure to fire
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 1
|
||||
*/
|
||||
FIRE,
|
||||
/**
|
||||
* Damage caused due to burns caused by fire
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 1
|
||||
*/
|
||||
FIRE_TICK,
|
||||
/**
|
||||
* Damage caused due to a snowman melting
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 1
|
||||
*/
|
||||
MELTING,
|
||||
/**
|
||||
* Damage caused by direct exposure to lava
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 4
|
||||
*/
|
||||
LAVA,
|
||||
/**
|
||||
* Damage caused by running out of air while in water
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 2
|
||||
*/
|
||||
DROWNING,
|
||||
/**
|
||||
* Damage caused by being in the area when a block explodes.
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: variable
|
||||
*/
|
||||
BLOCK_EXPLOSION,
|
||||
/**
|
||||
* Damage caused by being in the area when an entity, such as a Creeper, explodes.
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: variable
|
||||
*/
|
||||
ENTITY_EXPLOSION,
|
||||
/**
|
||||
* Damage caused by falling into the void
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 4 for players
|
||||
*/
|
||||
VOID,
|
||||
/**
|
||||
* Damage caused by being struck by lightning
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 5
|
||||
*/
|
||||
LIGHTNING,
|
||||
/**
|
||||
* Damage caused by committing suicide using the command "/kill"
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 1000
|
||||
*/
|
||||
SUICIDE,
|
||||
/**
|
||||
* Damage caused by starving due to having an empty hunger bar
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 1
|
||||
*/
|
||||
STARVATION,
|
||||
/**
|
||||
* Damage caused due to an ongoing poison effect
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 1
|
||||
*/
|
||||
POISON,
|
||||
/**
|
||||
* Damage caused by being hit by a damage potion or spell
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: variable
|
||||
*/
|
||||
MAGIC,
|
||||
@ -182,21 +182,21 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
||||
WITHER,
|
||||
/**
|
||||
* Damage caused by being hit by a falling block which deals damage
|
||||
* <p />
|
||||
* <p>
|
||||
* <b>Note:</b> Not every block deals damage
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: variable
|
||||
*/
|
||||
FALLING_BLOCK,
|
||||
/**
|
||||
* Damage caused in retaliation to another attack by the Thorns enchantment.
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: 1-4 (Thorns)
|
||||
*/
|
||||
THORNS,
|
||||
/**
|
||||
* Custom damage.
|
||||
* <p />
|
||||
* <p>
|
||||
* Damage: variable
|
||||
*/
|
||||
CUSTOM
|
||||
|
@ -30,7 +30,7 @@ public class EntityDeathEvent extends EntityEvent {
|
||||
|
||||
/**
|
||||
* Gets how much EXP should be dropped from this death.
|
||||
* <p />
|
||||
* <p>
|
||||
* This does not indicate how much EXP should be taken from the entity in question,
|
||||
* merely how much should be created after its death.
|
||||
*
|
||||
@ -42,7 +42,7 @@ public class EntityDeathEvent extends EntityEvent {
|
||||
|
||||
/**
|
||||
* Sets how much EXP should be dropped from this death.
|
||||
* <p />
|
||||
* <p>
|
||||
* This does not indicate how much EXP should be taken from the entity in question,
|
||||
* merely how much should be created after its death.
|
||||
*
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
* Called when a non-player entity is about to teleport because it is in contact with a portal
|
||||
* <p />
|
||||
* <p>
|
||||
* For players see {@link org.bukkit.event.player.PlayerPortalEvent PlayerPortalEvent}
|
||||
*/
|
||||
public class EntityPortalEvent extends EntityTeleportEvent {
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* Called before an entity exits a portal.
|
||||
* <p />
|
||||
* <p>
|
||||
* This event allows you to modify the velocity of the entity after they
|
||||
* have successfully exeted the portal.
|
||||
*/
|
||||
|
@ -51,7 +51,7 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||
* Set the entity that you want the mob to target instead.
|
||||
* It is possible to be null, null will cause the entity to be
|
||||
* target-less.
|
||||
* <p />
|
||||
* <p>
|
||||
* This is different from cancelling the event. Cancelling the event
|
||||
* will cause the entity to keep an original target, while setting to be
|
||||
* null will cause the entity to be reset
|
||||
|
@ -19,7 +19,7 @@ public class EntityTargetLivingEntityEvent extends EntityTargetEvent{
|
||||
* Set the Entity that you want the mob to target.
|
||||
* It is possible to be null, null will cause the entity to be
|
||||
* target-less.
|
||||
* <p />
|
||||
* <p>
|
||||
* Must be a LivingEntity, or null
|
||||
*
|
||||
* @param target The entity to target
|
||||
|
@ -24,7 +24,7 @@ public class FoodLevelChangeEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the resultant food level that the entity involved in this event should be set to.
|
||||
* <p />
|
||||
* <p>
|
||||
* Where 20 is a full food bar and 0 is an empty one.
|
||||
*
|
||||
* @return The resultant food level
|
||||
|
@ -56,7 +56,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
|
||||
/**
|
||||
* Gets how much EXP the Player should have at respawn.
|
||||
* <p />
|
||||
* <p>
|
||||
* This does not indicate how much EXP should be dropped, please see
|
||||
* {@link #getDroppedExp()} for that.
|
||||
*
|
||||
@ -68,7 +68,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
|
||||
/**
|
||||
* Sets how much EXP the Player should have at respawn.
|
||||
* <p />
|
||||
* <p>
|
||||
* This does not indicate how much EXP should be dropped, please see
|
||||
* {@link #setDroppedExp(int)} for that.
|
||||
*
|
||||
@ -116,7 +116,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
|
||||
/**
|
||||
* Gets if the Player should keep all EXP at respawn.
|
||||
* <p />
|
||||
* <p>
|
||||
* This flag overrides other EXP settings
|
||||
*
|
||||
* @return True if Player should keep all pre-death exp
|
||||
@ -127,7 +127,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
|
||||
/**
|
||||
* Sets if the Player should keep all EXP at respawn.
|
||||
* <p />
|
||||
* <p>
|
||||
* This overrides all other EXP settings
|
||||
*
|
||||
* @param keepLevel True to keep all current value levels
|
||||
|
@ -102,7 +102,7 @@ public class PlayerEggThrowEvent extends PlayerEvent {
|
||||
/**
|
||||
* Get the number of mob hatches from the egg. By default the number
|
||||
* will be he number the server would've done
|
||||
* <p />
|
||||
* <p>
|
||||
* 7/8 chance of being 0
|
||||
* 31/256 ~= 1/8 chance to be 1
|
||||
* 1/256 chance to be 4
|
||||
@ -115,7 +115,7 @@ public class PlayerEggThrowEvent extends PlayerEvent {
|
||||
|
||||
/**
|
||||
* Change the number of mobs coming out of the hatched egg
|
||||
* <p />
|
||||
* <p>
|
||||
* The boolean hatching will override this number.
|
||||
* Ie. If hatching = false, this number will not matter
|
||||
*
|
||||
|
@ -63,7 +63,7 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the amount of experience received when fishing.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note: This value has no default effect unless the event state is {@link State#CAUGHT_FISH}.
|
||||
*
|
||||
* @return the amount of experience to drop
|
||||
@ -74,7 +74,7 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Sets the amount of experience received when fishing.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note: This value has no default effect unless the event state is {@link State#CAUGHT_FISH}.
|
||||
*
|
||||
* @param amount the amount of experience to drop
|
||||
|
@ -54,7 +54,7 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
|
||||
/**
|
||||
* Sets the cancellation state of this event. A canceled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
* <p />
|
||||
* <p>
|
||||
* Canceling this event will prevent use of food (player won't lose the
|
||||
* food item), prevent bows/snowballs/eggs from firing, etc. (player won't
|
||||
* lose the ammo)
|
||||
|
@ -23,7 +23,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
|
||||
/**
|
||||
* Gets the cancellation state of this event. A cancelled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
* <p />
|
||||
* <p>
|
||||
* If a move or teleport event is cancelled, the player will be moved or
|
||||
* teleported back to the Location as defined by getFrom(). This will not
|
||||
* fire an event
|
||||
@ -37,7 +37,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
|
||||
/**
|
||||
* Sets the cancellation state of this event. A cancelled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
* <p />
|
||||
* <p>
|
||||
* If a move or teleport event is cancelled, the player will be moved or
|
||||
* teleported back to the Location as defined by getFrom(). This will not
|
||||
* fire an event
|
||||
|
@ -6,7 +6,7 @@ import org.bukkit.generator.BlockPopulator;
|
||||
|
||||
/**
|
||||
* Thrown when a new chunk has finished being populated.
|
||||
* <p />
|
||||
* <p>
|
||||
* If your intent is to populate the chunk using this event, please see {@link BlockPopulator}
|
||||
*/
|
||||
public class ChunkPopulateEvent extends ChunkEvent {
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.World;
|
||||
public abstract class BlockPopulator {
|
||||
/**
|
||||
* Populates an area of blocks at or around the given chunk.
|
||||
* <p />
|
||||
* <p>
|
||||
* The chunks on each side of the specified chunk must already exist; that is,
|
||||
* there must be one north, east, south and west of the specified chunk.
|
||||
* The "corner" chunks may not exist, in which scenario the populator should
|
||||
|
@ -39,7 +39,7 @@ public abstract class ChunkGenerator {
|
||||
@Deprecated
|
||||
/**
|
||||
* Shapes the chunk for the given coordinates.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method should return a byte[32768] in the following format:
|
||||
*
|
||||
* <pre>
|
||||
@ -51,10 +51,10 @@ public abstract class ChunkGenerator {
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that this method should <b>never</b> attempt to get the Chunk at
|
||||
* the passed coordinates, as doing so may cause an infinite loop
|
||||
* <p />
|
||||
* <p>
|
||||
* Note this deprecated method will only be called when both generateExtBlockSections()
|
||||
* and generateBlockSections() are unimplemented and return null.
|
||||
|
||||
@ -70,10 +70,10 @@ public abstract class ChunkGenerator {
|
||||
|
||||
/**
|
||||
* Shapes the chunk for the given coordinates, with extended block IDs supported (0-4095).
|
||||
* <p />
|
||||
* <p>
|
||||
* As of 1.2, chunks are represented by a vertical array of chunk sections, each of which is 16 x 16 x 16 blocks. If a section
|
||||
* is empty (all zero), the section does not need to be supplied, reducing memory usage.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method must return a short[][] array in the following format:
|
||||
* <pre>
|
||||
* short[][] result = new short[world-height / 16][];
|
||||
@ -83,7 +83,7 @@ public abstract class ChunkGenerator {
|
||||
* result[sectionID] = new short[4096];
|
||||
* </pre>
|
||||
* while sections that are not populated can be left null.
|
||||
* <p />
|
||||
* <p>
|
||||
* Setting a block at X, Y, Z within the chunk can be done with the following mapping function:
|
||||
* <pre>
|
||||
* void setBlock(short[][] result, int x, int y, int z, short blkid) {
|
||||
@ -103,7 +103,7 @@ public abstract class ChunkGenerator {
|
||||
* }
|
||||
* </pre>
|
||||
* while sections that are not populated can be left null.
|
||||
* <p />
|
||||
* <p>
|
||||
* Setting a block at X, Y, Z within the chunk can be done with the following mapping function:
|
||||
* <pre>
|
||||
* void setBlock(short[][] result, int x, int y, int z, short blkid) {
|
||||
@ -122,10 +122,10 @@ public abstract class ChunkGenerator {
|
||||
* return result[y >> 4][((y & 0xF) << 8) | (z << 4) | x];
|
||||
* }
|
||||
* </pre>
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that this method should <b>never</b> attempt to get the Chunk at
|
||||
* the passed coordinates, as doing so may cause an infinite loop
|
||||
* <p />
|
||||
* <p>
|
||||
* Note generators that do not return block IDs above 255 should not implement
|
||||
* this method, or should have it return null (which will result in the
|
||||
* generateBlockSections() method being called).
|
||||
@ -143,10 +143,10 @@ public abstract class ChunkGenerator {
|
||||
|
||||
/**
|
||||
* Shapes the chunk for the given coordinates.
|
||||
* <p />
|
||||
* <p>
|
||||
* As of 1.2, chunks are represented by a vertical array of chunk sections, each of which is 16 x 16 x 16 blocks. If a section
|
||||
* is empty (all zero), the section does not need to be supplied, reducing memory usage.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method must return a byte[][] array in the following format:
|
||||
* <pre>
|
||||
* byte[][] result = new byte[world-height / 16][];
|
||||
@ -156,7 +156,7 @@ public abstract class ChunkGenerator {
|
||||
* result[sectionID] = new byte[4096];
|
||||
* </pre>
|
||||
* while sections that are not populated can be left null.
|
||||
* <p />
|
||||
* <p>
|
||||
* Setting a block at X, Y, Z within the chunk can be done with the following mapping function:
|
||||
* <pre>
|
||||
* void setBlock(byte[][] result, int x, int y, int z, byte blkid) {
|
||||
@ -224,7 +224,7 @@ public abstract class ChunkGenerator {
|
||||
|
||||
/**
|
||||
* Gets a fixed spawn location to use for a given world.
|
||||
* <p />
|
||||
* <p>
|
||||
* A null value is returned if a world should not use a fixed spawn point,
|
||||
* and will instead attempt to find one randomly.
|
||||
*
|
||||
|
@ -97,7 +97,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Gets the chance of the currently held item being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
@ -107,7 +107,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Sets the chance of the item this creature is currently holding being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
@ -118,7 +118,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Gets the chance of the helmet being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
@ -128,7 +128,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Sets the chance of the helmet being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
@ -139,7 +139,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Gets the chance of the chest plate being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
@ -149,7 +149,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Sets the chance of the chest plate being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
@ -160,7 +160,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Gets the chance of the leggings being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
@ -170,7 +170,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Sets the chance of the leggings being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
@ -181,7 +181,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Gets the chance of the boots being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
@ -191,7 +191,7 @@ public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Sets the chance of the boots being dropped upon this creature's death
|
||||
* <p />
|
||||
* <p>
|
||||
* <li />A drop chance of 0F will never drop
|
||||
* <li />A drop chance of 1F will always drop
|
||||
*
|
||||
|
@ -29,7 +29,7 @@ public interface Inventory extends Iterable<ItemStack> {
|
||||
|
||||
/**
|
||||
* This method allows you to change the maximum stack size for an inventory.
|
||||
* <p /><b>Caveats:</b>
|
||||
* <p><b>Caveats:</b>
|
||||
* <ul>
|
||||
* <li>Not all inventories respect this value.
|
||||
* <li>Stacks larger than 127 may be clipped when the world is saved.
|
||||
@ -68,12 +68,12 @@ public interface Inventory extends Iterable<ItemStack> {
|
||||
/**
|
||||
* Stores the given ItemStacks in the inventory.
|
||||
* This will try to fill existing stacks and empty slots as well as it can.
|
||||
* <p />
|
||||
* <p>
|
||||
* The returned HashMap contains what it couldn't store, where the key is the
|
||||
* index of the parameter, and the value is the ItemStack at that index
|
||||
* of the varargs parameter. If all items are stored, it will return an
|
||||
* empty HashMap.
|
||||
* <p />
|
||||
* <p>
|
||||
* If you pass in ItemStacks which exceed the maximum stack size for the
|
||||
* Material, first they will be added to partial stacks where
|
||||
* Material.getMaxStackSize() is not exceeded, up to
|
||||
@ -89,10 +89,10 @@ public interface Inventory extends Iterable<ItemStack> {
|
||||
|
||||
/**
|
||||
* Removes the given ItemStacks from the inventory.
|
||||
* <p />
|
||||
* <p>
|
||||
* It will try to remove 'as much as possible' from the types and amounts you
|
||||
* give as arguments.
|
||||
* <p />
|
||||
* <p>
|
||||
* The returned HashMap contains what it couldn't remove, where the key is the
|
||||
* index of the parameter, and the value is the ItemStack at that index of the
|
||||
* varargs parameter. If all the given ItemStacks are removed, it will return
|
||||
@ -187,7 +187,7 @@ public interface Inventory extends Iterable<ItemStack> {
|
||||
/**
|
||||
* Returns a HashMap with all slots and ItemStacks in the inventory with
|
||||
* given materialId.
|
||||
* <p />
|
||||
* <p>
|
||||
* The HashMap contains entries where, the key is the slot index, and the
|
||||
* value is the ItemStack in that slot. If no matching ItemStack with the
|
||||
* given materialId is found, an empty map is returned.
|
||||
@ -200,7 +200,7 @@ public interface Inventory extends Iterable<ItemStack> {
|
||||
/**
|
||||
* Returns a HashMap with all slots and ItemStacks in the inventory with
|
||||
* the given Material.
|
||||
* <p />
|
||||
* <p>
|
||||
* The HashMap contains entries where, the key is the slot index, and the
|
||||
* value is the ItemStack in that slot. If no matching ItemStack with the
|
||||
* given Material is found, an empty map is returned.
|
||||
@ -214,7 +214,7 @@ public interface Inventory extends Iterable<ItemStack> {
|
||||
/**
|
||||
* Finds all slots in the inventory containing any ItemStacks with the given ItemStack
|
||||
* This will only match slots if both the type and the amount of the stack match
|
||||
* <p />
|
||||
* <p>
|
||||
* The HashMap contains entries where, the key is the
|
||||
* slot index, and the value is the ItemStack in that slot. If no matching
|
||||
* ImemStrack with the given Material is found, an empty map is returned.
|
||||
|
@ -88,7 +88,7 @@ public abstract class InventoryView {
|
||||
|
||||
/**
|
||||
* Sets one item in this inventory view by its raw slot ID.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note: If slot ID -999 is chosen, it may be expected that the item is
|
||||
* dropped on the ground. This is not required behaviour, however.
|
||||
* @param slot The ID as returned by InventoryClickEvent.getRawSlot()
|
||||
|
@ -148,7 +148,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Sets the type of this item
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that in doing so you will reset the MaterialData for this stack
|
||||
*
|
||||
* @param type New type to set the items in this stack to
|
||||
@ -170,7 +170,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Sets the type id of this item
|
||||
* <p />
|
||||
* <p>
|
||||
* Note that in doing so you will reset the MaterialData for this stack
|
||||
*
|
||||
* @param type New type id to set the items in this stack to
|
||||
@ -381,7 +381,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Adds the specified enchantments to this item stack.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is the same as calling {@link #addEnchantment(org.bukkit.enchantments.Enchantment, int)}
|
||||
* for each element of the map.
|
||||
*
|
||||
@ -400,7 +400,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Adds the specified {@link Enchantment} to this item stack.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this item stack already contained the given enchantment (at any level), it will be replaced.
|
||||
*
|
||||
* @param ench Enchantment to add
|
||||
@ -421,7 +421,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Adds the specified enchantments to this item stack in an unsafe manner.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is the same as calling {@link #addUnsafeEnchantment(org.bukkit.enchantments.Enchantment, int)}
|
||||
* for each element of the map.
|
||||
*
|
||||
@ -436,9 +436,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Adds the specified {@link Enchantment} to this item stack.
|
||||
* <p />
|
||||
* <p>
|
||||
* If this item stack already contained the given enchantment (at any level), it will be replaced.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method is unsafe and will ignore level restrictions or item type. Use at your own
|
||||
* discretion.
|
||||
*
|
||||
|
@ -25,7 +25,7 @@ public interface Permissible extends ServerOperator {
|
||||
|
||||
/**
|
||||
* Gets the value of the specified permission, if set.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a permission override is not set on this object, the default value of the permission will be returned.
|
||||
*
|
||||
* @param name Name of the permission
|
||||
@ -35,7 +35,7 @@ public interface Permissible extends ServerOperator {
|
||||
|
||||
/**
|
||||
* Gets the value of the specified permission, if set.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a permission override is not set on this object, the default value of the permission will be returned
|
||||
*
|
||||
* @param perm Permission to get
|
||||
@ -91,7 +91,7 @@ public interface Permissible extends ServerOperator {
|
||||
|
||||
/**
|
||||
* Recalculates the permissions for this object, if the attachments have changed values.
|
||||
* <p />
|
||||
* <p>
|
||||
* This should very rarely need to be called from a plugin.
|
||||
*/
|
||||
public void recalculatePermissions();
|
||||
|
@ -96,7 +96,7 @@ public class Permission {
|
||||
|
||||
/**
|
||||
* Sets the default value of this permission.
|
||||
* <p />
|
||||
* <p>
|
||||
* This will not be saved to disk, and is a temporary operation until the server reloads permissions.
|
||||
* Changing this default will cause all {@link Permissible}s that contain this permission to recalculate their permissions
|
||||
*
|
||||
@ -122,7 +122,7 @@ public class Permission {
|
||||
|
||||
/**
|
||||
* Sets the description of this permission.
|
||||
* <p />
|
||||
* <p>
|
||||
* This will not be saved to disk, and is a temporary operation until the server reloads permissions.
|
||||
*
|
||||
* @param value The new description to set
|
||||
@ -137,7 +137,7 @@ public class Permission {
|
||||
|
||||
/**
|
||||
* Gets a set containing every {@link Permissible} that has this permission.
|
||||
* <p />
|
||||
* <p>
|
||||
* This set cannot be modified.
|
||||
*
|
||||
* @return Set containing permissibles with this permission
|
||||
@ -148,7 +148,7 @@ public class Permission {
|
||||
|
||||
/**
|
||||
* Recalculates all {@link Permissible}s that contain this permission.
|
||||
* <p />
|
||||
* <p>
|
||||
* This should be called after modifying the children, and is automatically called after modifying the default value
|
||||
*/
|
||||
public void recalculatePermissibles() {
|
||||
@ -163,7 +163,7 @@ public class Permission {
|
||||
|
||||
/**
|
||||
* Adds this permission to the specified parent permission.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the parent permission does not exist, it will be created and registered.
|
||||
*
|
||||
* @param name Name of the parent permission
|
||||
@ -199,7 +199,7 @@ public class Permission {
|
||||
|
||||
/**
|
||||
* Loads a list of Permissions from a map of data, usually used from retrieval from a yaml file.
|
||||
* <p />
|
||||
* <p>
|
||||
* The data may contain a list of name:data, where the data contains the following keys:
|
||||
* default: Boolean true or false. If not specified, false.
|
||||
* children: Map<String, Boolean> of child permissions. If not specified, empty list.
|
||||
@ -226,7 +226,7 @@ public class Permission {
|
||||
|
||||
/**
|
||||
* Loads a Permission from a map of data, usually used from retrieval from a yaml file.
|
||||
* <p />
|
||||
* <p>
|
||||
* The data may contain the following keys:
|
||||
* default: Boolean true or false. If not specified, false.
|
||||
* children: Map<String, Boolean> of child permissions. If not specified, empty list.
|
||||
@ -242,7 +242,7 @@ public class Permission {
|
||||
|
||||
/**
|
||||
* Loads a Permission from a map of data, usually used from retrieval from a yaml file.
|
||||
* <p />
|
||||
* <p>
|
||||
* The data may contain the following keys:
|
||||
* default: Boolean true or false. If not specified, false.
|
||||
* children: Map<String, Boolean> of child permissions. If not specified, empty list.
|
||||
|
@ -62,7 +62,7 @@ public class PermissionAttachment {
|
||||
|
||||
/**
|
||||
* Gets a copy of all set permissions and values contained within this attachment.
|
||||
* <p />
|
||||
* <p>
|
||||
* This map may be modified but will not affect the attachment, as it is a copy.
|
||||
*
|
||||
* @return Copy of all permissions and values expressed by this attachment
|
||||
@ -94,7 +94,7 @@ public class PermissionAttachment {
|
||||
|
||||
/**
|
||||
* Removes the specified permission from this attachment.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the permission does not exist in this attachment, nothing will happen.
|
||||
*
|
||||
* @param name Name of the permission to remove
|
||||
@ -106,7 +106,7 @@ public class PermissionAttachment {
|
||||
|
||||
/**
|
||||
* Removes the specified permission from this attachment.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the permission does not exist in this attachment, nothing will happen.
|
||||
*
|
||||
* @param perm Permission to remove
|
||||
|
@ -13,7 +13,7 @@ import com.avaje.ebean.EbeanServer;
|
||||
|
||||
/**
|
||||
* Represents a Plugin
|
||||
* <p />
|
||||
* <p>
|
||||
* The use of {@link PluginBase} is recommended for actual Implementation
|
||||
*/
|
||||
public interface Plugin extends TabExecutor {
|
||||
@ -34,7 +34,7 @@ public interface Plugin extends TabExecutor {
|
||||
|
||||
/**
|
||||
* Gets a {@link FileConfiguration} for this plugin, read through "config.yml"
|
||||
* <p />
|
||||
* <p>
|
||||
* If there is a default config.yml embedded in this plugin, it will be provided
|
||||
* as a default for this Configuration.
|
||||
*
|
||||
|
@ -2,7 +2,7 @@ package org.bukkit.plugin;
|
||||
|
||||
/**
|
||||
* Represents a base {@link Plugin}
|
||||
* <p />
|
||||
* <p>
|
||||
* Extend this class if your plugin is not a {@link org.bukkit.plugin.java.JavaPlugin}
|
||||
*/
|
||||
public abstract class PluginBase implements Plugin {
|
||||
|
@ -52,7 +52,7 @@ public interface PluginLoader {
|
||||
|
||||
/**
|
||||
* Enables the specified plugin
|
||||
* <p />
|
||||
* <p>
|
||||
* Attempting to enable a plugin that is already enabled will have no effect
|
||||
*
|
||||
* @param plugin Plugin to enable
|
||||
@ -61,7 +61,7 @@ public interface PluginLoader {
|
||||
|
||||
/**
|
||||
* Disables the specified plugin
|
||||
* <p />
|
||||
* <p>
|
||||
* Attempting to disable a plugin that is not enabled will have no effect
|
||||
*
|
||||
* @param plugin Plugin to disable
|
||||
|
@ -24,7 +24,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Checks if the given plugin is loaded and returns it when applicable
|
||||
* <p />
|
||||
* <p>
|
||||
* Please note that the name of the plugin is case-sensitive
|
||||
*
|
||||
* @param name Name of the plugin to check
|
||||
@ -41,7 +41,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Checks if the given plugin is enabled or not
|
||||
* <p />
|
||||
* <p>
|
||||
* Please note that the name of the plugin is case-sensitive.
|
||||
*
|
||||
* @param name Name of the plugin to check
|
||||
@ -59,7 +59,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Loads the plugin in the specified file
|
||||
* <p />
|
||||
* <p>
|
||||
* File must be valid according to the current enabled Plugin interfaces
|
||||
*
|
||||
* @param file File containing the plugin to load
|
||||
@ -131,7 +131,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Enables the specified plugin
|
||||
* <p />
|
||||
* <p>
|
||||
* Attempting to enable a plugin that is already enabled will have no effect
|
||||
*
|
||||
* @param plugin Plugin to enable
|
||||
@ -140,7 +140,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Disables the specified plugin
|
||||
* <p />
|
||||
* <p>
|
||||
* Attempting to disable a plugin that is not enabled will have no effect
|
||||
*
|
||||
* @param plugin Plugin to disable
|
||||
@ -157,7 +157,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Adds a {@link Permission} to this plugin manager.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a permission is already defined with the given name of the new permission,
|
||||
* an exception will be thrown.
|
||||
*
|
||||
@ -168,9 +168,9 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Removes a {@link Permission} registration from this plugin manager.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the specified permission does not exist in this plugin manager, nothing will happen.
|
||||
* <p />
|
||||
* <p>
|
||||
* Removing a permission registration will <b>not</b> remove the permission from any {@link Permissible}s that have it.
|
||||
*
|
||||
* @param perm Permission to remove
|
||||
@ -179,9 +179,9 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Removes a {@link Permission} registration from this plugin manager.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the specified permission does not exist in this plugin manager, nothing will happen.
|
||||
* <p />
|
||||
* <p>
|
||||
* Removing a permission registration will <b>not</b> remove the permission from any {@link Permissible}s that have it.
|
||||
*
|
||||
* @param name Permission to remove
|
||||
@ -198,7 +198,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Recalculates the defaults for the given {@link Permission}.
|
||||
* <p />
|
||||
* <p>
|
||||
* This will have no effect if the specified permission is not registered here.
|
||||
*
|
||||
* @param perm Permission to recalculate
|
||||
@ -207,7 +207,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Subscribes the given Permissible for information about the requested Permission, by name.
|
||||
* <p />
|
||||
* <p>
|
||||
* If the specified Permission changes in any form, the Permissible will be asked to recalculate.
|
||||
*
|
||||
* @param permission Permission to subscribe to
|
||||
@ -233,7 +233,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Subscribes to the given Default permissions by operator status
|
||||
* <p />
|
||||
* <p>
|
||||
* If the specified defaults change in any form, the Permissible will be asked to recalculate.
|
||||
*
|
||||
* @param op Default list to subscribe to
|
||||
@ -259,7 +259,7 @@ public interface PluginManager {
|
||||
|
||||
/**
|
||||
* Gets a set of all registered permissions.
|
||||
* <p />
|
||||
* <p>
|
||||
* This set is a copy and will not be modified live.
|
||||
*
|
||||
* @return Set containing all current registered permissions
|
||||
|
@ -279,7 +279,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
/**
|
||||
* Loads the plugin in the specified file
|
||||
* <p />
|
||||
* <p>
|
||||
* File must be valid according to the current enabled Plugin interfaces
|
||||
*
|
||||
* @param file File containing the plugin to load
|
||||
@ -327,7 +327,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
/**
|
||||
* Checks if the given plugin is loaded and returns it when applicable
|
||||
* <p />
|
||||
* <p>
|
||||
* Please note that the name of the plugin is case-sensitive
|
||||
*
|
||||
* @param name Name of the plugin to check
|
||||
@ -343,7 +343,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
/**
|
||||
* Checks if the given plugin is enabled or not
|
||||
* <p />
|
||||
* <p>
|
||||
* Please note that the name of the plugin is case-sensitive.
|
||||
*
|
||||
* @param name Name of the plugin to check
|
||||
|
@ -223,7 +223,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
|
||||
/**
|
||||
* Initializes this plugin with the given variables.
|
||||
* <p />
|
||||
* <p>
|
||||
* This method should never be called manually.
|
||||
*
|
||||
* @param loader PluginLoader that is responsible for this plugin
|
||||
|
@ -161,7 +161,7 @@ public interface Messenger {
|
||||
|
||||
/**
|
||||
* Checks if the specified plugin message listener registration is valid.
|
||||
* <p />
|
||||
* <p>
|
||||
* A registration is considered valid if it has not be unregistered and that the plugin
|
||||
* is still enabled.
|
||||
*
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.plugin.Plugin;
|
||||
public interface PluginMessageRecipient {
|
||||
/**
|
||||
* Sends this recipient a Plugin Message on the specified outgoing channel.
|
||||
* <p />
|
||||
* <p>
|
||||
* The message may not be larger than {@link Messenger#MAX_MESSAGE_SIZE} bytes, and the plugin must be registered to send
|
||||
* messages on the specified channel.
|
||||
*
|
||||
|
@ -212,7 +212,7 @@ public abstract class PotionEffectType {
|
||||
|
||||
/**
|
||||
* Registers an effect type with the given object.
|
||||
* <p />
|
||||
* <p>
|
||||
* Generally not to be used from within a plugin.
|
||||
*
|
||||
* @param type PotionType to register
|
||||
|
@ -91,7 +91,7 @@ public interface BukkitScheduler {
|
||||
/**
|
||||
* Calls a method on the main thread and returns a Future object
|
||||
* This task will be executed by the main server thread.
|
||||
* <p />
|
||||
* <p>
|
||||
* Note: The Future.get() methods must NOT be called from the main thread.
|
||||
* Note2: There is at least an average of 10ms latency until the isDone() method returns true.
|
||||
*
|
||||
@ -123,33 +123,33 @@ public interface BukkitScheduler {
|
||||
|
||||
/**
|
||||
* Check if the task currently running.
|
||||
* <p />
|
||||
* <p>
|
||||
* A repeating task might not be running currently, but will be running in the future.
|
||||
* A task that has finished, and does not repeat, will not be running ever again.
|
||||
* <p />
|
||||
* <p>
|
||||
* Explicitly, a task is running if there exists a thread for it, and that thread is alive.
|
||||
*
|
||||
* @param taskId The task to check.
|
||||
* <p />
|
||||
* <p>
|
||||
* @return If the task is currently running.
|
||||
*/
|
||||
public boolean isCurrentlyRunning(int taskId);
|
||||
|
||||
/**
|
||||
* Check if the task queued to be run later.
|
||||
* <p />
|
||||
* <p>
|
||||
* If a repeating task is currently running, it might not be queued now but could be in the future.
|
||||
* A task that is not queued, and not running, will not be queued again.
|
||||
*
|
||||
* @param taskId The task to check.
|
||||
* <p />
|
||||
* <p>
|
||||
* @return If the task is queued to be run.
|
||||
*/
|
||||
public boolean isQueued(int taskId);
|
||||
|
||||
/**
|
||||
* Returns a list of all active workers.
|
||||
* <p />
|
||||
* <p>
|
||||
* This list contains asynch tasks that are being executed by separate threads.
|
||||
*
|
||||
* @return Active workers
|
||||
|
@ -279,7 +279,7 @@ public class Vector implements Cloneable, ConfigurationSerializable {
|
||||
/**
|
||||
* Calculates the cross product of this vector with another. The cross
|
||||
* product is defined as:
|
||||
* <p />
|
||||
* <p>
|
||||
* x = y1 * z2 - y2 * z1<br/>
|
||||
* y = z1 * x2 - z2 * x1<br/>
|
||||
* z = x1 * y2 - x2 * y1
|
||||
@ -507,7 +507,7 @@ public class Vector implements Cloneable, ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Checks to see if two objects are equal.
|
||||
* <p />
|
||||
* <p>
|
||||
* Only two Vectors can ever return true. This method uses a fuzzy match
|
||||
* to account for floating point errors. The epsilon can be retrieved
|
||||
* with epsilon.
|
||||
|
@ -15,7 +15,7 @@ public abstract class OctaveGenerator {
|
||||
|
||||
/**
|
||||
* Sets the scale used for all coordinates passed to this generator.
|
||||
* <p />
|
||||
* <p>
|
||||
* This is the equivalent to setting each coordinate to the specified value.
|
||||
*
|
||||
* @param scale New value to scale each coordinate by
|
||||
|
@ -5,7 +5,7 @@ import org.bukkit.World;
|
||||
|
||||
/**
|
||||
* Generates simplex-based noise.
|
||||
* <p />
|
||||
* <p>
|
||||
* This is a modified version of the freely published version in the paper by
|
||||
* Stefan Gustavson at http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user