diff options
author | Wesley Wolfe <weswolf@aol.com> | 2013-08-19 13:32:18 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-08-28 01:44:09 -0500 |
commit | 9620ac7d3e5517511314c3284b99f391732e3b33 (patch) | |
tree | cfb218a7621d59475d6422cf482b6b54166c4622 /src/main/java/org | |
parent | 83ba0892829c5b801c6f07a7664bec1fdfe7299a (diff) | |
download | bukkit-9620ac7d3e5517511314c3284b99f391732e3b33.tar bukkit-9620ac7d3e5517511314c3284b99f391732e3b33.tar.gz bukkit-9620ac7d3e5517511314c3284b99f391732e3b33.tar.lz bukkit-9620ac7d3e5517511314c3284b99f391732e3b33.tar.xz bukkit-9620ac7d3e5517511314c3284b99f391732e3b33.zip |
Deprecate magic values
Diffstat (limited to 'src/main/java/org')
108 files changed, 1194 insertions, 11 deletions
diff --git a/src/main/java/org/bukkit/Achievement.java b/src/main/java/org/bukkit/Achievement.java index 98dbcd17..dcc695e3 100644 --- a/src/main/java/org/bukkit/Achievement.java +++ b/src/main/java/org/bukkit/Achievement.java @@ -53,7 +53,9 @@ public enum Achievement { * Note that this is offset using {@link #STATISTIC_OFFSET} * * @return ID of this achievement + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -65,7 +67,9 @@ public enum Achievement { * * @param id ID of the achievement to return * @return Achievement with the given ID + * @deprecated Magic value */ + @Deprecated public static Achievement getById(int id) { return BY_ID.get(id); } diff --git a/src/main/java/org/bukkit/Art.java b/src/main/java/org/bukkit/Art.java index 049e1a18..ba66f163 100644 --- a/src/main/java/org/bukkit/Art.java +++ b/src/main/java/org/bukkit/Art.java @@ -69,7 +69,9 @@ public enum Art { * Get the ID of this painting. * * @return The ID of this painting + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -79,7 +81,9 @@ public enum Art { * * @param id The ID * @return The painting + * @deprecated Magic value */ + @Deprecated public static Art getById(int id) { return BY_ID.get(id); } diff --git a/src/main/java/org/bukkit/BlockChangeDelegate.java b/src/main/java/org/bukkit/BlockChangeDelegate.java index 73410605..8a439935 100644 --- a/src/main/java/org/bukkit/BlockChangeDelegate.java +++ b/src/main/java/org/bukkit/BlockChangeDelegate.java @@ -16,7 +16,9 @@ public interface BlockChangeDelegate { * @param z Z coordinate * @param typeId New block ID * @return true if the block was set successfully + * @deprecated Magic value */ + @Deprecated public boolean setRawTypeId(int x, int y, int z, int typeId); /** @@ -29,7 +31,9 @@ public interface BlockChangeDelegate { * @param typeId New block ID * @param data Block data * @return true if the block was set successfully + * @deprecated Magic value */ + @Deprecated public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data); /** @@ -41,7 +45,9 @@ public interface BlockChangeDelegate { * @param z Z coordinate * @param typeId New block ID * @return true if the block was set successfully + * @deprecated Magic value */ + @Deprecated public boolean setTypeId(int x, int y, int z, int typeId); /** @@ -54,7 +60,9 @@ public interface BlockChangeDelegate { * @param typeId New block ID * @param data Block data * @return true if the block was set successfully + * @deprecated Magic value */ + @Deprecated public boolean setTypeIdAndData(int x, int y, int z, int typeId, int data); /** @@ -64,7 +72,9 @@ public interface BlockChangeDelegate { * @param y Y coordinate * @param z Z coordinate * @return The block ID + * @deprecated Magic value */ + @Deprecated public int getTypeId(int x, int y, int z); /** diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java index f389fc0c..7a9502a2 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -256,7 +256,9 @@ public final class Bukkit { /** * @see Server#getMap(short id) + * @deprecated Magic value */ + @Deprecated public static MapView getMap(short id) { return server.getMap(id); } diff --git a/src/main/java/org/bukkit/ChunkSnapshot.java b/src/main/java/org/bukkit/ChunkSnapshot.java index 45aa9f3e..289df00f 100644 --- a/src/main/java/org/bukkit/ChunkSnapshot.java +++ b/src/main/java/org/bukkit/ChunkSnapshot.java @@ -36,7 +36,9 @@ public interface ChunkSnapshot { * @param y 0-127 * @param z 0-15 * @return 0-255 + * @deprecated Magic value */ + @Deprecated int getBlockTypeId(int x, int y, int z); /** @@ -46,7 +48,9 @@ public interface ChunkSnapshot { * @param y 0-127 * @param z 0-15 * @return 0-15 + * @deprecated Magic value */ + @Deprecated int getBlockData(int x, int y, int z); /** diff --git a/src/main/java/org/bukkit/CoalType.java b/src/main/java/org/bukkit/CoalType.java index 70404c11..9eb0231c 100644 --- a/src/main/java/org/bukkit/CoalType.java +++ b/src/main/java/org/bukkit/CoalType.java @@ -22,7 +22,9 @@ public enum CoalType { * Gets the associated data value representing this type of coal * * @return A byte containing the data value of this coal type + * @deprecated Magic value */ + @Deprecated public byte getData() { return data; } @@ -34,7 +36,9 @@ public enum CoalType { * Data value to fetch * @return The {@link CoalType} representing the given value, or null if * it doesn't exist + * @deprecated Magic value */ + @Deprecated public static CoalType getByData(final byte data) { return BY_DATA.get(data); } diff --git a/src/main/java/org/bukkit/CropState.java b/src/main/java/org/bukkit/CropState.java index 96ba24d8..8f2e62b8 100644 --- a/src/main/java/org/bukkit/CropState.java +++ b/src/main/java/org/bukkit/CropState.java @@ -53,7 +53,9 @@ public enum CropState { * Gets the associated data value representing this growth state * * @return A byte containing the data value of this growth state + * @deprecated Magic value */ + @Deprecated public byte getData() { return data; } @@ -65,7 +67,9 @@ public enum CropState { * Data value to fetch * @return The {@link CropState} representing the given value, or null if * it doesn't exist + * @deprecated Magic value */ + @Deprecated public static CropState getByData(final byte data) { return BY_DATA.get(data); } diff --git a/src/main/java/org/bukkit/Difficulty.java b/src/main/java/org/bukkit/Difficulty.java index cc885e08..3463f981 100644 --- a/src/main/java/org/bukkit/Difficulty.java +++ b/src/main/java/org/bukkit/Difficulty.java @@ -39,7 +39,9 @@ public enum Difficulty { * Gets the difficulty value associated with this Difficulty. * * @return An integer value of this difficulty + * @deprecated Magic value */ + @Deprecated public int getValue() { return value; } @@ -49,7 +51,9 @@ public enum Difficulty { * * @param value Value to check * @return Associative {@link Difficulty} with the given value, or null if it doesn't exist + * @deprecated Magic value */ + @Deprecated public static Difficulty getByValue(final int value) { return BY_ID.get(value); } diff --git a/src/main/java/org/bukkit/DyeColor.java b/src/main/java/org/bukkit/DyeColor.java index 58f517b8..d968a65d 100644 --- a/src/main/java/org/bukkit/DyeColor.java +++ b/src/main/java/org/bukkit/DyeColor.java @@ -108,7 +108,9 @@ public enum DyeColor { * * @return A byte containing the wool data value of this color * @see #getDyeData() + * @deprecated Magic value */ + @Deprecated public byte getWoolData() { return woolData; } @@ -118,7 +120,9 @@ public enum DyeColor { * * @return A byte containing the dye data value of this color * @see #getWoolData() + * @deprecated Magic value */ + @Deprecated public byte getDyeData() { return dyeData; } @@ -161,7 +165,9 @@ public enum DyeColor { * @param data Wool data value to fetch * @return The {@link DyeColor} representing the given value, or null if it doesn't exist * @see #getByDyeData(byte) + * @deprecated Magic value */ + @Deprecated public static DyeColor getByWoolData(final byte data) { int i = 0xff & data; if (i >= BY_WOOL_DATA.length) { @@ -176,7 +182,9 @@ public enum DyeColor { * @param data Dye data value to fetch * @return The {@link DyeColor} representing the given value, or null if it doesn't exist * @see #getByWoolData(byte) + * @deprecated Magic value */ + @Deprecated public static DyeColor getByDyeData(final byte data) { int i = 0xff & data; if (i >= BY_DYE_DATA.length) { diff --git a/src/main/java/org/bukkit/Effect.java b/src/main/java/org/bukkit/Effect.java index 175750fa..708bee92 100644 --- a/src/main/java/org/bukkit/Effect.java +++ b/src/main/java/org/bukkit/Effect.java @@ -99,7 +99,9 @@ public enum Effect { * Gets the ID for this effect. * * @return ID of this effect + * @deprecated Magic value */ + @Deprecated public int getId() { return this.id; } @@ -123,7 +125,9 @@ public enum Effect { * * @param id ID of the Effect to return * @return Effect with the given ID + * @deprecated Magic value */ + @Deprecated public static Effect getById(int id) { return BY_ID.get(id); } diff --git a/src/main/java/org/bukkit/EntityEffect.java b/src/main/java/org/bukkit/EntityEffect.java index 82d96f67..ad2c7423 100644 --- a/src/main/java/org/bukkit/EntityEffect.java +++ b/src/main/java/org/bukkit/EntityEffect.java @@ -58,7 +58,9 @@ public enum EntityEffect { * Gets the data value of this EntityEffect * * @return The data value + * @deprecated Magic value */ + @Deprecated public byte getData() { return data; } @@ -68,7 +70,9 @@ public enum EntityEffect { * * @param data Data value to fetch * @return The {@link EntityEffect} representing the given value, or null if it doesn't exist + * @deprecated Magic value */ + @Deprecated public static EntityEffect getByData(final byte data) { return BY_DATA.get(data); } diff --git a/src/main/java/org/bukkit/GameMode.java b/src/main/java/org/bukkit/GameMode.java index 46ba7f2d..5b83d88f 100644 --- a/src/main/java/org/bukkit/GameMode.java +++ b/src/main/java/org/bukkit/GameMode.java @@ -36,7 +36,9 @@ public enum GameMode { * Gets the mode value associated with this GameMode * * @return An integer value of this gamemode + * @deprecated Magic value */ + @Deprecated public int getValue() { return value; } @@ -46,7 +48,9 @@ public enum GameMode { * * @param value Value to check * @return Associative {@link GameMode} with the given value, or null if it doesn't exist + * @deprecated Magic value */ + @Deprecated public static GameMode getByValue(final int value) { return BY_ID.get(value); } diff --git a/src/main/java/org/bukkit/GrassSpecies.java b/src/main/java/org/bukkit/GrassSpecies.java index 3f2cce42..c2b0aeb3 100644 --- a/src/main/java/org/bukkit/GrassSpecies.java +++ b/src/main/java/org/bukkit/GrassSpecies.java @@ -33,7 +33,9 @@ public enum GrassSpecies { * Gets the associated data value representing this species * * @return A byte containing the data value of this grass species + * @deprecated Magic value */ + @Deprecated public byte getData() { return data; } @@ -45,7 +47,9 @@ public enum GrassSpecies { * Data value to fetch * @return The {@link GrassSpecies} representing the given value, or null if * it doesn't exist + * @deprecated Magic value */ + @Deprecated public static GrassSpecies getByData(final byte data) { return BY_DATA.get(data); } diff --git a/src/main/java/org/bukkit/Instrument.java b/src/main/java/org/bukkit/Instrument.java index a6806ead..dc7b4a0e 100644 --- a/src/main/java/org/bukkit/Instrument.java +++ b/src/main/java/org/bukkit/Instrument.java @@ -36,7 +36,9 @@ public enum Instrument { /** * @return The type ID of this instrument. + * @deprecated Magic value */ + @Deprecated public byte getType() { return this.type; } @@ -46,7 +48,9 @@ public enum Instrument { * * @param type The type ID * @return The instrument + * @deprecated Magic value */ + @Deprecated public static Instrument getByType(final byte type) { return BY_DATA.get(type); } diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java index 86d1baa2..0b8765dc 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -16,7 +16,6 @@ import org.bukkit.material.Command; import org.bukkit.material.Crops; import org.bukkit.material.DetectorRail; import org.bukkit.material.Diode; -import org.bukkit.material.DirectionalContainer; import org.bukkit.material.Dispenser; import org.bukkit.material.Door; import org.bukkit.material.Dye; @@ -451,7 +450,9 @@ public enum Material { * Gets the item ID or block ID of this Material * * @return ID of this material + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -489,7 +490,9 @@ public enum Material { * * @param raw Initial data to construct the MaterialData with * @return New MaterialData with the given data + * @deprecated Magic value */ + @Deprecated public MaterialData getNewData(final byte raw) { try { return ctor.newInstance(id, raw); @@ -556,7 +559,9 @@ public enum Material { * * @param id ID of the material to get * @return Material if found, or null + * @deprecated Magic value */ + @Deprecated public static Material getMaterial(final int id) { if (byId.length > id && id >= 0) { return byId[id]; @@ -580,7 +585,9 @@ public enum Material { /** * Attempts to match the Material with the given name. * This is a match lookup; names will be converted to uppercase, then stripped - * of special characters in an attempt to format it like the enum + * of special characters in an attempt to format it like the enum. + * <p> + * Using this for match by ID is deprecated. * * @param name Name of the material to get * @return Material if found, or null diff --git a/src/main/java/org/bukkit/Note.java b/src/main/java/org/bukkit/Note.java index e1102e49..3a41ea49 100644 --- a/src/main/java/org/bukkit/Note.java +++ b/src/main/java/org/bukkit/Note.java @@ -39,7 +39,9 @@ public class Note { * Returns the not sharped id of this tone. * * @return the not sharped id of this tone. + * @deprecated Magic value */ + @Deprecated public byte getId() { return getId(false); } @@ -51,7 +53,9 @@ public class Note { * * @param sharped Set to true to return the sharped id. * @return the id of this tone. + * @deprecated Magic value */ + @Deprecated public byte getId(boolean sharped) { byte id = (byte) (sharped && sharpable ? this.id + 1 : this.id); @@ -73,7 +77,9 @@ public class Note { * @param id the id of the tone. * @return if the tone id is the sharped id of the tone. * @throws IllegalArgumentException if neither the tone nor the semitone have the id. + * @deprecated Magic value */ + @Deprecated public boolean isSharped(byte id) { if (id == getId(false)) { return false; @@ -90,7 +96,9 @@ public class Note { * * @param id the id of the tone. * @return the tone to id. + * @deprecated Magic value */ + @Deprecated public static Tone getById(byte id) { return BY_DATA.get(id); } @@ -197,7 +205,9 @@ public class Note { * Returns the internal id of this note. * * @return the internal id of this note. + * @deprecated Magic value */ + @Deprecated public byte getId() { return note; } diff --git a/src/main/java/org/bukkit/SandstoneType.java b/src/main/java/org/bukkit/SandstoneType.java index 79f8ecf5..cba1c2a8 100644 --- a/src/main/java/org/bukkit/SandstoneType.java +++ b/src/main/java/org/bukkit/SandstoneType.java @@ -23,7 +23,9 @@ public enum SandstoneType { * Gets the associated data value representing this type of sandstone * * @return A byte containing the data value of this sandstone type + * @deprecated Magic value */ + @Deprecated public byte getData() { return data; } @@ -35,7 +37,9 @@ public enum SandstoneType { * Data value to fetch * @return The {@link SandstoneType} representing the given value, or null if * it doesn't exist + * @deprecated Magic value */ + @Deprecated public static SandstoneType getByData(final byte data) { return BY_DATA.get(data); } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index 7e8b80ed..aa45f162 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -36,6 +36,7 @@ import org.bukkit.inventory.meta.ItemMeta; * Represents a server implementation */ public interface Server extends PluginMessageRecipient { + /** * Used for all administrative messages, such as an operator using a command. * <p> @@ -356,7 +357,9 @@ public interface Server extends PluginMessageRecipient { * * @param id ID of the map to get. * @return The MapView if it exists, or null otherwise. + * @deprecated Magic value */ + @Deprecated public MapView getMap(short id); /** diff --git a/src/main/java/org/bukkit/Statistic.java b/src/main/java/org/bukkit/Statistic.java index c3665013..884fcb69 100644 --- a/src/main/java/org/bukkit/Statistic.java +++ b/src/main/java/org/bukkit/Statistic.java @@ -41,7 +41,9 @@ public enum Statistic { * Gets the ID for this statistic. * * @return ID of this statistic + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -71,7 +73,9 @@ public enum Statistic { * * @param id ID of the statistic to return * @return statistic with the given ID + * @deprecated Magic value */ + @Deprecated public static Statistic getById(int id) { return BY_ID.get(id); } diff --git a/src/main/java/org/bukkit/TreeSpecies.java b/src/main/java/org/bukkit/TreeSpecies.java index d40409ff..388668bd 100644 --- a/src/main/java/org/bukkit/TreeSpecies.java +++ b/src/main/java/org/bukkit/TreeSpecies.java @@ -37,7 +37,9 @@ public enum TreeSpecies { * Gets the associated data value representing this species * * @return A byte containing the data value of this tree species + * @deprecated Magic value */ + @Deprecated public byte getData() { return data; } @@ -48,7 +50,9 @@ public enum TreeSpecies { * @param data Data value to fetch * @return The {@link TreeSpecies} representing the given value, or null if * it doesn't exist + * @deprecated Magic value */ + @Deprecated public static TreeSpecies getByData(final byte data) { return BY_DATA.get(data); } diff --git a/src/main/java/org/bukkit/Warning.java b/src/main/java/org/bukkit/Warning.java index b1967f6b..e4187a9a 100644 --- a/src/main/java/org/bukkit/Warning.java +++ b/src/main/java/org/bukkit/Warning.java @@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableMap; @Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface Warning { + /** * This represents the states that server verbose for warnings may be. */ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index c86cfbc4..62fadda7 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -50,7 +50,9 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z-coordinate of the block * @return Type ID of the block at the given coordinates * @see #getBlockAt(int, int, int) Returns a live Block object at the given location + * @deprecated Magic value */ + @Deprecated public int getBlockTypeIdAt(int x, int y, int z); /** @@ -59,7 +61,9 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param location Location of the block * @return Type ID of the block at the given location * @see #getBlockAt(org.bukkit.Location) Returns a live Block object at the given location + * @deprecated Magic value */ + @Deprecated public int getBlockTypeIdAt(Location location); /** @@ -1094,7 +1098,9 @@ public interface World extends PluginMessageRecipient, Metadatable { * Gets the dimension ID of this environment * * @return dimension ID + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -1104,7 +1110,9 @@ public interface World extends PluginMessageRecipient, Metadatable { * * @param id The ID of the environment * @return The environment + * @deprecated Magic value */ + @Deprecated public static Environment getEnvironment(int id) { return lookup.get(id); } diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java index 96232a06..47a69d22 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -21,7 +21,9 @@ public interface Block extends Metadatable { * Gets the metadata for this block * * @return block specific metadata + * @deprecated Magic value */ + @Deprecated byte getData(); /** @@ -74,7 +76,9 @@ public interface Block extends Metadatable { * Gets the type-id of this block * * @return block type-id + * @deprecated Magic value */ + @Deprecated int getTypeId(); /** @@ -156,7 +160,9 @@ public interface Block extends Metadatable { * Sets the metadata for this block * * @param data New block specific metadata + * @deprecated Magic value */ + @Deprecated void setData(byte data); /** @@ -164,7 +170,9 @@ public interface Block extends Metadatable { * * @param data New block specific metadata * @param applyPhysics False to cancel physics from the changed block. + * @deprecated Magic value */ + @Deprecated void setData(byte data, boolean applyPhysics); /** @@ -179,7 +187,9 @@ public interface Block extends Metadatable { * * @param type Type-Id to change this block to * @return whether the block was changed + * @deprecated Magic value */ + @Deprecated boolean setTypeId(int type); /** @@ -188,7 +198,9 @@ public interface Block extends Metadatable { * @param type Type-Id to change this block to * @param applyPhysics False to cancel physics on the changed block. * @return whether the block was changed + * @deprecated Magic value */ + @Deprecated boolean setTypeId(int type, boolean applyPhysics); /** @@ -198,7 +210,9 @@ public interface Block extends Metadatable { * @param data The data value to change this block to * @param applyPhysics False to cancel physics on the changed block * @return whether the block was changed + * @deprecated Magic value */ + @Deprecated boolean setTypeIdAndData(int type, byte data, boolean applyPhysics); /** diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java index 7c2ccf04..784454a4 100644 --- a/src/main/java/org/bukkit/block/BlockState.java +++ b/src/main/java/org/bukkit/block/BlockState.java @@ -42,7 +42,9 @@ public interface BlockState extends Metadatable { * Gets the type-id of this block * * @return block type-id + * @deprecated Magic value */ + @Deprecated int getTypeId(); /** @@ -121,7 +123,9 @@ public interface BlockState extends Metadatable { * * @param type Type-Id to change this block to * @return Whether it worked? + * @deprecated Magic value */ + @Deprecated boolean setTypeId(int type); /** @@ -172,11 +176,15 @@ public interface BlockState extends Metadatable { /** * @return The data as a raw byte. + * @deprecated Magic value */ + @Deprecated public byte getRawData(); /** * @param data The new data value for the block. + * @deprecated Magic value */ + @Deprecated public void setRawData(byte data); } diff --git a/src/main/java/org/bukkit/block/Chest.java b/src/main/java/org/bukkit/block/Chest.java index 2d940e56..8f6e961b 100644 --- a/src/main/java/org/bukkit/block/Chest.java +++ b/src/main/java/org/bukkit/block/Chest.java @@ -6,6 +6,7 @@ import org.bukkit.inventory.Inventory; * Represents a chest. */ public interface Chest extends BlockState, ContainerBlock { + /** * Returns the chest's inventory. If this is a double chest, it returns just * the portion of the inventory linked to this half of the chest. diff --git a/src/main/java/org/bukkit/block/NoteBlock.java b/src/main/java/org/bukkit/block/NoteBlock.java index 9fb38450..8380068f 100644 --- a/src/main/java/org/bukkit/block/NoteBlock.java +++ b/src/main/java/org/bukkit/block/NoteBlock.java @@ -19,7 +19,9 @@ public interface NoteBlock extends BlockState { * Gets the note. * * @return The note ID. + * @deprecated Magic value */ + @Deprecated public byte getRawNote(); /** @@ -33,7 +35,9 @@ public interface NoteBlock extends BlockState { * Set the note. * * @param note The note ID. + * @deprecated Magic value */ + @Deprecated public void setRawNote(byte note); /** @@ -51,7 +55,9 @@ public interface NoteBlock extends BlockState { * @param instrument Instrument ID * @param note Note ID * @return true if successful, otherwise false + * @deprecated Magic value */ + @Deprecated public boolean play(byte instrument, byte note); /** diff --git a/src/main/java/org/bukkit/block/PistonMoveReaction.java b/src/main/java/org/bukkit/block/PistonMoveReaction.java index c62294aa..02d9649e 100644 --- a/src/main/java/org/bukkit/block/PistonMoveReaction.java +++ b/src/main/java/org/bukkit/block/PistonMoveReaction.java @@ -31,7 +31,9 @@ public enum PistonMoveReaction { /** * @return The ID of the move reaction + * @deprecated Magic value */ + @Deprecated public int getId() { return this.id; } @@ -39,7 +41,9 @@ public enum PistonMoveReaction { /** * @param id An ID * @return The move reaction with that ID + * @deprecated Magic value */ + @Deprecated public static PistonMoveReaction getById(int id) { return byId.get(id); } diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java index 0217d49a..b6cfaea0 100644 --- a/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/src/main/java/org/bukkit/enchantments/Enchantment.java @@ -133,7 +133,9 @@ public abstract class Enchantment { * Gets the unique ID of this enchantment * * @return Unique ID + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -248,7 +250,9 @@ public abstract class Enchantment { * * @param id ID to fetch * @return Resulting Enchantment, or null if not found + * @deprecated Magic value */ + @Deprecated public static Enchantment getById(int id) { return byId.get(id); } diff --git a/src/main/java/org/bukkit/entity/CreatureType.java b/src/main/java/org/bukkit/entity/CreatureType.java index 86a95209..fd230933 100644 --- a/src/main/java/org/bukkit/entity/CreatureType.java +++ b/src/main/java/org/bukkit/entity/CreatureType.java @@ -66,6 +66,11 @@ public enum CreatureType { return clazz; } + /** + * + * @deprecated Magic value + */ + @Deprecated public short getTypeId() { return typeId; } @@ -74,6 +79,11 @@ public enum CreatureType { return NAME_MAP.get(name); } + /** + * + * @deprecated Magic value + */ + @Deprecated public static CreatureType fromId(int id) { if (id > Short.MAX_VALUE) { return null; diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java index 6e049e94..49cc01ba 100644 --- a/src/main/java/org/bukkit/entity/EntityType.java +++ b/src/main/java/org/bukkit/entity/EntityType.java @@ -197,6 +197,11 @@ public enum EntityType { } } + /** + * + * @deprecated Magic value + */ + @Deprecated public String getName() { return name; } @@ -205,10 +210,20 @@ public enum EntityType { return clazz; } + /** + * + * @deprecated Magic value + */ + @Deprecated public short getTypeId() { return typeId; } + /** + * + * @deprecated Magic value + */ + @Deprecated public static EntityType fromName(String name) { if (name == null) { return null; @@ -216,6 +231,11 @@ public enum EntityType { return NAME_MAP.get(name.toLowerCase()); } + /** + * + * @deprecated Magic value + */ + @Deprecated public static EntityType fromId(int id) { if (id > Short.MAX_VALUE) { return null; diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java index 41fca566..1edd6e06 100644 --- a/src/main/java/org/bukkit/entity/FallingBlock.java +++ b/src/main/java/org/bukkit/entity/FallingBlock.java @@ -6,6 +6,7 @@ import org.bukkit.Material; * Represents a falling block */ public interface FallingBlock extends Entity { + /** * Get the Material of the falling block * @@ -17,14 +18,18 @@ public interface FallingBlock extends Entity { * Get the ID of the falling block * * @return ID type of the block + * @deprecated Magic value */ + @Deprecated int getBlockId(); /** * Get the data for the falling block * * @return data of the block + * @deprecated Magic value */ + @Deprecated byte getBlockData(); /** diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index cb1faf3b..4519dc4d 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -51,7 +51,9 @@ public interface LivingEntity extends Entity, Damageable { * limited by server by at least 100 blocks, no less) * @return list containing all blocks along the living entity's line * of sight + * @deprecated Magic value */ + @Deprecated public List<Block> getLineOfSight(HashSet<Byte> transparent, int maxDistance); /** @@ -62,7 +64,9 @@ public interface LivingEntity extends Entity, Damageable { * @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 + * @deprecated Magic value */ + @Deprecated public Block getTargetBlock(HashSet<Byte> transparent, int maxDistance); /** @@ -76,7 +80,9 @@ public interface LivingEntity extends Entity, Damageable { * 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 + * @deprecated Magic value */ + @Deprecated public List<Block> getLastTwoTargetBlocks(HashSet<Byte> transparent, int maxDistance); /** diff --git a/src/main/java/org/bukkit/entity/Ocelot.java b/src/main/java/org/bukkit/entity/Ocelot.java index fd6151b1..a173778b 100644 --- a/src/main/java/org/bukkit/entity/Ocelot.java +++ b/src/main/java/org/bukkit/entity/Ocelot.java @@ -60,7 +60,9 @@ public interface Ocelot extends Animals, Tameable { * Gets the ID of this cat type. * * @return Type ID. + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -70,7 +72,9 @@ public interface Ocelot extends Animals, Tameable { * * @param id ID of the cat type to get. * @return Resulting type, or null if not found. + * @deprecated Magic value */ + @Deprecated public static Type getType(int id) { return (id >= types.length) ? null : types[id]; } diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index ab022b5c..3ec374b4 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -187,7 +187,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param loc The location of a note block. * @param instrument The instrument ID. * @param note The note ID. + * @deprecated Magic value */ + @Deprecated public void playNote(Location loc, byte instrument, byte note); /** @@ -225,7 +227,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param sound the internal sound name to play * @param volume the volume of the sound * @param pitch the pitch of the sound + * @deprecated Magic value */ + @Deprecated public void playSound(Location location, String sound, float volume, float pitch); /** @@ -234,7 +238,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param loc the location to play the effect at * @param effect the {@link Effect} * @param data a data bit needed for some effects + * @deprecated Magic value */ + @Deprecated public void playEffect(Location loc, Effect effect, int data); /** @@ -253,7 +259,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param loc The location of the changed block * @param material The new block * @param data The block data + * @deprecated Magic value */ + @Deprecated public void sendBlockChange(Location loc, Material material, byte data); /** @@ -271,7 +279,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param sz The z size of the cuboid * @param data The data to be sent * @return true if the chunk change packet was sent + * @deprecated Magic value */ + @Deprecated public boolean sendChunkChange(Location loc, int sx, int sy, int sz, byte[] data); /** @@ -281,7 +291,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param loc The location of the changed block * @param material The new block ID * @param data The block data + * @deprecated Magic value */ + @Deprecated public void sendBlockChange(Location loc, int material, byte data); /** diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java index c91b1039..0019911b 100644 --- a/src/main/java/org/bukkit/entity/Skeleton.java +++ b/src/main/java/org/bukkit/entity/Skeleton.java @@ -42,7 +42,9 @@ public interface Skeleton extends Monster { * Gets the ID of this skeleton type. * * @return Skeleton type ID + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -52,7 +54,9 @@ public interface Skeleton extends Monster { * * @param id ID of the skeleton type to get. * @return Resulting skeleton type, or null if not found. + * @deprecated Magic value */ + @Deprecated public static SkeletonType getType(int id) { return (id >= types.length) ? null : types[id]; } diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java index f6f90cc1..51035c93 100644 --- a/src/main/java/org/bukkit/entity/Villager.java +++ b/src/main/java/org/bukkit/entity/Villager.java @@ -4,16 +4,17 @@ package org.bukkit.entity; * Represents a villager NPC */ public interface Villager extends Ageable, NPC { + /** * Gets the current profession of this villager. * * @return Current profession. */ public Profession getProfession(); - + /** * Sets the new profession of this villager. - * + * * @param profession New profession. */ public void setProfession(Profession profession); @@ -46,7 +47,9 @@ public interface Villager extends Ageable, NPC { * Gets the ID of this profession. * * @return Profession ID. + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -56,7 +59,9 @@ public interface Villager extends Ageable, NPC { * * @param id ID of the profession to get. * @return Resulting profession, or null if not found. + * @deprecated Magic value */ + @Deprecated public static Profession getProfession(int id) { return (id >= professions.length) ? null : professions[id]; } diff --git a/src/main/java/org/bukkit/event/block/BlockCanBuildEvent.java b/src/main/java/org/bukkit/event/block/BlockCanBuildEvent.java index d84b7f94..0db14821 100644 --- a/src/main/java/org/bukkit/event/block/BlockCanBuildEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockCanBuildEvent.java @@ -16,8 +16,18 @@ import org.bukkit.event.HandlerList; public class BlockCanBuildEvent extends BlockEvent { private static final HandlerList handlers = new HandlerList(); protected boolean buildable; + /** + * + * @deprecated Magic value + */ + @Deprecated protected int material; + /** + * + * @deprecated Magic value + */ + @Deprecated public BlockCanBuildEvent(final Block block, final int id, final boolean canBuild) { super(block); buildable = canBuild; @@ -56,7 +66,9 @@ public class BlockCanBuildEvent extends BlockEvent { * Gets the Material ID for the Material that we are trying to place. * * @return The Material ID for the Material that we are trying to place + * @deprecated Magic value */ + @Deprecated public int getMaterialId() { return material; } diff --git a/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java b/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java index 6f8198df..e05d1caa 100644 --- a/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java @@ -13,6 +13,11 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable { private final int changed; private boolean cancel = false; + /** + * + * @deprecated Magic value + */ + @Deprecated public BlockPhysicsEvent(final Block block, final int changed) { super(block); this.changed = changed; @@ -22,7 +27,9 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable { * Gets the type of block that changed, causing this event * * @return Changed block's type id + * @deprecated Magic value */ + @Deprecated public int getChangedTypeId() { return changed; } diff --git a/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java b/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java index a18d11f9..454393cf 100644 --- a/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java @@ -35,7 +35,9 @@ public class EntityChangeBlockEvent extends EntityEvent implements Cancellable { * @param block the block (before the change) * @param to the future material being changed to * @param data the future block data + * @deprecated Magic value */ + @Deprecated public EntityChangeBlockEvent(final Entity what, final Block block, final Material to, final byte data) { super(what); this.block = block; @@ -74,7 +76,9 @@ public class EntityChangeBlockEvent extends EntityEvent implements Cancellable { * Gets the data for the block that would be changed into * * @return the data for the block that would be changed into + * @deprecated Magic value */ + @Deprecated public byte getData() { return data; } diff --git a/src/main/java/org/bukkit/generator/ChunkGenerator.java b/src/main/java/org/bukkit/generator/ChunkGenerator.java index b43203d0..24e6aae3 100644 --- a/src/main/java/org/bukkit/generator/ChunkGenerator.java +++ b/src/main/java/org/bukkit/generator/ChunkGenerator.java @@ -137,7 +137,9 @@ public abstract class ChunkGenerator { * @param z The Z-coordinate of the chunk * @param biomes Proposed biome values for chunk - can be updated by generator * @return short[][] containing the types for each block created by this generator + * @deprecated Magic value */ + @Deprecated public short[][] generateExtBlockSections(World world, Random random, int x, int z, BiomeGrid biomes) { return null; // Default - returns null, which drives call to generateBlockSections() } @@ -186,7 +188,9 @@ public abstract class ChunkGenerator { * @param z The Z-coordinate of the chunk * @param biomes Proposed biome values for chunk - can be updated by generator * @return short[][] containing the types for each block created by this generator + * @deprecated Magic value */ + @Deprecated public byte[][] generateBlockSections(World world, Random random, int x, int z, BiomeGrid biomes) { return null; // Default - returns null, which drives call to generate() } diff --git a/src/main/java/org/bukkit/inventory/FurnaceRecipe.java b/src/main/java/org/bukkit/inventory/FurnaceRecipe.java index 12842c94..ad9cc598 100644 --- a/src/main/java/org/bukkit/inventory/FurnaceRecipe.java +++ b/src/main/java/org/bukkit/inventory/FurnaceRecipe.java @@ -36,7 +36,9 @@ public class FurnaceRecipe implements Recipe { * @param result The item you want the recipe to create. * @param source The input material. * @param data The data value. (Note: This is currently ignored by the CraftBukkit server.) + * @deprecated Magic value */ + @Deprecated public FurnaceRecipe(ItemStack result, Material source, int data) { this.output = new ItemStack(result); this.ingredient = new ItemStack(source, 1, (short) data); @@ -68,7 +70,9 @@ public class FurnaceRecipe implements Recipe { * @param input The input material. * @param data The data value. (Note: This is currently ignored by the CraftBukkit server.) * @return The changed recipe, so you can chain calls. + * @deprecated Magic value */ + @Deprecated public FurnaceRecipe setInput(Material input, int data) { this.ingredient = new ItemStack(input, 1, (short) data); return this; diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java index 407d214a..aa4373f1 100644 --- a/src/main/java/org/bukkit/inventory/Inventory.java +++ b/src/main/java/org/bukkit/inventory/Inventory.java @@ -126,7 +126,9 @@ public interface Inventory extends Iterable<ItemStack> { * * @param materialId The materialId to check for * @return true if an ItemStack in this inventory contains the materialId + * @deprecated Magic value */ + @Deprecated public boolean contains(int materialId); /** @@ -153,7 +155,9 @@ public interface Inventory extends Iterable<ItemStack> { * @param materialId The materialId to check for * @param amount The minimum amount to look for * @return true if this contains any matching ItemStack with the given materialId and amount + * @deprecated Magic value */ + @Deprecated public boolean contains(int materialId, int amount); /** @@ -195,7 +199,9 @@ public interface Inventory extends Iterable<ItemStack> { * * @param materialId The materialId to look for * @return A HashMap containing the slot index, ItemStack pairs + * @deprecated Magic value */ + @Deprecated public HashMap<Integer, ? extends ItemStack> all(int materialId); /** @@ -230,7 +236,9 @@ public interface Inventory extends Iterable<ItemStack> { * * @param materialId The materialId to look for * @return The slot index of the given materialId or -1 if not found + * @deprecated Magic value */ + @Deprecated public int first(int materialId); /** @@ -262,7 +270,9 @@ public interface Inventory extends Iterable<ItemStack> { * Removes all stacks in the inventory matching the given materialId. * * @param materialId The material to remove + * @deprecated Magic value */ + @Deprecated public void remove(int materialId); /** @@ -325,6 +335,7 @@ public interface Inventory extends Iterable<ItemStack> { */ public InventoryHolder getHolder(); + @Override public ListIterator<ItemStack> iterator(); /** diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java index 521deeb4..490862a9 100644 --- a/src/main/java/org/bukkit/inventory/InventoryView.java +++ b/src/main/java/org/bukkit/inventory/InventoryView.java @@ -56,6 +56,11 @@ public abstract class InventoryView { return style; } + /** + * + * @deprecated Magic value + */ + @Deprecated public int getId() { return id; } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java index b7e92ff7..b5172bc4 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -30,7 +30,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { * Defaults stack size to 1, with no extra data * * @param type item material id + * @deprecated Magic value */ + @Deprecated public ItemStack(final int type) { this(type, 1); } @@ -49,7 +51,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { * * @param type item material id * @param amount stack size + * @deprecated Magic value */ + @Deprecated public ItemStack(final int type, final int amount) { this(type, amount, (short) 0); } @@ -70,7 +74,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { * @param type item material id * @param amount stack size * @param damage durability / damage + * @deprecated Magic value */ + @Deprecated public ItemStack(final int type, final int amount, final short damage) { this.type = type; this.amount = amount; @@ -163,7 +169,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { * Gets the type id of this item * * @return Type Id of the items in this stack + * @deprecated Magic value */ + @Deprecated public int getTypeId() { return type; } @@ -174,7 +182,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { * 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 + * @deprecated Magic value */ + @Deprecated public void setTypeId(int type) { this.type = type; if (this.meta != null) { diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java index b4b2e1c5..7eb5c985 100644 --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java +++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java @@ -119,7 +119,9 @@ public interface PlayerInventory extends Inventory { * @param id the id of the item you want to clear from the inventory * @param data the data of the item you want to clear from the inventory * @return The number of items cleared + * @deprecated Magic value */ + @Deprecated public int clear(int id, int data); public HumanEntity getHolder(); diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java index 9156621f..ce501355 100644 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java @@ -33,7 +33,7 @@ public class ShapedRecipe implements Recipe { /** * Set the shape of this recipe to the specified rows. Each character represents a different * ingredient; exactly what each character represents is set separately. The first row supplied - * corresponds with the upper most part of the recipe on the workbench e.g. if all three + * corresponds with the upper most part of the recipe on the workbench e.g. if all three * rows are supplies the first string represents the top row on the workbench. * * @param shape The rows of the recipe (up to 3 rows). @@ -93,7 +93,9 @@ public class ShapedRecipe implements Recipe { * @param ingredient The ingredient. * @param raw The raw material data as an integer. * @return The changed recipe, so you can chain calls. + * @deprecated Magic value */ + @Deprecated public ShapedRecipe setIngredient(char key, Material ingredient, int raw) { Validate.isTrue(ingredients.containsKey(key), "Symbol does not appear in the shape:", key); diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java index c296e3a2..83470ebb 100644 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java @@ -59,7 +59,9 @@ public class ShapelessRecipe implements Recipe { * @param ingredient The ingredient to add. * @param rawdata The data value, or -1 to allow any data value. * @return The changed recipe, so you can chain calls. + * @deprecated Magic value */ + @Deprecated public ShapelessRecipe addIngredient(Material ingredient, int rawdata) { return addIngredient(1, ingredient, rawdata); } @@ -93,7 +95,9 @@ public class ShapelessRecipe implements Recipe { * @param ingredient The ingredient to add. * @param rawdata The data value, or -1 to allow any data value. * @return The changed recipe, so you can chain calls. + * @deprecated Magic value */ + @Deprecated public ShapelessRecipe addIngredient(int count, Material ingredient, int rawdata) { Validate.isTrue(ingredients.size() + count <= 9, "Shapeless recipes cannot have more than 9 ingredients"); @@ -166,7 +170,9 @@ public class ShapelessRecipe implements Recipe { * @param ingredient The ingredient to remove * @param rawdata The data value; * @return The changed recipe. + * @deprecated Magic value */ + @Deprecated public ShapelessRecipe removeIngredient(Material ingredient, int rawdata) { return removeIngredient(1, ingredient, rawdata); } @@ -180,7 +186,9 @@ public class ShapelessRecipe implements Recipe { * @param ingredient The ingredient to remove. * @param rawdata The data value. * @return The changed recipe. + * @deprecated Magic value */ + @Deprecated public ShapelessRecipe removeIngredient(int count, Material ingredient, int rawdata) { Iterator<ItemStack> iterator = ingredients.iterator(); while (count > 0 && iterator.hasNext()) { diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java index 6ef06597..ad002b7b 100644 --- a/src/main/java/org/bukkit/map/MapCursor.java +++ b/src/main/java/org/bukkit/map/MapCursor.java @@ -4,7 +4,6 @@ package org.bukkit.map; * Represents a cursor on a map. */ public final class MapCursor { - private byte x, y; private byte direction, type; private boolean visible; @@ -17,7 +16,9 @@ public final class MapCursor { * @param direction The facing of the cursor, from 0 to 15. * @param type The type (color/style) of the map cursor. * @param visible Whether the cursor is visible by default. + * @deprecated Magic value */ + @Deprecated public MapCursor(byte x, byte y, byte direction, byte type, boolean visible) { this.x = x; this.y = y; @@ -66,7 +67,9 @@ public final class MapCursor { * Get the type of this cursor. * * @return The type (color/style) of the map cursor. + * @deprecated Magic value */ + @Deprecated public byte getRawType() { return type; } @@ -123,7 +126,9 @@ public final class MapCursor { * Set the type of this cursor. * * @param type The type (color/style) of the map cursor. + * @deprecated Magic value */ + @Deprecated public void setRawType(byte type) { if (type < 0 || type > 15) { throw new IllegalArgumentException("Type must be in the range 0-15"); @@ -158,10 +163,20 @@ public final class MapCursor { this.value = (byte) value; } + /** + * + * @deprecated Magic value + */ + @Deprecated public byte getValue() { return value; } + /** + * + * @deprecated Magic value + */ + @Deprecated public static Type byValue(byte value) { for (Type t : values()) { if (t.value == value) return t; diff --git a/src/main/java/org/bukkit/map/MapCursorCollection.java b/src/main/java/org/bukkit/map/MapCursorCollection.java index 1e234a14..1dc9025d 100644 --- a/src/main/java/org/bukkit/map/MapCursorCollection.java +++ b/src/main/java/org/bukkit/map/MapCursorCollection.java @@ -8,7 +8,6 @@ import java.util.List; * MapCursorCollection is linked to a specific {@link MapRenderer}. */ public final class MapCursorCollection { - private List<MapCursor> cursors = new ArrayList<MapCursor>(); /** @@ -71,7 +70,9 @@ public final class MapCursorCollection { * @param direction The facing of the cursor, from 0 to 15. * @param type The type (color/style) of the map cursor. * @return The newly added MapCursor. + * @deprecated Magic value */ + @Deprecated public MapCursor addCursor(int x, int y, byte direction, byte type) { return addCursor(x, y, direction, type, true); } @@ -85,7 +86,9 @@ public final class MapCursorCollection { * @param type The type (color/style) of the map cursor. * @param visible Whether the cursor is visible. * @return The newly added MapCursor. + * @deprecated Magic value */ + @Deprecated public MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible) { return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible)); } diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java index 959929cf..53054810 100644 --- a/src/main/java/org/bukkit/map/MapPalette.java +++ b/src/main/java/org/bukkit/map/MapPalette.java @@ -7,6 +7,9 @@ import java.awt.image.BufferedImage; /** * Represents the palette that map items use. + * <p> + * These fields are hee base color ranges. Each entry corresponds to four + * colors of varying shades with values entry to entry + 3. */ public final class MapPalette { @@ -48,22 +51,74 @@ public final class MapPalette { // Interface /** - * The base color ranges. Each entry corresponds to four colors of varying - * shades with values entry to entry + 3. + * @deprecated Magic value */ + @Deprecated public static final byte TRANSPARENT = 0; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte LIGHT_GREEN = 4; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte LIGHT_BROWN = 8; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte GRAY_1 = 12; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte RED = 16; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte PALE_BLUE = 20; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte GRAY_2 = 24; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte DARK_GREEN = 28; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte WHITE = 32; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte LIGHT_GRAY = 36; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte BROWN = 40; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte DARK_GRAY = 44; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte BLUE = 48; + /** + * @deprecated Magic value + */ + @Deprecated public static final byte DARK_BROWN = 52; /** @@ -85,7 +140,9 @@ public final class MapPalette { * * @param image The image to convert. * @return A byte[] containing the pixels of the image. + * @deprecated Magic value */ + @Deprecated public static byte[] imageToBytes(Image image) { BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB); Graphics2D graphics = temp.createGraphics(); @@ -109,7 +166,9 @@ public final class MapPalette { * @param b The blue component of the color. * @param g The green component of the color. * @return The index in the palette. + * @deprecated Magic value */ + @Deprecated public static byte matchColor(int r, int g, int b) { return matchColor(new Color(r, g, b)); } @@ -119,7 +178,9 @@ public final class MapPalette { * * @param color The Color to match. * @return The index in the palette. + * @deprecated Magic value */ + @Deprecated public static byte matchColor(Color color) { if (color.getAlpha() < 128) return 0; @@ -142,7 +203,9 @@ public final class MapPalette { * * @param index The index in the palette. * @return The Color of the palette entry. + * @deprecated Magic value */ + @Deprecated public static Color getColor(byte index) { if (index < 0 || index >= colors.length) { throw new IndexOutOfBoundsException(); diff --git a/src/main/java/org/bukkit/map/MapView.java b/src/main/java/org/bukkit/map/MapView.java index 821afd69..ff370f4a 100644 --- a/src/main/java/org/bukkit/map/MapView.java +++ b/src/main/java/org/bukkit/map/MapView.java @@ -29,7 +29,9 @@ public interface MapView { * * @param value The raw scale * @return The enum scale, or null for an invalid input + * @deprecated Magic value */ + @Deprecated public static Scale valueOf(byte value) { switch (value) { case 0: return CLOSEST; @@ -45,7 +47,9 @@ public interface MapView { * Get the raw value of this scale level. * * @return The scale value + * @deprecated Magic value */ + @Deprecated public byte getValue() { return value; } @@ -56,7 +60,9 @@ public interface MapView { * in an inventory. * * @return The ID of the map. + * @deprecated Magic value */ + @Deprecated public short getId(); /** diff --git a/src/main/java/org/bukkit/material/Bed.java b/src/main/java/org/bukkit/material/Bed.java index 77f1e5f3..a1c087a2 100644 --- a/src/main/java/org/bukkit/material/Bed.java +++ b/src/main/java/org/bukkit/material/Bed.java @@ -25,6 +25,11 @@ public class Bed extends MaterialData implements Directional { setFacingDirection(direction); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Bed(final int type) { super(type); } @@ -33,10 +38,20 @@ public class Bed extends MaterialData implements Directional { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Bed(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Bed(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Button.java b/src/main/java/org/bukkit/material/Button.java index 1b72042a..2eeeaa6b 100644 --- a/src/main/java/org/bukkit/material/Button.java +++ b/src/main/java/org/bukkit/material/Button.java @@ -11,6 +11,11 @@ public class Button extends SimpleAttachableMaterialData implements Redstone { super(Material.STONE_BUTTON); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Button(final int type) { super(type); } @@ -19,10 +24,20 @@ public class Button extends SimpleAttachableMaterialData implements Redstone { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Button(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Button(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Cake.java b/src/main/java/org/bukkit/material/Cake.java index a4a13d79..360ae585 100644 --- a/src/main/java/org/bukkit/material/Cake.java +++ b/src/main/java/org/bukkit/material/Cake.java @@ -7,6 +7,11 @@ public class Cake extends MaterialData { super(Material.CAKE_BLOCK); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Cake(int type) { super(type); } @@ -15,10 +20,20 @@ public class Cake extends MaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Cake(int type, byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Cake(Material type, byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Cauldron.java b/src/main/java/org/bukkit/material/Cauldron.java index 3a923cba..b464bbdb 100644 --- a/src/main/java/org/bukkit/material/Cauldron.java +++ b/src/main/java/org/bukkit/material/Cauldron.java @@ -13,10 +13,20 @@ public class Cauldron extends MaterialData { super(Material.CAULDRON); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Cauldron(int type, byte data){ super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Cauldron(byte data) { super(Material.CAULDRON, data); } diff --git a/src/main/java/org/bukkit/material/Chest.java b/src/main/java/org/bukkit/material/Chest.java index 9fc316ae..b9f69880 100644 --- a/src/main/java/org/bukkit/material/Chest.java +++ b/src/main/java/org/bukkit/material/Chest.java @@ -22,6 +22,11 @@ public class Chest extends DirectionalContainer { setFacingDirection(direction); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Chest(final int type) { super(type); } @@ -30,10 +35,20 @@ public class Chest extends DirectionalContainer { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Chest(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Chest(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Coal.java b/src/main/java/org/bukkit/material/Coal.java index a1876638..3a4f7c38 100644 --- a/src/main/java/org/bukkit/material/Coal.java +++ b/src/main/java/org/bukkit/material/Coal.java @@ -16,6 +16,11 @@ public class Coal extends MaterialData { setType(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Coal(final int type) { super(type); } @@ -24,10 +29,20 @@ public class Coal extends MaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Coal(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Coal(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/CocoaPlant.java b/src/main/java/org/bukkit/material/CocoaPlant.java index 6e946acc..b8280b5b 100644 --- a/src/main/java/org/bukkit/material/CocoaPlant.java +++ b/src/main/java/org/bukkit/material/CocoaPlant.java @@ -18,10 +18,20 @@ public class CocoaPlant extends MaterialData implements Directional, Attachable super(Material.COCOA); } + /** + * + * @deprecated Magic value + */ + @Deprecated public CocoaPlant(final int type) { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public CocoaPlant(final int type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Command.java b/src/main/java/org/bukkit/material/Command.java index 1537ded4..174e1ff8 100644 --- a/src/main/java/org/bukkit/material/Command.java +++ b/src/main/java/org/bukkit/material/Command.java @@ -10,6 +10,11 @@ public class Command extends MaterialData implements Redstone { super(Material.COMMAND); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Command(final int type) { super(type); } @@ -18,10 +23,20 @@ public class Command extends MaterialData implements Redstone { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Command(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Command(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Crops.java b/src/main/java/org/bukkit/material/Crops.java index c874d5fb..2791998d 100644 --- a/src/main/java/org/bukkit/material/Crops.java +++ b/src/main/java/org/bukkit/material/Crops.java @@ -16,6 +16,11 @@ public class Crops extends MaterialData { setState(state); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Crops(final int type) { super(type); } @@ -24,10 +29,20 @@ public class Crops extends MaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Crops(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Crops(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/DetectorRail.java b/src/main/java/org/bukkit/material/DetectorRail.java index a75eb8ec..b1d3073c 100644 --- a/src/main/java/org/bukkit/material/DetectorRail.java +++ b/src/main/java/org/bukkit/material/DetectorRail.java @@ -10,6 +10,11 @@ public class DetectorRail extends ExtendedRails implements PressureSensor { super(Material.DETECTOR_RAIL); } + /** + * + * @deprecated Magic value + */ + @Deprecated public DetectorRail(final int type) { super(type); } @@ -18,10 +23,20 @@ public class DetectorRail extends ExtendedRails implements PressureSensor { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public DetectorRail(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public DetectorRail(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Diode.java b/src/main/java/org/bukkit/material/Diode.java index 54853f18..04210b7a 100644 --- a/src/main/java/org/bukkit/material/Diode.java +++ b/src/main/java/org/bukkit/material/Diode.java @@ -8,6 +8,11 @@ public class Diode extends MaterialData implements Directional { super(Material.DIODE_BLOCK_ON); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Diode(int type) { super(type); } @@ -16,10 +21,20 @@ public class Diode extends MaterialData implements Directional { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Diode(int type, byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Diode(Material type, byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/DirectionalContainer.java b/src/main/java/org/bukkit/material/DirectionalContainer.java index 790b6bd3..9b0a0475 100644 --- a/src/main/java/org/bukkit/material/DirectionalContainer.java +++ b/src/main/java/org/bukkit/material/DirectionalContainer.java @@ -7,6 +7,11 @@ import org.bukkit.block.BlockFace; * Represents a furnace or a dispenser. */ public class DirectionalContainer extends MaterialData implements Directional { + /** + * + * @deprecated Magic value + */ + @Deprecated public DirectionalContainer(final int type) { super(type); } @@ -15,10 +20,20 @@ public class DirectionalContainer extends MaterialData implements Directional { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public DirectionalContainer(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public DirectionalContainer(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Dispenser.java b/src/main/java/org/bukkit/material/Dispenser.java index 34228827..b62f8c91 100644 --- a/src/main/java/org/bukkit/material/Dispenser.java +++ b/src/main/java/org/bukkit/material/Dispenser.java @@ -17,6 +17,11 @@ public class Dispenser extends FurnaceAndDispenser { setFacingDirection(direction); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Dispenser(final int type) { super(type); } @@ -25,10 +30,20 @@ public class Dispenser extends FurnaceAndDispenser { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Dispenser(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Dispenser(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Door.java b/src/main/java/org/bukkit/material/Door.java index dcf2feac..2bebf9bb 100644 --- a/src/main/java/org/bukkit/material/Door.java +++ b/src/main/java/org/bukkit/material/Door.java @@ -14,6 +14,11 @@ public class Door extends MaterialData implements Directional, Openable { super(Material.WOODEN_DOOR); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Door(final int type) { super(type); } @@ -22,10 +27,20 @@ public class Door extends MaterialData implements Directional, Openable { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Door(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Door(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Dye.java b/src/main/java/org/bukkit/material/Dye.java index e7c07eae..4412c1f5 100644 --- a/src/main/java/org/bukkit/material/Dye.java +++ b/src/main/java/org/bukkit/material/Dye.java @@ -11,6 +11,11 @@ public class Dye extends MaterialData implements Colorable { super(Material.INK_SACK); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Dye(final int type) { super(type); } @@ -19,10 +24,20 @@ public class Dye extends MaterialData implements Colorable { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Dye(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Dye(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/EnderChest.java b/src/main/java/org/bukkit/material/EnderChest.java index f5039b4a..696dc65d 100644 --- a/src/main/java/org/bukkit/material/EnderChest.java +++ b/src/main/java/org/bukkit/material/EnderChest.java @@ -22,6 +22,11 @@ public class EnderChest extends DirectionalContainer { setFacingDirection(direction); } + /** + * + * @deprecated Magic value + */ + @Deprecated public EnderChest(final int type) { super(type); } @@ -30,10 +35,20 @@ public class EnderChest extends DirectionalContainer { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public EnderChest(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public EnderChest(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/ExtendedRails.java b/src/main/java/org/bukkit/material/ExtendedRails.java index e89e82fd..87234bbd 100644 --- a/src/main/java/org/bukkit/material/ExtendedRails.java +++ b/src/main/java/org/bukkit/material/ExtendedRails.java @@ -7,6 +7,11 @@ import org.bukkit.block.BlockFace; * This is the superclass for the {@link DetectorRail} and {@link PoweredRail} classes */ public class ExtendedRails extends Rails { + /** + * + * @deprecated Magic value + */ + @Deprecated public ExtendedRails(final int type) { super(type); } @@ -15,10 +20,20 @@ public class ExtendedRails extends Rails { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public ExtendedRails(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public ExtendedRails(final Material type, final byte data) { super(type, data); } @@ -28,6 +43,11 @@ public class ExtendedRails extends Rails { return false; } + /** + * + * @deprecated Magic value + */ + @Deprecated @Override protected byte getConvertedData() { return (byte) (getData() & 0x7); diff --git a/src/main/java/org/bukkit/material/FlowerPot.java b/src/main/java/org/bukkit/material/FlowerPot.java index c59891ad..986de7e6 100644 --- a/src/main/java/org/bukkit/material/FlowerPot.java +++ b/src/main/java/org/bukkit/material/FlowerPot.java @@ -16,6 +16,11 @@ public class FlowerPot extends MaterialData { super(Material.FLOWER_POT); } + /** + * + * @deprecated Magic value + */ + @Deprecated public FlowerPot(final int type) { super(type); } @@ -24,10 +29,20 @@ public class FlowerPot extends MaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public FlowerPot(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public FlowerPot(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Furnace.java b/src/main/java/org/bukkit/material/Furnace.java index 26fadfa6..49645aa9 100644 --- a/src/main/java/org/bukkit/material/Furnace.java +++ b/src/main/java/org/bukkit/material/Furnace.java @@ -22,6 +22,11 @@ public class Furnace extends FurnaceAndDispenser { setFacingDirection(direction); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Furnace(final int type) { super(type); } @@ -30,10 +35,20 @@ public class Furnace extends FurnaceAndDispenser { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Furnace(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Furnace(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/FurnaceAndDispenser.java b/src/main/java/org/bukkit/material/FurnaceAndDispenser.java index c7d0c941..a99fac5d 100644 --- a/src/main/java/org/bukkit/material/FurnaceAndDispenser.java +++ b/src/main/java/org/bukkit/material/FurnaceAndDispenser.java @@ -6,6 +6,11 @@ import org.bukkit.Material; * Represents a furnace or dispenser, two types of directional containers */ public class FurnaceAndDispenser extends DirectionalContainer { + /** + * + * @deprecated Magic value + */ + @Deprecated public FurnaceAndDispenser(final int type) { super(type); } @@ -14,10 +19,20 @@ public class FurnaceAndDispenser extends DirectionalContainer { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public FurnaceAndDispenser(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public FurnaceAndDispenser(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Ladder.java b/src/main/java/org/bukkit/material/Ladder.java index 31991a67..09862bf6 100644 --- a/src/main/java/org/bukkit/material/Ladder.java +++ b/src/main/java/org/bukkit/material/Ladder.java @@ -11,6 +11,11 @@ public class Ladder extends SimpleAttachableMaterialData { super(Material.LADDER); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Ladder(final int type) { super(type); } @@ -19,10 +24,20 @@ public class Ladder extends SimpleAttachableMaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Ladder(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Ladder(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Leaves.java b/src/main/java/org/bukkit/material/Leaves.java index 5acde607..97ba3820 100644 --- a/src/main/java/org/bukkit/material/Leaves.java +++ b/src/main/java/org/bukkit/material/Leaves.java @@ -16,6 +16,11 @@ public class Leaves extends MaterialData { setSpecies(species); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Leaves(final int type) { super(type); } @@ -24,10 +29,20 @@ public class Leaves extends MaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Leaves(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Leaves(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Lever.java b/src/main/java/org/bukkit/material/Lever.java index bc4dd3a1..b88c536f 100644 --- a/src/main/java/org/bukkit/material/Lever.java +++ b/src/main/java/org/bukkit/material/Lever.java @@ -11,6 +11,11 @@ public class Lever extends SimpleAttachableMaterialData implements Redstone { super(Material.LEVER); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Lever(final int type) { super(type); } @@ -19,10 +24,20 @@ public class Lever extends SimpleAttachableMaterialData implements Redstone { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Lever(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Lever(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/LongGrass.java b/src/main/java/org/bukkit/material/LongGrass.java index 61f724df..e8d1f380 100644 --- a/src/main/java/org/bukkit/material/LongGrass.java +++ b/src/main/java/org/bukkit/material/LongGrass.java @@ -16,6 +16,11 @@ public class LongGrass extends MaterialData { setSpecies(species); } + /** + * + * @deprecated Magic value + */ + @Deprecated public LongGrass(final int type) { super(type); } @@ -24,10 +29,20 @@ public class LongGrass extends MaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public LongGrass(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public LongGrass(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/MaterialData.java b/src/main/java/org/bukkit/material/MaterialData.java index adb78195..ad7675f2 100644 --- a/src/main/java/org/bukkit/material/MaterialData.java +++ b/src/main/java/org/bukkit/material/MaterialData.java @@ -10,6 +10,11 @@ public class MaterialData implements Cloneable { private final int type; private byte data = 0; + /** + * + * @deprecated Magic value + */ + @Deprecated public MaterialData(final int type) { this(type, (byte) 0); } @@ -18,11 +23,21 @@ public class MaterialData implements Cloneable { this(type, (byte) 0); } + /** + * + * @deprecated Magic value + */ + @Deprecated public MaterialData(final int type, final byte data) { this.type = type; this.data = data; } + /** + * + * @deprecated Magic value + */ + @Deprecated public MaterialData(final Material type, final byte data) { this(type.getId(), data); } @@ -31,7 +46,9 @@ public class MaterialData implements Cloneable { * Gets the raw data in this material * * @return Raw data + * @deprecated Magic value */ + @Deprecated public byte getData() { return data; } @@ -40,7 +57,9 @@ public class MaterialData implements Cloneable { * Sets the raw data of this material * * @param data New raw data + * @deprecated Magic value */ + @Deprecated public void setData(byte data) { this.data = data; } @@ -58,7 +77,9 @@ public class MaterialData implements Cloneable { * Gets the Material Id that this MaterialData represents * * @return Material Id represented by this MaterialData + * @deprecated Magic value */ + @Deprecated public int getItemTypeId() { return type; } diff --git a/src/main/java/org/bukkit/material/MonsterEggs.java b/src/main/java/org/bukkit/material/MonsterEggs.java index 420474f7..d8b627b7 100644 --- a/src/main/java/org/bukkit/material/MonsterEggs.java +++ b/src/main/java/org/bukkit/material/MonsterEggs.java @@ -21,6 +21,11 @@ public class MonsterEggs extends TexturedMaterial { super(Material.MONSTER_EGGS); } + /** + * + * @deprecated Magic value + */ + @Deprecated public MonsterEggs(final int type) { super(type); } @@ -32,10 +37,20 @@ public class MonsterEggs extends TexturedMaterial { } } + /** + * + * @deprecated Magic value + */ + @Deprecated public MonsterEggs(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public MonsterEggs(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Mushroom.java b/src/main/java/org/bukkit/material/Mushroom.java index 1d38140c..f38f71f8 100644 --- a/src/main/java/org/bukkit/material/Mushroom.java +++ b/src/main/java/org/bukkit/material/Mushroom.java @@ -26,11 +26,21 @@ public class Mushroom extends MaterialData { Validate.isTrue(shroom == Material.HUGE_MUSHROOM_1 || shroom == Material.HUGE_MUSHROOM_2, "Not a mushroom!"); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Mushroom(Material shroom, byte data) { super(shroom, data); Validate.isTrue(shroom == Material.HUGE_MUSHROOM_1 || shroom == Material.HUGE_MUSHROOM_2, "Not a mushroom!"); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Mushroom(int type, byte data){ super(type, data); Validate.isTrue(type == Material.HUGE_MUSHROOM_1.getId() || type == Material.HUGE_MUSHROOM_2.getId(), "Not a mushroom!"); diff --git a/src/main/java/org/bukkit/material/NetherWarts.java b/src/main/java/org/bukkit/material/NetherWarts.java index b8caad53..49fc5d71 100644 --- a/src/main/java/org/bukkit/material/NetherWarts.java +++ b/src/main/java/org/bukkit/material/NetherWarts.java @@ -16,6 +16,11 @@ public class NetherWarts extends MaterialData { setState(state);
}
+ /**
+ *
+ * @deprecated Magic value
+ */
+ @Deprecated
public NetherWarts(final int type) {
super(type);
}
@@ -24,10 +29,20 @@ public class NetherWarts extends MaterialData { super (type);
}
+ /**
+ *
+ * @deprecated Magic value
+ */
+ @Deprecated
public NetherWarts(final int type, final byte data) {
super(type, data);
}
+ /**
+ *
+ * @deprecated Magic value
+ */
+ @Deprecated
public NetherWarts(final Material type, final byte data) {
super(type, data);
}
diff --git a/src/main/java/org/bukkit/material/PistonBaseMaterial.java b/src/main/java/org/bukkit/material/PistonBaseMaterial.java index f5e2fc94..f3586dc0 100644 --- a/src/main/java/org/bukkit/material/PistonBaseMaterial.java +++ b/src/main/java/org/bukkit/material/PistonBaseMaterial.java @@ -7,6 +7,11 @@ import org.bukkit.block.BlockFace; * Material data for the piston base block */ public class PistonBaseMaterial extends MaterialData implements Directional, Redstone { + /** + * + * @deprecated Magic value + */ + @Deprecated public PistonBaseMaterial(final int type) { super(type); } @@ -15,10 +20,20 @@ public class PistonBaseMaterial extends MaterialData implements Directional, Red super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PistonBaseMaterial(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PistonBaseMaterial(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/PistonExtensionMaterial.java b/src/main/java/org/bukkit/material/PistonExtensionMaterial.java index 37323a61..85dee840 100644 --- a/src/main/java/org/bukkit/material/PistonExtensionMaterial.java +++ b/src/main/java/org/bukkit/material/PistonExtensionMaterial.java @@ -7,6 +7,11 @@ import org.bukkit.block.BlockFace; * Material data for the piston extension block */ public class PistonExtensionMaterial extends MaterialData implements Attachable { + /** + * + * @deprecated Magic value + */ + @Deprecated public PistonExtensionMaterial(final int type) { super(type); } @@ -15,10 +20,20 @@ public class PistonExtensionMaterial extends MaterialData implements Attachable super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PistonExtensionMaterial(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PistonExtensionMaterial(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/PoweredRail.java b/src/main/java/org/bukkit/material/PoweredRail.java index a8f627cc..444e53b7 100644 --- a/src/main/java/org/bukkit/material/PoweredRail.java +++ b/src/main/java/org/bukkit/material/PoweredRail.java @@ -10,6 +10,11 @@ public class PoweredRail extends ExtendedRails implements Redstone { super(Material.POWERED_RAIL); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PoweredRail(final int type) { super(type); } @@ -18,10 +23,20 @@ public class PoweredRail extends ExtendedRails implements Redstone { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PoweredRail(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PoweredRail(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/PressurePlate.java b/src/main/java/org/bukkit/material/PressurePlate.java index 2be71918..8c3bc759 100644 --- a/src/main/java/org/bukkit/material/PressurePlate.java +++ b/src/main/java/org/bukkit/material/PressurePlate.java @@ -10,6 +10,11 @@ public class PressurePlate extends MaterialData implements PressureSensor { super(Material.WOOD_PLATE); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PressurePlate(int type) { super(type); } @@ -18,10 +23,20 @@ public class PressurePlate extends MaterialData implements PressureSensor { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PressurePlate(int type, byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public PressurePlate(Material type, byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Pumpkin.java b/src/main/java/org/bukkit/material/Pumpkin.java index 47837dd1..d6ca83c9 100644 --- a/src/main/java/org/bukkit/material/Pumpkin.java +++ b/src/main/java/org/bukkit/material/Pumpkin.java @@ -22,6 +22,11 @@ public class Pumpkin extends MaterialData implements Directional { setFacingDirection(direction); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Pumpkin(final int type) { super(type); } @@ -30,10 +35,20 @@ public class Pumpkin extends MaterialData implements Directional { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Pumpkin(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Pumpkin(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Rails.java b/src/main/java/org/bukkit/material/Rails.java index ab18888e..969ccc49 100644 --- a/src/main/java/org/bukkit/material/Rails.java +++ b/src/main/java/org/bukkit/material/Rails.java @@ -12,6 +12,11 @@ public class Rails extends MaterialData { super(Material.RAILS); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Rails(final int type) { super(type); } @@ -20,10 +25,20 @@ public class Rails extends MaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Rails(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Rails(final Material type, final byte data) { super(type, data); } @@ -99,7 +114,9 @@ public class Rails extends MaterialData { * Return the data without the extended properties used by {@link PoweredRail} and {@link DetectorRail}. Overridden in {@link ExtendedRails} * * @return the data without the extended part + * @deprecated Magic value */ + @Deprecated protected byte getConvertedData() { return getData(); } diff --git a/src/main/java/org/bukkit/material/RedstoneTorch.java b/src/main/java/org/bukkit/material/RedstoneTorch.java index 4312e227..76a3ddd9 100644 --- a/src/main/java/org/bukkit/material/RedstoneTorch.java +++ b/src/main/java/org/bukkit/material/RedstoneTorch.java @@ -10,6 +10,11 @@ public class RedstoneTorch extends Torch implements Redstone { super(Material.REDSTONE_TORCH_ON); } + /** + * + * @deprecated Magic value + */ + @Deprecated public RedstoneTorch(final int type) { super(type); } @@ -18,10 +23,20 @@ public class RedstoneTorch extends Torch implements Redstone { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public RedstoneTorch(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public RedstoneTorch(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/RedstoneWire.java b/src/main/java/org/bukkit/material/RedstoneWire.java index ac0843da..b429af00 100644 --- a/src/main/java/org/bukkit/material/RedstoneWire.java +++ b/src/main/java/org/bukkit/material/RedstoneWire.java @@ -10,6 +10,11 @@ public class RedstoneWire extends MaterialData implements Redstone { super(Material.REDSTONE_WIRE); } + /** + * + * @deprecated Magic value + */ + @Deprecated public RedstoneWire(final int type) { super(type); } @@ -18,10 +23,20 @@ public class RedstoneWire extends MaterialData implements Redstone { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public RedstoneWire(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public RedstoneWire(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Sandstone.java b/src/main/java/org/bukkit/material/Sandstone.java index d2f6c267..26cbbb52 100644 --- a/src/main/java/org/bukkit/material/Sandstone.java +++ b/src/main/java/org/bukkit/material/Sandstone.java @@ -16,6 +16,11 @@ public class Sandstone extends MaterialData { setType(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Sandstone(final int type) { super(type); } @@ -24,10 +29,20 @@ public class Sandstone extends MaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Sandstone(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Sandstone(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Sign.java b/src/main/java/org/bukkit/material/Sign.java index e2333723..21f3dba2 100644 --- a/src/main/java/org/bukkit/material/Sign.java +++ b/src/main/java/org/bukkit/material/Sign.java @@ -11,6 +11,11 @@ public class Sign extends MaterialData implements Attachable { super(Material.SIGN_POST); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Sign(final int type) { super(type); } @@ -19,10 +24,20 @@ public class Sign extends MaterialData implements Attachable { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Sign(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Sign(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java b/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java index b88c3f9b..b5703c6c 100644 --- a/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java +++ b/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java @@ -8,6 +8,11 @@ import org.bukkit.block.BlockFace; */ public abstract class SimpleAttachableMaterialData extends MaterialData implements Attachable { + /** + * + * @deprecated Magic value + */ + @Deprecated public SimpleAttachableMaterialData(int type) { super(type); } @@ -26,10 +31,20 @@ public abstract class SimpleAttachableMaterialData extends MaterialData implemen super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public SimpleAttachableMaterialData(int type, byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public SimpleAttachableMaterialData(Material type, byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Skull.java b/src/main/java/org/bukkit/material/Skull.java index e93baaf9..6e0d71fa 100644 --- a/src/main/java/org/bukkit/material/Skull.java +++ b/src/main/java/org/bukkit/material/Skull.java @@ -21,6 +21,11 @@ public class Skull extends MaterialData implements Directional { setFacingDirection(direction); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Skull(final int type) { super(type); } @@ -29,10 +34,20 @@ public class Skull extends MaterialData implements Directional { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Skull(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Skull(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/SmoothBrick.java b/src/main/java/org/bukkit/material/SmoothBrick.java index d7b338c8..b7ab6074 100644 --- a/src/main/java/org/bukkit/material/SmoothBrick.java +++ b/src/main/java/org/bukkit/material/SmoothBrick.java @@ -22,6 +22,11 @@ public class SmoothBrick extends TexturedMaterial { super(Material.SMOOTH_BRICK); } + /** + * + * @deprecated Magic value + */ + @Deprecated public SmoothBrick(final int type) { super(type); } @@ -33,10 +38,20 @@ public class SmoothBrick extends TexturedMaterial { } } + /** + * + * @deprecated Magic value + */ + @Deprecated public SmoothBrick(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public SmoothBrick(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/SpawnEgg.java b/src/main/java/org/bukkit/material/SpawnEgg.java index d13fbe4a..ed973c52 100644 --- a/src/main/java/org/bukkit/material/SpawnEgg.java +++ b/src/main/java/org/bukkit/material/SpawnEgg.java @@ -7,14 +7,25 @@ import org.bukkit.entity.EntityType; * Represents a spawn egg that can be used to spawn mobs */ public class SpawnEgg extends MaterialData { + public SpawnEgg() { super(Material.MONSTER_EGG); } + /** + * + * @deprecated Magic value + */ + @Deprecated public SpawnEgg(int type, byte data){ super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public SpawnEgg(byte data) { super(Material.MONSTER_EGG, data); } diff --git a/src/main/java/org/bukkit/material/Stairs.java b/src/main/java/org/bukkit/material/Stairs.java index 89e83fd7..1980174e 100644 --- a/src/main/java/org/bukkit/material/Stairs.java +++ b/src/main/java/org/bukkit/material/Stairs.java @@ -8,6 +8,11 @@ import org.bukkit.block.BlockFace; */ public class Stairs extends MaterialData implements Directional { + /** + * + * @deprecated Magic value + */ + @Deprecated public Stairs(final int type) { super(type); } @@ -16,10 +21,20 @@ public class Stairs extends MaterialData implements Directional { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Stairs(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Stairs(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Step.java b/src/main/java/org/bukkit/material/Step.java index 1d41a071..e3f509b6 100644 --- a/src/main/java/org/bukkit/material/Step.java +++ b/src/main/java/org/bukkit/material/Step.java @@ -25,6 +25,11 @@ public class Step extends TexturedMaterial { super(Material.STEP); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Step(final int type) { super(type); } @@ -36,10 +41,20 @@ public class Step extends TexturedMaterial { } } + /** + * + * @deprecated Magic value + */ + @Deprecated public Step(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Step(final Material type, final byte data) { super(type, data); } @@ -57,7 +72,7 @@ public class Step extends TexturedMaterial { public boolean isInverted() { return ((getData() & 0x8) != 0); } - + /** * Set step inverted state * @@ -70,12 +85,22 @@ public class Step extends TexturedMaterial { } setData((byte) dat); } - + + /** + * + * @deprecated Magic value + */ + @Deprecated @Override protected int getTextureIndex() { return getData() & 0x7; } + /** + * + * @deprecated Magic value + */ + @Deprecated @Override protected void setTextureIndex(int idx) { setData((byte) ((getData() & 0x8) | idx)); diff --git a/src/main/java/org/bukkit/material/TexturedMaterial.java b/src/main/java/org/bukkit/material/TexturedMaterial.java index e5581b7a..08cbbb64 100644 --- a/src/main/java/org/bukkit/material/TexturedMaterial.java +++ b/src/main/java/org/bukkit/material/TexturedMaterial.java @@ -13,14 +13,29 @@ public abstract class TexturedMaterial extends MaterialData { super(m); } + /** + * + * @deprecated Magic value + */ + @Deprecated public TexturedMaterial(int type) { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public TexturedMaterial(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public TexturedMaterial(final Material type, final byte data) { super(type, data); } @@ -64,7 +79,9 @@ public abstract class TexturedMaterial extends MaterialData { * Get material index from data * * @return index of data in textures list + * @deprecated Magic value */ + @Deprecated protected int getTextureIndex() { return getData(); // Default to using all bits - override for other mappings } @@ -73,7 +90,9 @@ public abstract class TexturedMaterial extends MaterialData { * Set material index * * @param idx - index of data in textures list + * @deprecated Magic value */ + @Deprecated protected void setTextureIndex(int idx) { setData((byte) idx); // Defult to using all bits - override for other mappings } diff --git a/src/main/java/org/bukkit/material/Torch.java b/src/main/java/org/bukkit/material/Torch.java index e18feae6..f03b3cf8 100644 --- a/src/main/java/org/bukkit/material/Torch.java +++ b/src/main/java/org/bukkit/material/Torch.java @@ -11,6 +11,11 @@ public class Torch extends SimpleAttachableMaterialData { super(Material.TORCH); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Torch(final int type) { super(type); } @@ -19,10 +24,20 @@ public class Torch extends SimpleAttachableMaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Torch(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Torch(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/TrapDoor.java b/src/main/java/org/bukkit/material/TrapDoor.java index 572d1778..bd4bcc2b 100644 --- a/src/main/java/org/bukkit/material/TrapDoor.java +++ b/src/main/java/org/bukkit/material/TrapDoor.java @@ -11,6 +11,11 @@ public class TrapDoor extends SimpleAttachableMaterialData implements Openable { super(Material.TRAP_DOOR); } + /** + * + * @deprecated Magic value + */ + @Deprecated public TrapDoor(final int type) { super(type); } @@ -19,10 +24,20 @@ public class TrapDoor extends SimpleAttachableMaterialData implements Openable { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public TrapDoor(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public TrapDoor(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Tree.java b/src/main/java/org/bukkit/material/Tree.java index f5c10170..54ae5167 100644 --- a/src/main/java/org/bukkit/material/Tree.java +++ b/src/main/java/org/bukkit/material/Tree.java @@ -23,6 +23,11 @@ public class Tree extends MaterialData { setDirection(dir); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Tree(final int type) { super(type); } @@ -31,10 +36,20 @@ public class Tree extends MaterialData { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Tree(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Tree(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Tripwire.java b/src/main/java/org/bukkit/material/Tripwire.java index 12bac754..583860bc 100644 --- a/src/main/java/org/bukkit/material/Tripwire.java +++ b/src/main/java/org/bukkit/material/Tripwire.java @@ -11,10 +11,20 @@ public class Tripwire extends MaterialData { super(Material.TRIPWIRE); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Tripwire(final int type) { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Tripwire(final int type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/TripwireHook.java b/src/main/java/org/bukkit/material/TripwireHook.java index a3352f19..7ad2d2ad 100644 --- a/src/main/java/org/bukkit/material/TripwireHook.java +++ b/src/main/java/org/bukkit/material/TripwireHook.java @@ -12,10 +12,20 @@ public class TripwireHook extends SimpleAttachableMaterialData implements Redsto super(Material.TRIPWIRE_HOOK); } + /** + * + * @deprecated Magic value + */ + @Deprecated public TripwireHook(final int type) { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public TripwireHook(final int type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Vine.java b/src/main/java/org/bukkit/material/Vine.java index e00ea3c9..83de4e06 100644 --- a/src/main/java/org/bukkit/material/Vine.java +++ b/src/main/java/org/bukkit/material/Vine.java @@ -20,10 +20,20 @@ public class Vine extends MaterialData { super(Material.VINE); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Vine(int type, byte data){ super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Vine(byte data) { super(Material.VINE, data); } diff --git a/src/main/java/org/bukkit/material/WoodenStep.java b/src/main/java/org/bukkit/material/WoodenStep.java index b9acfc2c..c6f57a27 100644 --- a/src/main/java/org/bukkit/material/WoodenStep.java +++ b/src/main/java/org/bukkit/material/WoodenStep.java @@ -12,6 +12,11 @@ public class WoodenStep extends MaterialData { super(Material.WOOD_STEP); } + /** + * + * @deprecated Magic value + */ + @Deprecated public WoodenStep(final int type) { super(type); } @@ -27,10 +32,20 @@ public class WoodenStep extends MaterialData { setInverted(inv); } + /** + * + * @deprecated Magic value + */ + @Deprecated public WoodenStep(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public WoodenStep(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/material/Wool.java b/src/main/java/org/bukkit/material/Wool.java index 62f63bd6..8115bdc3 100644 --- a/src/main/java/org/bukkit/material/Wool.java +++ b/src/main/java/org/bukkit/material/Wool.java @@ -16,6 +16,11 @@ public class Wool extends MaterialData implements Colorable { setColor(color); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Wool(final int type) { super(type); } @@ -24,10 +29,20 @@ public class Wool extends MaterialData implements Colorable { super(type); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Wool(final int type, final byte data) { super(type, data); } + /** + * + * @deprecated Magic value + */ + @Deprecated public Wool(final Material type, final byte data) { super(type, data); } diff --git a/src/main/java/org/bukkit/potion/Potion.java b/src/main/java/org/bukkit/potion/Potion.java index bcfa4488..800a375b 100644 --- a/src/main/java/org/bukkit/potion/Potion.java +++ b/src/main/java/org/bukkit/potion/Potion.java @@ -370,6 +370,11 @@ public class Potion { private static final int TIER_SHIFT = 5; private static final int NAME_BIT = 0x3F; + /** + * + * @deprecated Magic value + */ + @Deprecated public static Potion fromDamage(int damage) { PotionType type = PotionType.getByDamageValue(damage & POTION_BIT); Potion potion; @@ -417,6 +422,11 @@ public class Potion { brewer = other; } + /** + * + * @deprecated Magic value + */ + @Deprecated public int getNameId() { return name; } diff --git a/src/main/java/org/bukkit/potion/PotionBrewer.java b/src/main/java/org/bukkit/potion/PotionBrewer.java index 7d8318cf..d85a1d63 100644 --- a/src/main/java/org/bukkit/potion/PotionBrewer.java +++ b/src/main/java/org/bukkit/potion/PotionBrewer.java @@ -23,6 +23,8 @@ public interface PotionBrewer { * * @param damage The data value of the potion * @return The list of effects + * @deprecated Magic value */ + @Deprecated public Collection<PotionEffect> getEffectsFromDamage(int damage); } diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java index baf10fb1..87cff375 100644 --- a/src/main/java/org/bukkit/potion/PotionEffectType.java +++ b/src/main/java/org/bukkit/potion/PotionEffectType.java @@ -154,7 +154,9 @@ public abstract class PotionEffectType { * Returns the unique ID of this type. * * @return Unique ID + * @deprecated Magic value */ + @Deprecated public int getId() { return id; } @@ -208,7 +210,9 @@ public abstract class PotionEffectType { * * @param id Unique ID to fetch * @return Resulting type, or null if not found. + * @deprecated Magic value */ + @Deprecated public static PotionEffectType getById(int id) { if (id >= byId.length || id < 0) return null; diff --git a/src/main/java/org/bukkit/potion/PotionType.java b/src/main/java/org/bukkit/potion/PotionType.java index 46921c23..5913ad76 100644 --- a/src/main/java/org/bukkit/potion/PotionType.java +++ b/src/main/java/org/bukkit/potion/PotionType.java @@ -28,6 +28,11 @@ public enum PotionType { return effect; } + /** + * + * @deprecated Magic value + */ + @Deprecated public int getDamageValue() { return damageValue; } @@ -40,6 +45,11 @@ public enum PotionType { return effect == null ? true : effect.isInstant(); } + /** + * + * @deprecated Magic value + */ + @Deprecated public static PotionType getByDamageValue(int damage) { for (PotionType type : PotionType.values()) { if (type.damageValue == damage) @@ -48,6 +58,11 @@ public enum PotionType { return null; } + /** + * + * @deprecated Magic value + */ + @Deprecated public static PotionType getByEffect(PotionEffectType effectType) { if (effectType == null) return WATER; |