13
0
geforkt von Mirrors/Paper

Deprecate magic values

By: Wesley Wolfe <weswolf@aol.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2013-08-19 13:32:18 -05:00
Ursprung d9f3848e22
Commit f9bec6eadd
108 geänderte Dateien mit 1194 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -53,7 +53,9 @@ public enum Achievement {
* Note that this is offset using {@link #STATISTIC_OFFSET} * Note that this is offset using {@link #STATISTIC_OFFSET}
* *
* @return ID of this achievement * @return ID of this achievement
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }
@ -65,7 +67,9 @@ public enum Achievement {
* *
* @param id ID of the achievement to return * @param id ID of the achievement to return
* @return Achievement with the given ID * @return Achievement with the given ID
* @deprecated Magic value
*/ */
@Deprecated
public static Achievement getById(int id) { public static Achievement getById(int id) {
return BY_ID.get(id); return BY_ID.get(id);
} }

Datei anzeigen

@ -69,7 +69,9 @@ public enum Art {
* Get the ID of this painting. * Get the ID of this painting.
* *
* @return The ID of this painting * @return The ID of this painting
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }
@ -79,7 +81,9 @@ public enum Art {
* *
* @param id The ID * @param id The ID
* @return The painting * @return The painting
* @deprecated Magic value
*/ */
@Deprecated
public static Art getById(int id) { public static Art getById(int id) {
return BY_ID.get(id); return BY_ID.get(id);
} }

Datei anzeigen

@ -16,7 +16,9 @@ public interface BlockChangeDelegate {
* @param z Z coordinate * @param z Z coordinate
* @param typeId New block ID * @param typeId New block ID
* @return true if the block was set successfully * @return true if the block was set successfully
* @deprecated Magic value
*/ */
@Deprecated
public boolean setRawTypeId(int x, int y, int z, int typeId); public boolean setRawTypeId(int x, int y, int z, int typeId);
/** /**
@ -29,7 +31,9 @@ public interface BlockChangeDelegate {
* @param typeId New block ID * @param typeId New block ID
* @param data Block data * @param data Block data
* @return true if the block was set successfully * @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); 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 z Z coordinate
* @param typeId New block ID * @param typeId New block ID
* @return true if the block was set successfully * @return true if the block was set successfully
* @deprecated Magic value
*/ */
@Deprecated
public boolean setTypeId(int x, int y, int z, int typeId); public boolean setTypeId(int x, int y, int z, int typeId);
/** /**
@ -54,7 +60,9 @@ public interface BlockChangeDelegate {
* @param typeId New block ID * @param typeId New block ID
* @param data Block data * @param data Block data
* @return true if the block was set successfully * @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); 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 y Y coordinate
* @param z Z coordinate * @param z Z coordinate
* @return The block ID * @return The block ID
* @deprecated Magic value
*/ */
@Deprecated
public int getTypeId(int x, int y, int z); public int getTypeId(int x, int y, int z);
/** /**

Datei anzeigen

@ -256,7 +256,9 @@ public final class Bukkit {
/** /**
* @see Server#getMap(short id) * @see Server#getMap(short id)
* @deprecated Magic value
*/ */
@Deprecated
public static MapView getMap(short id) { public static MapView getMap(short id) {
return server.getMap(id); return server.getMap(id);
} }

Datei anzeigen

@ -36,7 +36,9 @@ public interface ChunkSnapshot {
* @param y 0-127 * @param y 0-127
* @param z 0-15 * @param z 0-15
* @return 0-255 * @return 0-255
* @deprecated Magic value
*/ */
@Deprecated
int getBlockTypeId(int x, int y, int z); int getBlockTypeId(int x, int y, int z);
/** /**
@ -46,7 +48,9 @@ public interface ChunkSnapshot {
* @param y 0-127 * @param y 0-127
* @param z 0-15 * @param z 0-15
* @return 0-15 * @return 0-15
* @deprecated Magic value
*/ */
@Deprecated
int getBlockData(int x, int y, int z); int getBlockData(int x, int y, int z);
/** /**

Datei anzeigen

@ -22,7 +22,9 @@ public enum CoalType {
* Gets the associated data value representing this type of coal * Gets the associated data value representing this type of coal
* *
* @return A byte containing the data value of this coal type * @return A byte containing the data value of this coal type
* @deprecated Magic value
*/ */
@Deprecated
public byte getData() { public byte getData() {
return data; return data;
} }
@ -34,7 +36,9 @@ public enum CoalType {
* Data value to fetch * Data value to fetch
* @return The {@link CoalType} representing the given value, or null if * @return The {@link CoalType} representing the given value, or null if
* it doesn't exist * it doesn't exist
* @deprecated Magic value
*/ */
@Deprecated
public static CoalType getByData(final byte data) { public static CoalType getByData(final byte data) {
return BY_DATA.get(data); return BY_DATA.get(data);
} }

Datei anzeigen

@ -53,7 +53,9 @@ public enum CropState {
* Gets the associated data value representing this growth state * Gets the associated data value representing this growth state
* *
* @return A byte containing the data value of this growth state * @return A byte containing the data value of this growth state
* @deprecated Magic value
*/ */
@Deprecated
public byte getData() { public byte getData() {
return data; return data;
} }
@ -65,7 +67,9 @@ public enum CropState {
* Data value to fetch * Data value to fetch
* @return The {@link CropState} representing the given value, or null if * @return The {@link CropState} representing the given value, or null if
* it doesn't exist * it doesn't exist
* @deprecated Magic value
*/ */
@Deprecated
public static CropState getByData(final byte data) { public static CropState getByData(final byte data) {
return BY_DATA.get(data); return BY_DATA.get(data);
} }

Datei anzeigen

@ -39,7 +39,9 @@ public enum Difficulty {
* Gets the difficulty value associated with this Difficulty. * Gets the difficulty value associated with this Difficulty.
* *
* @return An integer value of this difficulty * @return An integer value of this difficulty
* @deprecated Magic value
*/ */
@Deprecated
public int getValue() { public int getValue() {
return value; return value;
} }
@ -49,7 +51,9 @@ public enum Difficulty {
* *
* @param value Value to check * @param value Value to check
* @return Associative {@link Difficulty} with the given value, or null if it doesn't exist * @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) { public static Difficulty getByValue(final int value) {
return BY_ID.get(value); return BY_ID.get(value);
} }

Datei anzeigen

@ -108,7 +108,9 @@ public enum DyeColor {
* *
* @return A byte containing the wool data value of this color * @return A byte containing the wool data value of this color
* @see #getDyeData() * @see #getDyeData()
* @deprecated Magic value
*/ */
@Deprecated
public byte getWoolData() { public byte getWoolData() {
return woolData; return woolData;
} }
@ -118,7 +120,9 @@ public enum DyeColor {
* *
* @return A byte containing the dye data value of this color * @return A byte containing the dye data value of this color
* @see #getWoolData() * @see #getWoolData()
* @deprecated Magic value
*/ */
@Deprecated
public byte getDyeData() { public byte getDyeData() {
return dyeData; return dyeData;
} }
@ -161,7 +165,9 @@ public enum DyeColor {
* @param data Wool data value to fetch * @param data Wool data value to fetch
* @return The {@link DyeColor} representing the given value, or null if it doesn't exist * @return The {@link DyeColor} representing the given value, or null if it doesn't exist
* @see #getByDyeData(byte) * @see #getByDyeData(byte)
* @deprecated Magic value
*/ */
@Deprecated
public static DyeColor getByWoolData(final byte data) { public static DyeColor getByWoolData(final byte data) {
int i = 0xff & data; int i = 0xff & data;
if (i >= BY_WOOL_DATA.length) { if (i >= BY_WOOL_DATA.length) {
@ -176,7 +182,9 @@ public enum DyeColor {
* @param data Dye data value to fetch * @param data Dye data value to fetch
* @return The {@link DyeColor} representing the given value, or null if it doesn't exist * @return The {@link DyeColor} representing the given value, or null if it doesn't exist
* @see #getByWoolData(byte) * @see #getByWoolData(byte)
* @deprecated Magic value
*/ */
@Deprecated
public static DyeColor getByDyeData(final byte data) { public static DyeColor getByDyeData(final byte data) {
int i = 0xff & data; int i = 0xff & data;
if (i >= BY_DYE_DATA.length) { if (i >= BY_DYE_DATA.length) {

Datei anzeigen

@ -99,7 +99,9 @@ public enum Effect {
* Gets the ID for this effect. * Gets the ID for this effect.
* *
* @return ID of this effect * @return ID of this effect
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return this.id; return this.id;
} }
@ -123,7 +125,9 @@ public enum Effect {
* *
* @param id ID of the Effect to return * @param id ID of the Effect to return
* @return Effect with the given ID * @return Effect with the given ID
* @deprecated Magic value
*/ */
@Deprecated
public static Effect getById(int id) { public static Effect getById(int id) {
return BY_ID.get(id); return BY_ID.get(id);
} }

Datei anzeigen

@ -58,7 +58,9 @@ public enum EntityEffect {
* Gets the data value of this EntityEffect * Gets the data value of this EntityEffect
* *
* @return The data value * @return The data value
* @deprecated Magic value
*/ */
@Deprecated
public byte getData() { public byte getData() {
return data; return data;
} }
@ -68,7 +70,9 @@ public enum EntityEffect {
* *
* @param data Data value to fetch * @param data Data value to fetch
* @return The {@link EntityEffect} representing the given value, or null if it doesn't exist * @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) { public static EntityEffect getByData(final byte data) {
return BY_DATA.get(data); return BY_DATA.get(data);
} }

Datei anzeigen

@ -36,7 +36,9 @@ public enum GameMode {
* Gets the mode value associated with this GameMode * Gets the mode value associated with this GameMode
* *
* @return An integer value of this gamemode * @return An integer value of this gamemode
* @deprecated Magic value
*/ */
@Deprecated
public int getValue() { public int getValue() {
return value; return value;
} }
@ -46,7 +48,9 @@ public enum GameMode {
* *
* @param value Value to check * @param value Value to check
* @return Associative {@link GameMode} with the given value, or null if it doesn't exist * @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) { public static GameMode getByValue(final int value) {
return BY_ID.get(value); return BY_ID.get(value);
} }

Datei anzeigen

@ -33,7 +33,9 @@ public enum GrassSpecies {
* Gets the associated data value representing this species * Gets the associated data value representing this species
* *
* @return A byte containing the data value of this grass species * @return A byte containing the data value of this grass species
* @deprecated Magic value
*/ */
@Deprecated
public byte getData() { public byte getData() {
return data; return data;
} }
@ -45,7 +47,9 @@ public enum GrassSpecies {
* Data value to fetch * Data value to fetch
* @return The {@link GrassSpecies} representing the given value, or null if * @return The {@link GrassSpecies} representing the given value, or null if
* it doesn't exist * it doesn't exist
* @deprecated Magic value
*/ */
@Deprecated
public static GrassSpecies getByData(final byte data) { public static GrassSpecies getByData(final byte data) {
return BY_DATA.get(data); return BY_DATA.get(data);
} }

Datei anzeigen

@ -36,7 +36,9 @@ public enum Instrument {
/** /**
* @return The type ID of this instrument. * @return The type ID of this instrument.
* @deprecated Magic value
*/ */
@Deprecated
public byte getType() { public byte getType() {
return this.type; return this.type;
} }
@ -46,7 +48,9 @@ public enum Instrument {
* *
* @param type The type ID * @param type The type ID
* @return The instrument * @return The instrument
* @deprecated Magic value
*/ */
@Deprecated
public static Instrument getByType(final byte type) { public static Instrument getByType(final byte type) {
return BY_DATA.get(type); return BY_DATA.get(type);
} }

Datei anzeigen

@ -16,7 +16,6 @@ import org.bukkit.material.Command;
import org.bukkit.material.Crops; import org.bukkit.material.Crops;
import org.bukkit.material.DetectorRail; import org.bukkit.material.DetectorRail;
import org.bukkit.material.Diode; import org.bukkit.material.Diode;
import org.bukkit.material.DirectionalContainer;
import org.bukkit.material.Dispenser; import org.bukkit.material.Dispenser;
import org.bukkit.material.Door; import org.bukkit.material.Door;
import org.bukkit.material.Dye; import org.bukkit.material.Dye;
@ -451,7 +450,9 @@ public enum Material {
* Gets the item ID or block ID of this Material * Gets the item ID or block ID of this Material
* *
* @return ID of this material * @return ID of this material
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }
@ -489,7 +490,9 @@ public enum Material {
* *
* @param raw Initial data to construct the MaterialData with * @param raw Initial data to construct the MaterialData with
* @return New MaterialData with the given data * @return New MaterialData with the given data
* @deprecated Magic value
*/ */
@Deprecated
public MaterialData getNewData(final byte raw) { public MaterialData getNewData(final byte raw) {
try { try {
return ctor.newInstance(id, raw); return ctor.newInstance(id, raw);
@ -556,7 +559,9 @@ public enum Material {
* *
* @param id ID of the material to get * @param id ID of the material to get
* @return Material if found, or null * @return Material if found, or null
* @deprecated Magic value
*/ */
@Deprecated
public static Material getMaterial(final int id) { public static Material getMaterial(final int id) {
if (byId.length > id && id >= 0) { if (byId.length > id && id >= 0) {
return byId[id]; return byId[id];
@ -580,7 +585,9 @@ public enum Material {
/** /**
* Attempts to match the Material with the given name. * Attempts to match the Material with the given name.
* This is a match lookup; names will be converted to uppercase, then stripped * 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 * @param name Name of the material to get
* @return Material if found, or null * @return Material if found, or null

Datei anzeigen

@ -39,7 +39,9 @@ public class Note {
* Returns the not sharped id of this tone. * Returns the not sharped id of this tone.
* *
* @return the not sharped id of this tone. * @return the not sharped id of this tone.
* @deprecated Magic value
*/ */
@Deprecated
public byte getId() { public byte getId() {
return getId(false); return getId(false);
} }
@ -51,7 +53,9 @@ public class Note {
* *
* @param sharped Set to true to return the sharped id. * @param sharped Set to true to return the sharped id.
* @return the id of this tone. * @return the id of this tone.
* @deprecated Magic value
*/ */
@Deprecated
public byte getId(boolean sharped) { public byte getId(boolean sharped) {
byte id = (byte) (sharped && sharpable ? this.id + 1 : this.id); byte id = (byte) (sharped && sharpable ? this.id + 1 : this.id);
@ -73,7 +77,9 @@ public class Note {
* @param id the id of the tone. * @param id the id of the tone.
* @return if the tone id is the sharped 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. * @throws IllegalArgumentException if neither the tone nor the semitone have the id.
* @deprecated Magic value
*/ */
@Deprecated
public boolean isSharped(byte id) { public boolean isSharped(byte id) {
if (id == getId(false)) { if (id == getId(false)) {
return false; return false;
@ -90,7 +96,9 @@ public class Note {
* *
* @param id the id of the tone. * @param id the id of the tone.
* @return the tone to id. * @return the tone to id.
* @deprecated Magic value
*/ */
@Deprecated
public static Tone getById(byte id) { public static Tone getById(byte id) {
return BY_DATA.get(id); return BY_DATA.get(id);
} }
@ -197,7 +205,9 @@ public class Note {
* Returns the internal id of this note. * Returns the internal id of this note.
* *
* @return the internal id of this note. * @return the internal id of this note.
* @deprecated Magic value
*/ */
@Deprecated
public byte getId() { public byte getId() {
return note; return note;
} }

Datei anzeigen

@ -23,7 +23,9 @@ public enum SandstoneType {
* Gets the associated data value representing this type of sandstone * Gets the associated data value representing this type of sandstone
* *
* @return A byte containing the data value of this sandstone type * @return A byte containing the data value of this sandstone type
* @deprecated Magic value
*/ */
@Deprecated
public byte getData() { public byte getData() {
return data; return data;
} }
@ -35,7 +37,9 @@ public enum SandstoneType {
* Data value to fetch * Data value to fetch
* @return The {@link SandstoneType} representing the given value, or null if * @return The {@link SandstoneType} representing the given value, or null if
* it doesn't exist * it doesn't exist
* @deprecated Magic value
*/ */
@Deprecated
public static SandstoneType getByData(final byte data) { public static SandstoneType getByData(final byte data) {
return BY_DATA.get(data); return BY_DATA.get(data);
} }

Datei anzeigen

@ -36,6 +36,7 @@ import org.bukkit.inventory.meta.ItemMeta;
* Represents a server implementation * Represents a server implementation
*/ */
public interface Server extends PluginMessageRecipient { public interface Server extends PluginMessageRecipient {
/** /**
* Used for all administrative messages, such as an operator using a command. * Used for all administrative messages, such as an operator using a command.
* <p> * <p>
@ -356,7 +357,9 @@ public interface Server extends PluginMessageRecipient {
* *
* @param id ID of the map to get. * @param id ID of the map to get.
* @return The MapView if it exists, or null otherwise. * @return The MapView if it exists, or null otherwise.
* @deprecated Magic value
*/ */
@Deprecated
public MapView getMap(short id); public MapView getMap(short id);
/** /**

Datei anzeigen

@ -41,7 +41,9 @@ public enum Statistic {
* Gets the ID for this statistic. * Gets the ID for this statistic.
* *
* @return ID of this statistic * @return ID of this statistic
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }
@ -71,7 +73,9 @@ public enum Statistic {
* *
* @param id ID of the statistic to return * @param id ID of the statistic to return
* @return statistic with the given ID * @return statistic with the given ID
* @deprecated Magic value
*/ */
@Deprecated
public static Statistic getById(int id) { public static Statistic getById(int id) {
return BY_ID.get(id); return BY_ID.get(id);
} }

Datei anzeigen

@ -37,7 +37,9 @@ public enum TreeSpecies {
* Gets the associated data value representing this species * Gets the associated data value representing this species
* *
* @return A byte containing the data value of this tree species * @return A byte containing the data value of this tree species
* @deprecated Magic value
*/ */
@Deprecated
public byte getData() { public byte getData() {
return data; return data;
} }
@ -48,7 +50,9 @@ public enum TreeSpecies {
* @param data Data value to fetch * @param data Data value to fetch
* @return The {@link TreeSpecies} representing the given value, or null if * @return The {@link TreeSpecies} representing the given value, or null if
* it doesn't exist * it doesn't exist
* @deprecated Magic value
*/ */
@Deprecated
public static TreeSpecies getByData(final byte data) { public static TreeSpecies getByData(final byte data) {
return BY_DATA.get(data); return BY_DATA.get(data);
} }

Datei anzeigen

@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableMap;
@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE}) @Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface Warning { public @interface Warning {
/** /**
* This represents the states that server verbose for warnings may be. * This represents the states that server verbose for warnings may be.
*/ */

Datei anzeigen

@ -50,7 +50,9 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z-coordinate of the block * @param z Z-coordinate of the block
* @return Type ID of the block at the given coordinates * @return Type ID of the block at the given coordinates
* @see #getBlockAt(int, int, int) Returns a live Block object at the given location * @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); 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 * @param location Location of the block
* @return Type ID of the block at the given location * @return Type ID of the block at the given location
* @see #getBlockAt(org.bukkit.Location) Returns a live Block object 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); public int getBlockTypeIdAt(Location location);
/** /**
@ -1094,7 +1098,9 @@ public interface World extends PluginMessageRecipient, Metadatable {
* Gets the dimension ID of this environment * Gets the dimension ID of this environment
* *
* @return dimension ID * @return dimension ID
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }
@ -1104,7 +1110,9 @@ public interface World extends PluginMessageRecipient, Metadatable {
* *
* @param id The ID of the environment * @param id The ID of the environment
* @return The environment * @return The environment
* @deprecated Magic value
*/ */
@Deprecated
public static Environment getEnvironment(int id) { public static Environment getEnvironment(int id) {
return lookup.get(id); return lookup.get(id);
} }

Datei anzeigen

@ -21,7 +21,9 @@ public interface Block extends Metadatable {
* Gets the metadata for this block * Gets the metadata for this block
* *
* @return block specific metadata * @return block specific metadata
* @deprecated Magic value
*/ */
@Deprecated
byte getData(); byte getData();
/** /**
@ -74,7 +76,9 @@ public interface Block extends Metadatable {
* Gets the type-id of this block * Gets the type-id of this block
* *
* @return block type-id * @return block type-id
* @deprecated Magic value
*/ */
@Deprecated
int getTypeId(); int getTypeId();
/** /**
@ -156,7 +160,9 @@ public interface Block extends Metadatable {
* Sets the metadata for this block * Sets the metadata for this block
* *
* @param data New block specific metadata * @param data New block specific metadata
* @deprecated Magic value
*/ */
@Deprecated
void setData(byte data); void setData(byte data);
/** /**
@ -164,7 +170,9 @@ public interface Block extends Metadatable {
* *
* @param data New block specific metadata * @param data New block specific metadata
* @param applyPhysics False to cancel physics from the changed block. * @param applyPhysics False to cancel physics from the changed block.
* @deprecated Magic value
*/ */
@Deprecated
void setData(byte data, boolean applyPhysics); void setData(byte data, boolean applyPhysics);
/** /**
@ -179,7 +187,9 @@ public interface Block extends Metadatable {
* *
* @param type Type-Id to change this block to * @param type Type-Id to change this block to
* @return whether the block was changed * @return whether the block was changed
* @deprecated Magic value
*/ */
@Deprecated
boolean setTypeId(int type); boolean setTypeId(int type);
/** /**
@ -188,7 +198,9 @@ public interface Block extends Metadatable {
* @param type Type-Id to change this block to * @param type Type-Id to change this block to
* @param applyPhysics False to cancel physics on the changed block. * @param applyPhysics False to cancel physics on the changed block.
* @return whether the block was changed * @return whether the block was changed
* @deprecated Magic value
*/ */
@Deprecated
boolean setTypeId(int type, boolean applyPhysics); 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 data The data value to change this block to
* @param applyPhysics False to cancel physics on the changed block * @param applyPhysics False to cancel physics on the changed block
* @return whether the block was changed * @return whether the block was changed
* @deprecated Magic value
*/ */
@Deprecated
boolean setTypeIdAndData(int type, byte data, boolean applyPhysics); boolean setTypeIdAndData(int type, byte data, boolean applyPhysics);
/** /**

Datei anzeigen

@ -42,7 +42,9 @@ public interface BlockState extends Metadatable {
* Gets the type-id of this block * Gets the type-id of this block
* *
* @return block type-id * @return block type-id
* @deprecated Magic value
*/ */
@Deprecated
int getTypeId(); int getTypeId();
/** /**
@ -121,7 +123,9 @@ public interface BlockState extends Metadatable {
* *
* @param type Type-Id to change this block to * @param type Type-Id to change this block to
* @return Whether it worked? * @return Whether it worked?
* @deprecated Magic value
*/ */
@Deprecated
boolean setTypeId(int type); boolean setTypeId(int type);
/** /**
@ -172,11 +176,15 @@ public interface BlockState extends Metadatable {
/** /**
* @return The data as a raw byte. * @return The data as a raw byte.
* @deprecated Magic value
*/ */
@Deprecated
public byte getRawData(); public byte getRawData();
/** /**
* @param data The new data value for the block. * @param data The new data value for the block.
* @deprecated Magic value
*/ */
@Deprecated
public void setRawData(byte data); public void setRawData(byte data);
} }

Datei anzeigen

@ -6,6 +6,7 @@ import org.bukkit.inventory.Inventory;
* Represents a chest. * Represents a chest.
*/ */
public interface Chest extends BlockState, ContainerBlock { public interface Chest extends BlockState, ContainerBlock {
/** /**
* Returns the chest's inventory. If this is a double chest, it returns just * 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. * the portion of the inventory linked to this half of the chest.

Datei anzeigen

@ -19,7 +19,9 @@ public interface NoteBlock extends BlockState {
* Gets the note. * Gets the note.
* *
* @return The note ID. * @return The note ID.
* @deprecated Magic value
*/ */
@Deprecated
public byte getRawNote(); public byte getRawNote();
/** /**
@ -33,7 +35,9 @@ public interface NoteBlock extends BlockState {
* Set the note. * Set the note.
* *
* @param note The note ID. * @param note The note ID.
* @deprecated Magic value
*/ */
@Deprecated
public void setRawNote(byte note); public void setRawNote(byte note);
/** /**
@ -51,7 +55,9 @@ public interface NoteBlock extends BlockState {
* @param instrument Instrument ID * @param instrument Instrument ID
* @param note Note ID * @param note Note ID
* @return true if successful, otherwise false * @return true if successful, otherwise false
* @deprecated Magic value
*/ */
@Deprecated
public boolean play(byte instrument, byte note); public boolean play(byte instrument, byte note);
/** /**

Datei anzeigen

@ -31,7 +31,9 @@ public enum PistonMoveReaction {
/** /**
* @return The ID of the move reaction * @return The ID of the move reaction
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return this.id; return this.id;
} }
@ -39,7 +41,9 @@ public enum PistonMoveReaction {
/** /**
* @param id An ID * @param id An ID
* @return The move reaction with that ID * @return The move reaction with that ID
* @deprecated Magic value
*/ */
@Deprecated
public static PistonMoveReaction getById(int id) { public static PistonMoveReaction getById(int id) {
return byId.get(id); return byId.get(id);
} }

Datei anzeigen

@ -133,7 +133,9 @@ public abstract class Enchantment {
* Gets the unique ID of this enchantment * Gets the unique ID of this enchantment
* *
* @return Unique ID * @return Unique ID
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }
@ -248,7 +250,9 @@ public abstract class Enchantment {
* *
* @param id ID to fetch * @param id ID to fetch
* @return Resulting Enchantment, or null if not found * @return Resulting Enchantment, or null if not found
* @deprecated Magic value
*/ */
@Deprecated
public static Enchantment getById(int id) { public static Enchantment getById(int id) {
return byId.get(id); return byId.get(id);
} }

Datei anzeigen

@ -66,6 +66,11 @@ public enum CreatureType {
return clazz; return clazz;
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public short getTypeId() { public short getTypeId() {
return typeId; return typeId;
} }
@ -74,6 +79,11 @@ public enum CreatureType {
return NAME_MAP.get(name); return NAME_MAP.get(name);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public static CreatureType fromId(int id) { public static CreatureType fromId(int id) {
if (id > Short.MAX_VALUE) { if (id > Short.MAX_VALUE) {
return null; return null;

Datei anzeigen

@ -197,6 +197,11 @@ public enum EntityType {
} }
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public String getName() { public String getName() {
return name; return name;
} }
@ -205,10 +210,20 @@ public enum EntityType {
return clazz; return clazz;
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public short getTypeId() { public short getTypeId() {
return typeId; return typeId;
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public static EntityType fromName(String name) { public static EntityType fromName(String name) {
if (name == null) { if (name == null) {
return null; return null;
@ -216,6 +231,11 @@ public enum EntityType {
return NAME_MAP.get(name.toLowerCase()); return NAME_MAP.get(name.toLowerCase());
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public static EntityType fromId(int id) { public static EntityType fromId(int id) {
if (id > Short.MAX_VALUE) { if (id > Short.MAX_VALUE) {
return null; return null;

Datei anzeigen

@ -6,6 +6,7 @@ import org.bukkit.Material;
* Represents a falling block * Represents a falling block
*/ */
public interface FallingBlock extends Entity { public interface FallingBlock extends Entity {
/** /**
* Get the Material of the falling block * Get the Material of the falling block
* *
@ -17,14 +18,18 @@ public interface FallingBlock extends Entity {
* Get the ID of the falling block * Get the ID of the falling block
* *
* @return ID type of the block * @return ID type of the block
* @deprecated Magic value
*/ */
@Deprecated
int getBlockId(); int getBlockId();
/** /**
* Get the data for the falling block * Get the data for the falling block
* *
* @return data of the block * @return data of the block
* @deprecated Magic value
*/ */
@Deprecated
byte getBlockData(); byte getBlockData();
/** /**

Datei anzeigen

@ -51,7 +51,9 @@ public interface LivingEntity extends Entity, Damageable {
* limited by server by at least 100 blocks, no less) * limited by server by at least 100 blocks, no less)
* @return list containing all blocks along the living entity's line * @return list containing all blocks along the living entity's line
* of sight * of sight
* @deprecated Magic value
*/ */
@Deprecated
public List<Block> getLineOfSight(HashSet<Byte> transparent, int maxDistance); 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 * @param maxDistance this is the maximum distance to scan
* (may be limited by server by at least 100 blocks, no less) * (may be limited by server by at least 100 blocks, no less)
* @return block that the living entity has targeted * @return block that the living entity has targeted
* @deprecated Magic value
*/ */
@Deprecated
public Block getTargetBlock(HashSet<Byte> transparent, int maxDistance); 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 * further limited by the server, but never to less than 100 blocks
* @return list containing the last 2 blocks along the living entity's * @return list containing the last 2 blocks along the living entity's
* line of sight * line of sight
* @deprecated Magic value
*/ */
@Deprecated
public List<Block> getLastTwoTargetBlocks(HashSet<Byte> transparent, int maxDistance); public List<Block> getLastTwoTargetBlocks(HashSet<Byte> transparent, int maxDistance);
/** /**

Datei anzeigen

@ -60,7 +60,9 @@ public interface Ocelot extends Animals, Tameable {
* Gets the ID of this cat type. * Gets the ID of this cat type.
* *
* @return Type ID. * @return Type ID.
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }
@ -70,7 +72,9 @@ public interface Ocelot extends Animals, Tameable {
* *
* @param id ID of the cat type to get. * @param id ID of the cat type to get.
* @return Resulting type, or null if not found. * @return Resulting type, or null if not found.
* @deprecated Magic value
*/ */
@Deprecated
public static Type getType(int id) { public static Type getType(int id) {
return (id >= types.length) ? null : types[id]; return (id >= types.length) ? null : types[id];
} }

Datei anzeigen

@ -187,7 +187,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
* @param loc The location of a note block. * @param loc The location of a note block.
* @param instrument The instrument ID. * @param instrument The instrument ID.
* @param note The note ID. * @param note The note ID.
* @deprecated Magic value
*/ */
@Deprecated
public void playNote(Location loc, byte instrument, byte note); 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 sound the internal sound name to play
* @param volume the volume of the sound * @param volume the volume of the sound
* @param pitch the pitch 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); 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 loc the location to play the effect at
* @param effect the {@link Effect} * @param effect the {@link Effect}
* @param data a data bit needed for some effects * @param data a data bit needed for some effects
* @deprecated Magic value
*/ */
@Deprecated
public void playEffect(Location loc, Effect effect, int data); 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 loc The location of the changed block
* @param material The new block * @param material The new block
* @param data The block data * @param data The block data
* @deprecated Magic value
*/ */
@Deprecated
public void sendBlockChange(Location loc, Material material, byte data); 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 sz The z size of the cuboid
* @param data The data to be sent * @param data The data to be sent
* @return true if the chunk change packet was 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); 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 loc The location of the changed block
* @param material The new block ID * @param material The new block ID
* @param data The block data * @param data The block data
* @deprecated Magic value
*/ */
@Deprecated
public void sendBlockChange(Location loc, int material, byte data); public void sendBlockChange(Location loc, int material, byte data);
/** /**

Datei anzeigen

@ -42,7 +42,9 @@ public interface Skeleton extends Monster {
* Gets the ID of this skeleton type. * Gets the ID of this skeleton type.
* *
* @return Skeleton type ID * @return Skeleton type ID
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }
@ -52,7 +54,9 @@ public interface Skeleton extends Monster {
* *
* @param id ID of the skeleton type to get. * @param id ID of the skeleton type to get.
* @return Resulting skeleton type, or null if not found. * @return Resulting skeleton type, or null if not found.
* @deprecated Magic value
*/ */
@Deprecated
public static SkeletonType getType(int id) { public static SkeletonType getType(int id) {
return (id >= types.length) ? null : types[id]; return (id >= types.length) ? null : types[id];
} }

Datei anzeigen

@ -4,16 +4,17 @@ package org.bukkit.entity;
* Represents a villager NPC * Represents a villager NPC
*/ */
public interface Villager extends Ageable, NPC { public interface Villager extends Ageable, NPC {
/** /**
* Gets the current profession of this villager. * Gets the current profession of this villager.
* *
* @return Current profession. * @return Current profession.
*/ */
public Profession getProfession(); public Profession getProfession();
/** /**
* Sets the new profession of this villager. * Sets the new profession of this villager.
* *
* @param profession New profession. * @param profession New profession.
*/ */
public void setProfession(Profession profession); public void setProfession(Profession profession);
@ -46,7 +47,9 @@ public interface Villager extends Ageable, NPC {
* Gets the ID of this profession. * Gets the ID of this profession.
* *
* @return Profession ID. * @return Profession ID.
* @deprecated Magic value
*/ */
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }
@ -56,7 +59,9 @@ public interface Villager extends Ageable, NPC {
* *
* @param id ID of the profession to get. * @param id ID of the profession to get.
* @return Resulting profession, or null if not found. * @return Resulting profession, or null if not found.
* @deprecated Magic value
*/ */
@Deprecated
public static Profession getProfession(int id) { public static Profession getProfession(int id) {
return (id >= professions.length) ? null : professions[id]; return (id >= professions.length) ? null : professions[id];
} }

Datei anzeigen

@ -16,8 +16,18 @@ import org.bukkit.event.HandlerList;
public class BlockCanBuildEvent extends BlockEvent { public class BlockCanBuildEvent extends BlockEvent {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();
protected boolean buildable; protected boolean buildable;
/**
*
* @deprecated Magic value
*/
@Deprecated
protected int material; protected int material;
/**
*
* @deprecated Magic value
*/
@Deprecated
public BlockCanBuildEvent(final Block block, final int id, final boolean canBuild) { public BlockCanBuildEvent(final Block block, final int id, final boolean canBuild) {
super(block); super(block);
buildable = canBuild; buildable = canBuild;
@ -56,7 +66,9 @@ public class BlockCanBuildEvent extends BlockEvent {
* Gets the Material ID for the Material that we are trying to place. * 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 * @return The Material ID for the Material that we are trying to place
* @deprecated Magic value
*/ */
@Deprecated
public int getMaterialId() { public int getMaterialId() {
return material; return material;
} }

Datei anzeigen

@ -13,6 +13,11 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable {
private final int changed; private final int changed;
private boolean cancel = false; private boolean cancel = false;
/**
*
* @deprecated Magic value
*/
@Deprecated
public BlockPhysicsEvent(final Block block, final int changed) { public BlockPhysicsEvent(final Block block, final int changed) {
super(block); super(block);
this.changed = changed; this.changed = changed;
@ -22,7 +27,9 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable {
* Gets the type of block that changed, causing this event * Gets the type of block that changed, causing this event
* *
* @return Changed block's type id * @return Changed block's type id
* @deprecated Magic value
*/ */
@Deprecated
public int getChangedTypeId() { public int getChangedTypeId() {
return changed; return changed;
} }

Datei anzeigen

@ -35,7 +35,9 @@ public class EntityChangeBlockEvent extends EntityEvent implements Cancellable {
* @param block the block (before the change) * @param block the block (before the change)
* @param to the future material being changed to * @param to the future material being changed to
* @param data the future block data * @param data the future block data
* @deprecated Magic value
*/ */
@Deprecated
public EntityChangeBlockEvent(final Entity what, final Block block, final Material to, final byte data) { public EntityChangeBlockEvent(final Entity what, final Block block, final Material to, final byte data) {
super(what); super(what);
this.block = block; 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 * Gets the data for the block that would be changed into
* *
* @return 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() { public byte getData() {
return data; return data;
} }

Datei anzeigen

@ -137,7 +137,9 @@ public abstract class ChunkGenerator {
* @param z The Z-coordinate of the chunk * @param z The Z-coordinate of the chunk
* @param biomes Proposed biome values for chunk - can be updated by generator * @param biomes Proposed biome values for chunk - can be updated by generator
* @return short[][] containing the types for each block created by this 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) { public short[][] generateExtBlockSections(World world, Random random, int x, int z, BiomeGrid biomes) {
return null; // Default - returns null, which drives call to generateBlockSections() 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 z The Z-coordinate of the chunk
* @param biomes Proposed biome values for chunk - can be updated by generator * @param biomes Proposed biome values for chunk - can be updated by generator
* @return short[][] containing the types for each block created by this 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) { public byte[][] generateBlockSections(World world, Random random, int x, int z, BiomeGrid biomes) {
return null; // Default - returns null, which drives call to generate() return null; // Default - returns null, which drives call to generate()
} }

Datei anzeigen

@ -36,7 +36,9 @@ public class FurnaceRecipe implements Recipe {
* @param result The item you want the recipe to create. * @param result The item you want the recipe to create.
* @param source The input material. * @param source The input material.
* @param data The data value. (Note: This is currently ignored by the CraftBukkit server.) * @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) { public FurnaceRecipe(ItemStack result, Material source, int data) {
this.output = new ItemStack(result); this.output = new ItemStack(result);
this.ingredient = new ItemStack(source, 1, (short) data); this.ingredient = new ItemStack(source, 1, (short) data);
@ -68,7 +70,9 @@ public class FurnaceRecipe implements Recipe {
* @param input The input material. * @param input The input material.
* @param data The data value. (Note: This is currently ignored by the CraftBukkit server.) * @param data The data value. (Note: This is currently ignored by the CraftBukkit server.)
* @return The changed recipe, so you can chain calls. * @return The changed recipe, so you can chain calls.
* @deprecated Magic value
*/ */
@Deprecated
public FurnaceRecipe setInput(Material input, int data) { public FurnaceRecipe setInput(Material input, int data) {
this.ingredient = new ItemStack(input, 1, (short) data); this.ingredient = new ItemStack(input, 1, (short) data);
return this; return this;

Datei anzeigen

@ -126,7 +126,9 @@ public interface Inventory extends Iterable<ItemStack> {
* *
* @param materialId The materialId to check for * @param materialId The materialId to check for
* @return true if an ItemStack in this inventory contains the materialId * @return true if an ItemStack in this inventory contains the materialId
* @deprecated Magic value
*/ */
@Deprecated
public boolean contains(int materialId); public boolean contains(int materialId);
/** /**
@ -153,7 +155,9 @@ public interface Inventory extends Iterable<ItemStack> {
* @param materialId The materialId to check for * @param materialId The materialId to check for
* @param amount The minimum amount to look for * @param amount The minimum amount to look for
* @return true if this contains any matching ItemStack with the given materialId and amount * @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); public boolean contains(int materialId, int amount);
/** /**
@ -195,7 +199,9 @@ public interface Inventory extends Iterable<ItemStack> {
* *
* @param materialId The materialId to look for * @param materialId The materialId to look for
* @return A HashMap containing the slot index, ItemStack pairs * @return A HashMap containing the slot index, ItemStack pairs
* @deprecated Magic value
*/ */
@Deprecated
public HashMap<Integer, ? extends ItemStack> all(int materialId); 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 * @param materialId The materialId to look for
* @return The slot index of the given materialId or -1 if not found * @return The slot index of the given materialId or -1 if not found
* @deprecated Magic value
*/ */
@Deprecated
public int first(int materialId); 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. * Removes all stacks in the inventory matching the given materialId.
* *
* @param materialId The material to remove * @param materialId The material to remove
* @deprecated Magic value
*/ */
@Deprecated
public void remove(int materialId); public void remove(int materialId);
/** /**
@ -325,6 +335,7 @@ public interface Inventory extends Iterable<ItemStack> {
*/ */
public InventoryHolder getHolder(); public InventoryHolder getHolder();
@Override
public ListIterator<ItemStack> iterator(); public ListIterator<ItemStack> iterator();
/** /**

Datei anzeigen

@ -56,6 +56,11 @@ public abstract class InventoryView {
return style; return style;
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public int getId() { public int getId() {
return id; return id;
} }

Datei anzeigen

@ -30,7 +30,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
* Defaults stack size to 1, with no extra data * Defaults stack size to 1, with no extra data
* *
* @param type item material id * @param type item material id
* @deprecated Magic value
*/ */
@Deprecated
public ItemStack(final int type) { public ItemStack(final int type) {
this(type, 1); this(type, 1);
} }
@ -49,7 +51,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
* *
* @param type item material id * @param type item material id
* @param amount stack size * @param amount stack size
* @deprecated Magic value
*/ */
@Deprecated
public ItemStack(final int type, final int amount) { public ItemStack(final int type, final int amount) {
this(type, amount, (short) 0); this(type, amount, (short) 0);
} }
@ -70,7 +74,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
* @param type item material id * @param type item material id
* @param amount stack size * @param amount stack size
* @param damage durability / damage * @param damage durability / damage
* @deprecated Magic value
*/ */
@Deprecated
public ItemStack(final int type, final int amount, final short damage) { public ItemStack(final int type, final int amount, final short damage) {
this.type = type; this.type = type;
this.amount = amount; this.amount = amount;
@ -163,7 +169,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
* Gets the type id of this item * Gets the type id of this item
* *
* @return Type Id of the items in this stack * @return Type Id of the items in this stack
* @deprecated Magic value
*/ */
@Deprecated
public int getTypeId() { public int getTypeId() {
return type; 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 * 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 * @param type New type id to set the items in this stack to
* @deprecated Magic value
*/ */
@Deprecated
public void setTypeId(int type) { public void setTypeId(int type) {
this.type = type; this.type = type;
if (this.meta != null) { if (this.meta != null) {

Datei anzeigen

@ -119,7 +119,9 @@ public interface PlayerInventory extends Inventory {
* @param id the id of the item you want to clear from the 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 * @param data the data of the item you want to clear from the inventory
* @return The number of items cleared * @return The number of items cleared
* @deprecated Magic value
*/ */
@Deprecated
public int clear(int id, int data); public int clear(int id, int data);
public HumanEntity getHolder(); public HumanEntity getHolder();

Datei anzeigen

@ -33,7 +33,7 @@ public class ShapedRecipe implements Recipe {
/** /**
* Set the shape of this recipe to the specified rows. Each character represents a different * 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 * 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. * rows are supplies the first string represents the top row on the workbench.
* *
* @param shape The rows of the recipe (up to 3 rows). * @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 ingredient The ingredient.
* @param raw The raw material data as an integer. * @param raw The raw material data as an integer.
* @return The changed recipe, so you can chain calls. * @return The changed recipe, so you can chain calls.
* @deprecated Magic value
*/ */
@Deprecated
public ShapedRecipe setIngredient(char key, Material ingredient, int raw) { public ShapedRecipe setIngredient(char key, Material ingredient, int raw) {
Validate.isTrue(ingredients.containsKey(key), "Symbol does not appear in the shape:", key); Validate.isTrue(ingredients.containsKey(key), "Symbol does not appear in the shape:", key);

Datei anzeigen

@ -59,7 +59,9 @@ public class ShapelessRecipe implements Recipe {
* @param ingredient The ingredient to add. * @param ingredient The ingredient to add.
* @param rawdata The data value, or -1 to allow any data value. * @param rawdata The data value, or -1 to allow any data value.
* @return The changed recipe, so you can chain calls. * @return The changed recipe, so you can chain calls.
* @deprecated Magic value
*/ */
@Deprecated
public ShapelessRecipe addIngredient(Material ingredient, int rawdata) { public ShapelessRecipe addIngredient(Material ingredient, int rawdata) {
return addIngredient(1, ingredient, rawdata); return addIngredient(1, ingredient, rawdata);
} }
@ -93,7 +95,9 @@ public class ShapelessRecipe implements Recipe {
* @param ingredient The ingredient to add. * @param ingredient The ingredient to add.
* @param rawdata The data value, or -1 to allow any data value. * @param rawdata The data value, or -1 to allow any data value.
* @return The changed recipe, so you can chain calls. * @return The changed recipe, so you can chain calls.
* @deprecated Magic value
*/ */
@Deprecated
public ShapelessRecipe addIngredient(int count, Material ingredient, int rawdata) { public ShapelessRecipe addIngredient(int count, Material ingredient, int rawdata) {
Validate.isTrue(ingredients.size() + count <= 9, "Shapeless recipes cannot have more than 9 ingredients"); 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 ingredient The ingredient to remove
* @param rawdata The data value; * @param rawdata The data value;
* @return The changed recipe. * @return The changed recipe.
* @deprecated Magic value
*/ */
@Deprecated
public ShapelessRecipe removeIngredient(Material ingredient, int rawdata) { public ShapelessRecipe removeIngredient(Material ingredient, int rawdata) {
return removeIngredient(1, ingredient, rawdata); return removeIngredient(1, ingredient, rawdata);
} }
@ -180,7 +186,9 @@ public class ShapelessRecipe implements Recipe {
* @param ingredient The ingredient to remove. * @param ingredient The ingredient to remove.
* @param rawdata The data value. * @param rawdata The data value.
* @return The changed recipe. * @return The changed recipe.
* @deprecated Magic value
*/ */
@Deprecated
public ShapelessRecipe removeIngredient(int count, Material ingredient, int rawdata) { public ShapelessRecipe removeIngredient(int count, Material ingredient, int rawdata) {
Iterator<ItemStack> iterator = ingredients.iterator(); Iterator<ItemStack> iterator = ingredients.iterator();
while (count > 0 && iterator.hasNext()) { while (count > 0 && iterator.hasNext()) {

Datei anzeigen

@ -4,7 +4,6 @@ package org.bukkit.map;
* Represents a cursor on a map. * Represents a cursor on a map.
*/ */
public final class MapCursor { public final class MapCursor {
private byte x, y; private byte x, y;
private byte direction, type; private byte direction, type;
private boolean visible; private boolean visible;
@ -17,7 +16,9 @@ public final class MapCursor {
* @param direction The facing of the cursor, from 0 to 15. * @param direction The facing of the cursor, from 0 to 15.
* @param type The type (color/style) of the map cursor. * @param type The type (color/style) of the map cursor.
* @param visible Whether the cursor is visible by default. * @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) { public MapCursor(byte x, byte y, byte direction, byte type, boolean visible) {
this.x = x; this.x = x;
this.y = y; this.y = y;
@ -66,7 +67,9 @@ public final class MapCursor {
* Get the type of this cursor. * Get the type of this cursor.
* *
* @return The type (color/style) of the map cursor. * @return The type (color/style) of the map cursor.
* @deprecated Magic value
*/ */
@Deprecated
public byte getRawType() { public byte getRawType() {
return type; return type;
} }
@ -123,7 +126,9 @@ public final class MapCursor {
* Set the type of this cursor. * Set the type of this cursor.
* *
* @param type The type (color/style) of the map cursor. * @param type The type (color/style) of the map cursor.
* @deprecated Magic value
*/ */
@Deprecated
public void setRawType(byte type) { public void setRawType(byte type) {
if (type < 0 || type > 15) { if (type < 0 || type > 15) {
throw new IllegalArgumentException("Type must be in the range 0-15"); throw new IllegalArgumentException("Type must be in the range 0-15");
@ -158,10 +163,20 @@ public final class MapCursor {
this.value = (byte) value; this.value = (byte) value;
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public byte getValue() { public byte getValue() {
return value; return value;
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public static Type byValue(byte value) { public static Type byValue(byte value) {
for (Type t : values()) { for (Type t : values()) {
if (t.value == value) return t; if (t.value == value) return t;

Datei anzeigen

@ -8,7 +8,6 @@ import java.util.List;
* MapCursorCollection is linked to a specific {@link MapRenderer}. * MapCursorCollection is linked to a specific {@link MapRenderer}.
*/ */
public final class MapCursorCollection { public final class MapCursorCollection {
private List<MapCursor> cursors = new ArrayList<MapCursor>(); 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 direction The facing of the cursor, from 0 to 15.
* @param type The type (color/style) of the map cursor. * @param type The type (color/style) of the map cursor.
* @return The newly added MapCursor. * @return The newly added MapCursor.
* @deprecated Magic value
*/ */
@Deprecated
public MapCursor addCursor(int x, int y, byte direction, byte type) { public MapCursor addCursor(int x, int y, byte direction, byte type) {
return addCursor(x, y, direction, type, true); 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 type The type (color/style) of the map cursor.
* @param visible Whether the cursor is visible. * @param visible Whether the cursor is visible.
* @return The newly added MapCursor. * @return The newly added MapCursor.
* @deprecated Magic value
*/ */
@Deprecated
public MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible) { public MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible) {
return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible)); return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible));
} }

Datei anzeigen

@ -7,6 +7,9 @@ import java.awt.image.BufferedImage;
/** /**
* Represents the palette that map items use. * 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 { public final class MapPalette {
@ -48,22 +51,74 @@ public final class MapPalette {
// Interface // Interface
/** /**
* The base color ranges. Each entry corresponds to four colors of varying * @deprecated Magic value
* shades with values entry to entry + 3.
*/ */
@Deprecated
public static final byte TRANSPARENT = 0; public static final byte TRANSPARENT = 0;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte LIGHT_GREEN = 4; public static final byte LIGHT_GREEN = 4;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte LIGHT_BROWN = 8; public static final byte LIGHT_BROWN = 8;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte GRAY_1 = 12; public static final byte GRAY_1 = 12;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte RED = 16; public static final byte RED = 16;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte PALE_BLUE = 20; public static final byte PALE_BLUE = 20;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte GRAY_2 = 24; public static final byte GRAY_2 = 24;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte DARK_GREEN = 28; public static final byte DARK_GREEN = 28;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte WHITE = 32; public static final byte WHITE = 32;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte LIGHT_GRAY = 36; public static final byte LIGHT_GRAY = 36;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte BROWN = 40; public static final byte BROWN = 40;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte DARK_GRAY = 44; public static final byte DARK_GRAY = 44;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte BLUE = 48; public static final byte BLUE = 48;
/**
* @deprecated Magic value
*/
@Deprecated
public static final byte DARK_BROWN = 52; public static final byte DARK_BROWN = 52;
/** /**
@ -85,7 +140,9 @@ public final class MapPalette {
* *
* @param image The image to convert. * @param image The image to convert.
* @return A byte[] containing the pixels of the image. * @return A byte[] containing the pixels of the image.
* @deprecated Magic value
*/ */
@Deprecated
public static byte[] imageToBytes(Image image) { public static byte[] imageToBytes(Image image) {
BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB); BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics = temp.createGraphics(); Graphics2D graphics = temp.createGraphics();
@ -109,7 +166,9 @@ public final class MapPalette {
* @param b The blue component of the color. * @param b The blue component of the color.
* @param g The green component of the color. * @param g The green component of the color.
* @return The index in the palette. * @return The index in the palette.
* @deprecated Magic value
*/ */
@Deprecated
public static byte matchColor(int r, int g, int b) { public static byte matchColor(int r, int g, int b) {
return matchColor(new Color(r, g, b)); return matchColor(new Color(r, g, b));
} }
@ -119,7 +178,9 @@ public final class MapPalette {
* *
* @param color The Color to match. * @param color The Color to match.
* @return The index in the palette. * @return The index in the palette.
* @deprecated Magic value
*/ */
@Deprecated
public static byte matchColor(Color color) { public static byte matchColor(Color color) {
if (color.getAlpha() < 128) return 0; if (color.getAlpha() < 128) return 0;
@ -142,7 +203,9 @@ public final class MapPalette {
* *
* @param index The index in the palette. * @param index The index in the palette.
* @return The Color of the palette entry. * @return The Color of the palette entry.
* @deprecated Magic value
*/ */
@Deprecated
public static Color getColor(byte index) { public static Color getColor(byte index) {
if (index < 0 || index >= colors.length) { if (index < 0 || index >= colors.length) {
throw new IndexOutOfBoundsException(); throw new IndexOutOfBoundsException();

Datei anzeigen

@ -29,7 +29,9 @@ public interface MapView {
* *
* @param value The raw scale * @param value The raw scale
* @return The enum scale, or null for an invalid input * @return The enum scale, or null for an invalid input
* @deprecated Magic value
*/ */
@Deprecated
public static Scale valueOf(byte value) { public static Scale valueOf(byte value) {
switch (value) { switch (value) {
case 0: return CLOSEST; case 0: return CLOSEST;
@ -45,7 +47,9 @@ public interface MapView {
* Get the raw value of this scale level. * Get the raw value of this scale level.
* *
* @return The scale value * @return The scale value
* @deprecated Magic value
*/ */
@Deprecated
public byte getValue() { public byte getValue() {
return value; return value;
} }
@ -56,7 +60,9 @@ public interface MapView {
* in an inventory. * in an inventory.
* *
* @return The ID of the map. * @return The ID of the map.
* @deprecated Magic value
*/ */
@Deprecated
public short getId(); public short getId();
/** /**

Datei anzeigen

@ -25,6 +25,11 @@ public class Bed extends MaterialData implements Directional {
setFacingDirection(direction); setFacingDirection(direction);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Bed(final int type) { public Bed(final int type) {
super(type); super(type);
} }
@ -33,10 +38,20 @@ public class Bed extends MaterialData implements Directional {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Bed(final int type, final byte data) { public Bed(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Bed(final Material type, final byte data) { public Bed(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -11,6 +11,11 @@ public class Button extends SimpleAttachableMaterialData implements Redstone {
super(Material.STONE_BUTTON); super(Material.STONE_BUTTON);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Button(final int type) { public Button(final int type) {
super(type); super(type);
} }
@ -19,10 +24,20 @@ public class Button extends SimpleAttachableMaterialData implements Redstone {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Button(final int type, final byte data) { public Button(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Button(final Material type, final byte data) { public Button(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -7,6 +7,11 @@ public class Cake extends MaterialData {
super(Material.CAKE_BLOCK); super(Material.CAKE_BLOCK);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Cake(int type) { public Cake(int type) {
super(type); super(type);
} }
@ -15,10 +20,20 @@ public class Cake extends MaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Cake(int type, byte data) { public Cake(int type, byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Cake(Material type, byte data) { public Cake(Material type, byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -13,10 +13,20 @@ public class Cauldron extends MaterialData {
super(Material.CAULDRON); super(Material.CAULDRON);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Cauldron(int type, byte data){ public Cauldron(int type, byte data){
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Cauldron(byte data) { public Cauldron(byte data) {
super(Material.CAULDRON, data); super(Material.CAULDRON, data);
} }

Datei anzeigen

@ -22,6 +22,11 @@ public class Chest extends DirectionalContainer {
setFacingDirection(direction); setFacingDirection(direction);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Chest(final int type) { public Chest(final int type) {
super(type); super(type);
} }
@ -30,10 +35,20 @@ public class Chest extends DirectionalContainer {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Chest(final int type, final byte data) { public Chest(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Chest(final Material type, final byte data) { public Chest(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -16,6 +16,11 @@ public class Coal extends MaterialData {
setType(type); setType(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Coal(final int type) { public Coal(final int type) {
super(type); super(type);
} }
@ -24,10 +29,20 @@ public class Coal extends MaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Coal(final int type, final byte data) { public Coal(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Coal(final Material type, final byte data) { public Coal(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -18,10 +18,20 @@ public class CocoaPlant extends MaterialData implements Directional, Attachable
super(Material.COCOA); super(Material.COCOA);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public CocoaPlant(final int type) { public CocoaPlant(final int type) {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public CocoaPlant(final int type, final byte data) { public CocoaPlant(final int type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -10,6 +10,11 @@ public class Command extends MaterialData implements Redstone {
super(Material.COMMAND); super(Material.COMMAND);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Command(final int type) { public Command(final int type) {
super(type); super(type);
} }
@ -18,10 +23,20 @@ public class Command extends MaterialData implements Redstone {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Command(final int type, final byte data) { public Command(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Command(final Material type, final byte data) { public Command(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -16,6 +16,11 @@ public class Crops extends MaterialData {
setState(state); setState(state);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Crops(final int type) { public Crops(final int type) {
super(type); super(type);
} }
@ -24,10 +29,20 @@ public class Crops extends MaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Crops(final int type, final byte data) { public Crops(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Crops(final Material type, final byte data) { public Crops(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -10,6 +10,11 @@ public class DetectorRail extends ExtendedRails implements PressureSensor {
super(Material.DETECTOR_RAIL); super(Material.DETECTOR_RAIL);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public DetectorRail(final int type) { public DetectorRail(final int type) {
super(type); super(type);
} }
@ -18,10 +23,20 @@ public class DetectorRail extends ExtendedRails implements PressureSensor {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public DetectorRail(final int type, final byte data) { public DetectorRail(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public DetectorRail(final Material type, final byte data) { public DetectorRail(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -8,6 +8,11 @@ public class Diode extends MaterialData implements Directional {
super(Material.DIODE_BLOCK_ON); super(Material.DIODE_BLOCK_ON);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Diode(int type) { public Diode(int type) {
super(type); super(type);
} }
@ -16,10 +21,20 @@ public class Diode extends MaterialData implements Directional {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Diode(int type, byte data) { public Diode(int type, byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Diode(Material type, byte data) { public Diode(Material type, byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -7,6 +7,11 @@ import org.bukkit.block.BlockFace;
* Represents a furnace or a dispenser. * Represents a furnace or a dispenser.
*/ */
public class DirectionalContainer extends MaterialData implements Directional { public class DirectionalContainer extends MaterialData implements Directional {
/**
*
* @deprecated Magic value
*/
@Deprecated
public DirectionalContainer(final int type) { public DirectionalContainer(final int type) {
super(type); super(type);
} }
@ -15,10 +20,20 @@ public class DirectionalContainer extends MaterialData implements Directional {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public DirectionalContainer(final int type, final byte data) { public DirectionalContainer(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public DirectionalContainer(final Material type, final byte data) { public DirectionalContainer(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -17,6 +17,11 @@ public class Dispenser extends FurnaceAndDispenser {
setFacingDirection(direction); setFacingDirection(direction);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Dispenser(final int type) { public Dispenser(final int type) {
super(type); super(type);
} }
@ -25,10 +30,20 @@ public class Dispenser extends FurnaceAndDispenser {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Dispenser(final int type, final byte data) { public Dispenser(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Dispenser(final Material type, final byte data) { public Dispenser(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -14,6 +14,11 @@ public class Door extends MaterialData implements Directional, Openable {
super(Material.WOODEN_DOOR); super(Material.WOODEN_DOOR);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Door(final int type) { public Door(final int type) {
super(type); super(type);
} }
@ -22,10 +27,20 @@ public class Door extends MaterialData implements Directional, Openable {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Door(final int type, final byte data) { public Door(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Door(final Material type, final byte data) { public Door(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -11,6 +11,11 @@ public class Dye extends MaterialData implements Colorable {
super(Material.INK_SACK); super(Material.INK_SACK);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Dye(final int type) { public Dye(final int type) {
super(type); super(type);
} }
@ -19,10 +24,20 @@ public class Dye extends MaterialData implements Colorable {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Dye(final int type, final byte data) { public Dye(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Dye(final Material type, final byte data) { public Dye(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -22,6 +22,11 @@ public class EnderChest extends DirectionalContainer {
setFacingDirection(direction); setFacingDirection(direction);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public EnderChest(final int type) { public EnderChest(final int type) {
super(type); super(type);
} }
@ -30,10 +35,20 @@ public class EnderChest extends DirectionalContainer {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public EnderChest(final int type, final byte data) { public EnderChest(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public EnderChest(final Material type, final byte data) { public EnderChest(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -7,6 +7,11 @@ import org.bukkit.block.BlockFace;
* This is the superclass for the {@link DetectorRail} and {@link PoweredRail} classes * This is the superclass for the {@link DetectorRail} and {@link PoweredRail} classes
*/ */
public class ExtendedRails extends Rails { public class ExtendedRails extends Rails {
/**
*
* @deprecated Magic value
*/
@Deprecated
public ExtendedRails(final int type) { public ExtendedRails(final int type) {
super(type); super(type);
} }
@ -15,10 +20,20 @@ public class ExtendedRails extends Rails {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public ExtendedRails(final int type, final byte data) { public ExtendedRails(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public ExtendedRails(final Material type, final byte data) { public ExtendedRails(final Material type, final byte data) {
super(type, data); super(type, data);
} }
@ -28,6 +43,11 @@ public class ExtendedRails extends Rails {
return false; return false;
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
@Override @Override
protected byte getConvertedData() { protected byte getConvertedData() {
return (byte) (getData() & 0x7); return (byte) (getData() & 0x7);

Datei anzeigen

@ -16,6 +16,11 @@ public class FlowerPot extends MaterialData {
super(Material.FLOWER_POT); super(Material.FLOWER_POT);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public FlowerPot(final int type) { public FlowerPot(final int type) {
super(type); super(type);
} }
@ -24,10 +29,20 @@ public class FlowerPot extends MaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public FlowerPot(final int type, final byte data) { public FlowerPot(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public FlowerPot(final Material type, final byte data) { public FlowerPot(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -22,6 +22,11 @@ public class Furnace extends FurnaceAndDispenser {
setFacingDirection(direction); setFacingDirection(direction);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Furnace(final int type) { public Furnace(final int type) {
super(type); super(type);
} }
@ -30,10 +35,20 @@ public class Furnace extends FurnaceAndDispenser {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Furnace(final int type, final byte data) { public Furnace(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Furnace(final Material type, final byte data) { public Furnace(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -6,6 +6,11 @@ import org.bukkit.Material;
* Represents a furnace or dispenser, two types of directional containers * Represents a furnace or dispenser, two types of directional containers
*/ */
public class FurnaceAndDispenser extends DirectionalContainer { public class FurnaceAndDispenser extends DirectionalContainer {
/**
*
* @deprecated Magic value
*/
@Deprecated
public FurnaceAndDispenser(final int type) { public FurnaceAndDispenser(final int type) {
super(type); super(type);
} }
@ -14,10 +19,20 @@ public class FurnaceAndDispenser extends DirectionalContainer {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public FurnaceAndDispenser(final int type, final byte data) { public FurnaceAndDispenser(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public FurnaceAndDispenser(final Material type, final byte data) { public FurnaceAndDispenser(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -11,6 +11,11 @@ public class Ladder extends SimpleAttachableMaterialData {
super(Material.LADDER); super(Material.LADDER);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Ladder(final int type) { public Ladder(final int type) {
super(type); super(type);
} }
@ -19,10 +24,20 @@ public class Ladder extends SimpleAttachableMaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Ladder(final int type, final byte data) { public Ladder(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Ladder(final Material type, final byte data) { public Ladder(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -16,6 +16,11 @@ public class Leaves extends MaterialData {
setSpecies(species); setSpecies(species);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Leaves(final int type) { public Leaves(final int type) {
super(type); super(type);
} }
@ -24,10 +29,20 @@ public class Leaves extends MaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Leaves(final int type, final byte data) { public Leaves(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Leaves(final Material type, final byte data) { public Leaves(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -11,6 +11,11 @@ public class Lever extends SimpleAttachableMaterialData implements Redstone {
super(Material.LEVER); super(Material.LEVER);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Lever(final int type) { public Lever(final int type) {
super(type); super(type);
} }
@ -19,10 +24,20 @@ public class Lever extends SimpleAttachableMaterialData implements Redstone {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Lever(final int type, final byte data) { public Lever(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Lever(final Material type, final byte data) { public Lever(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -16,6 +16,11 @@ public class LongGrass extends MaterialData {
setSpecies(species); setSpecies(species);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public LongGrass(final int type) { public LongGrass(final int type) {
super(type); super(type);
} }
@ -24,10 +29,20 @@ public class LongGrass extends MaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public LongGrass(final int type, final byte data) { public LongGrass(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public LongGrass(final Material type, final byte data) { public LongGrass(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -10,6 +10,11 @@ public class MaterialData implements Cloneable {
private final int type; private final int type;
private byte data = 0; private byte data = 0;
/**
*
* @deprecated Magic value
*/
@Deprecated
public MaterialData(final int type) { public MaterialData(final int type) {
this(type, (byte) 0); this(type, (byte) 0);
} }
@ -18,11 +23,21 @@ public class MaterialData implements Cloneable {
this(type, (byte) 0); this(type, (byte) 0);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public MaterialData(final int type, final byte data) { public MaterialData(final int type, final byte data) {
this.type = type; this.type = type;
this.data = data; this.data = data;
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public MaterialData(final Material type, final byte data) { public MaterialData(final Material type, final byte data) {
this(type.getId(), data); this(type.getId(), data);
} }
@ -31,7 +46,9 @@ public class MaterialData implements Cloneable {
* Gets the raw data in this material * Gets the raw data in this material
* *
* @return Raw data * @return Raw data
* @deprecated Magic value
*/ */
@Deprecated
public byte getData() { public byte getData() {
return data; return data;
} }
@ -40,7 +57,9 @@ public class MaterialData implements Cloneable {
* Sets the raw data of this material * Sets the raw data of this material
* *
* @param data New raw data * @param data New raw data
* @deprecated Magic value
*/ */
@Deprecated
public void setData(byte data) { public void setData(byte data) {
this.data = data; this.data = data;
} }
@ -58,7 +77,9 @@ public class MaterialData implements Cloneable {
* Gets the Material Id that this MaterialData represents * Gets the Material Id that this MaterialData represents
* *
* @return Material Id represented by this MaterialData * @return Material Id represented by this MaterialData
* @deprecated Magic value
*/ */
@Deprecated
public int getItemTypeId() { public int getItemTypeId() {
return type; return type;
} }

Datei anzeigen

@ -21,6 +21,11 @@ public class MonsterEggs extends TexturedMaterial {
super(Material.MONSTER_EGGS); super(Material.MONSTER_EGGS);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public MonsterEggs(final int type) { public MonsterEggs(final int type) {
super(type); super(type);
} }
@ -32,10 +37,20 @@ public class MonsterEggs extends TexturedMaterial {
} }
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public MonsterEggs(final int type, final byte data) { public MonsterEggs(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public MonsterEggs(final Material type, final byte data) { public MonsterEggs(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -26,11 +26,21 @@ public class Mushroom extends MaterialData {
Validate.isTrue(shroom == Material.HUGE_MUSHROOM_1 || shroom == Material.HUGE_MUSHROOM_2, "Not a mushroom!"); 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) { public Mushroom(Material shroom, byte data) {
super(shroom, data); super(shroom, data);
Validate.isTrue(shroom == Material.HUGE_MUSHROOM_1 || shroom == Material.HUGE_MUSHROOM_2, "Not a mushroom!"); 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){ public Mushroom(int type, byte data){
super(type, data); super(type, data);
Validate.isTrue(type == Material.HUGE_MUSHROOM_1.getId() || type == Material.HUGE_MUSHROOM_2.getId(), "Not a mushroom!"); Validate.isTrue(type == Material.HUGE_MUSHROOM_1.getId() || type == Material.HUGE_MUSHROOM_2.getId(), "Not a mushroom!");

Datei anzeigen

@ -16,6 +16,11 @@ public class NetherWarts extends MaterialData {
setState(state); setState(state);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public NetherWarts(final int type) { public NetherWarts(final int type) {
super(type); super(type);
} }
@ -24,10 +29,20 @@ public class NetherWarts extends MaterialData {
super (type); super (type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public NetherWarts(final int type, final byte data) { public NetherWarts(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public NetherWarts(final Material type, final byte data) { public NetherWarts(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -7,6 +7,11 @@ import org.bukkit.block.BlockFace;
* Material data for the piston base block * Material data for the piston base block
*/ */
public class PistonBaseMaterial extends MaterialData implements Directional, Redstone { public class PistonBaseMaterial extends MaterialData implements Directional, Redstone {
/**
*
* @deprecated Magic value
*/
@Deprecated
public PistonBaseMaterial(final int type) { public PistonBaseMaterial(final int type) {
super(type); super(type);
} }
@ -15,10 +20,20 @@ public class PistonBaseMaterial extends MaterialData implements Directional, Red
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PistonBaseMaterial(final int type, final byte data) { public PistonBaseMaterial(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PistonBaseMaterial(final Material type, final byte data) { public PistonBaseMaterial(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -7,6 +7,11 @@ import org.bukkit.block.BlockFace;
* Material data for the piston extension block * Material data for the piston extension block
*/ */
public class PistonExtensionMaterial extends MaterialData implements Attachable { public class PistonExtensionMaterial extends MaterialData implements Attachable {
/**
*
* @deprecated Magic value
*/
@Deprecated
public PistonExtensionMaterial(final int type) { public PistonExtensionMaterial(final int type) {
super(type); super(type);
} }
@ -15,10 +20,20 @@ public class PistonExtensionMaterial extends MaterialData implements Attachable
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PistonExtensionMaterial(final int type, final byte data) { public PistonExtensionMaterial(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PistonExtensionMaterial(final Material type, final byte data) { public PistonExtensionMaterial(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -10,6 +10,11 @@ public class PoweredRail extends ExtendedRails implements Redstone {
super(Material.POWERED_RAIL); super(Material.POWERED_RAIL);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PoweredRail(final int type) { public PoweredRail(final int type) {
super(type); super(type);
} }
@ -18,10 +23,20 @@ public class PoweredRail extends ExtendedRails implements Redstone {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PoweredRail(final int type, final byte data) { public PoweredRail(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PoweredRail(final Material type, final byte data) { public PoweredRail(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -10,6 +10,11 @@ public class PressurePlate extends MaterialData implements PressureSensor {
super(Material.WOOD_PLATE); super(Material.WOOD_PLATE);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PressurePlate(int type) { public PressurePlate(int type) {
super(type); super(type);
} }
@ -18,10 +23,20 @@ public class PressurePlate extends MaterialData implements PressureSensor {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PressurePlate(int type, byte data) { public PressurePlate(int type, byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public PressurePlate(Material type, byte data) { public PressurePlate(Material type, byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -22,6 +22,11 @@ public class Pumpkin extends MaterialData implements Directional {
setFacingDirection(direction); setFacingDirection(direction);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Pumpkin(final int type) { public Pumpkin(final int type) {
super(type); super(type);
} }
@ -30,10 +35,20 @@ public class Pumpkin extends MaterialData implements Directional {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Pumpkin(final int type, final byte data) { public Pumpkin(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Pumpkin(final Material type, final byte data) { public Pumpkin(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -12,6 +12,11 @@ public class Rails extends MaterialData {
super(Material.RAILS); super(Material.RAILS);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Rails(final int type) { public Rails(final int type) {
super(type); super(type);
} }
@ -20,10 +25,20 @@ public class Rails extends MaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Rails(final int type, final byte data) { public Rails(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Rails(final Material type, final byte data) { public Rails(final Material type, final byte data) {
super(type, 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 properties used by {@link PoweredRail} and {@link DetectorRail}. Overridden in {@link ExtendedRails}
* *
* @return the data without the extended part * @return the data without the extended part
* @deprecated Magic value
*/ */
@Deprecated
protected byte getConvertedData() { protected byte getConvertedData() {
return getData(); return getData();
} }

Datei anzeigen

@ -10,6 +10,11 @@ public class RedstoneTorch extends Torch implements Redstone {
super(Material.REDSTONE_TORCH_ON); super(Material.REDSTONE_TORCH_ON);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public RedstoneTorch(final int type) { public RedstoneTorch(final int type) {
super(type); super(type);
} }
@ -18,10 +23,20 @@ public class RedstoneTorch extends Torch implements Redstone {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public RedstoneTorch(final int type, final byte data) { public RedstoneTorch(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public RedstoneTorch(final Material type, final byte data) { public RedstoneTorch(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -10,6 +10,11 @@ public class RedstoneWire extends MaterialData implements Redstone {
super(Material.REDSTONE_WIRE); super(Material.REDSTONE_WIRE);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public RedstoneWire(final int type) { public RedstoneWire(final int type) {
super(type); super(type);
} }
@ -18,10 +23,20 @@ public class RedstoneWire extends MaterialData implements Redstone {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public RedstoneWire(final int type, final byte data) { public RedstoneWire(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public RedstoneWire(final Material type, final byte data) { public RedstoneWire(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -16,6 +16,11 @@ public class Sandstone extends MaterialData {
setType(type); setType(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Sandstone(final int type) { public Sandstone(final int type) {
super(type); super(type);
} }
@ -24,10 +29,20 @@ public class Sandstone extends MaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Sandstone(final int type, final byte data) { public Sandstone(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Sandstone(final Material type, final byte data) { public Sandstone(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -11,6 +11,11 @@ public class Sign extends MaterialData implements Attachable {
super(Material.SIGN_POST); super(Material.SIGN_POST);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Sign(final int type) { public Sign(final int type) {
super(type); super(type);
} }
@ -19,10 +24,20 @@ public class Sign extends MaterialData implements Attachable {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Sign(final int type, final byte data) { public Sign(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Sign(final Material type, final byte data) { public Sign(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -8,6 +8,11 @@ import org.bukkit.block.BlockFace;
*/ */
public abstract class SimpleAttachableMaterialData extends MaterialData implements Attachable { public abstract class SimpleAttachableMaterialData extends MaterialData implements Attachable {
/**
*
* @deprecated Magic value
*/
@Deprecated
public SimpleAttachableMaterialData(int type) { public SimpleAttachableMaterialData(int type) {
super(type); super(type);
} }
@ -26,10 +31,20 @@ public abstract class SimpleAttachableMaterialData extends MaterialData implemen
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public SimpleAttachableMaterialData(int type, byte data) { public SimpleAttachableMaterialData(int type, byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public SimpleAttachableMaterialData(Material type, byte data) { public SimpleAttachableMaterialData(Material type, byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -21,6 +21,11 @@ public class Skull extends MaterialData implements Directional {
setFacingDirection(direction); setFacingDirection(direction);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Skull(final int type) { public Skull(final int type) {
super(type); super(type);
} }
@ -29,10 +34,20 @@ public class Skull extends MaterialData implements Directional {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Skull(final int type, final byte data) { public Skull(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Skull(final Material type, final byte data) { public Skull(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -22,6 +22,11 @@ public class SmoothBrick extends TexturedMaterial {
super(Material.SMOOTH_BRICK); super(Material.SMOOTH_BRICK);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public SmoothBrick(final int type) { public SmoothBrick(final int type) {
super(type); super(type);
} }
@ -33,10 +38,20 @@ public class SmoothBrick extends TexturedMaterial {
} }
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public SmoothBrick(final int type, final byte data) { public SmoothBrick(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public SmoothBrick(final Material type, final byte data) { public SmoothBrick(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -7,14 +7,25 @@ import org.bukkit.entity.EntityType;
* Represents a spawn egg that can be used to spawn mobs * Represents a spawn egg that can be used to spawn mobs
*/ */
public class SpawnEgg extends MaterialData { public class SpawnEgg extends MaterialData {
public SpawnEgg() { public SpawnEgg() {
super(Material.MONSTER_EGG); super(Material.MONSTER_EGG);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public SpawnEgg(int type, byte data){ public SpawnEgg(int type, byte data){
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public SpawnEgg(byte data) { public SpawnEgg(byte data) {
super(Material.MONSTER_EGG, data); super(Material.MONSTER_EGG, data);
} }

Datei anzeigen

@ -8,6 +8,11 @@ import org.bukkit.block.BlockFace;
*/ */
public class Stairs extends MaterialData implements Directional { public class Stairs extends MaterialData implements Directional {
/**
*
* @deprecated Magic value
*/
@Deprecated
public Stairs(final int type) { public Stairs(final int type) {
super(type); super(type);
} }
@ -16,10 +21,20 @@ public class Stairs extends MaterialData implements Directional {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Stairs(final int type, final byte data) { public Stairs(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Stairs(final Material type, final byte data) { public Stairs(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -25,6 +25,11 @@ public class Step extends TexturedMaterial {
super(Material.STEP); super(Material.STEP);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Step(final int type) { public Step(final int type) {
super(type); super(type);
} }
@ -36,10 +41,20 @@ public class Step extends TexturedMaterial {
} }
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Step(final int type, final byte data) { public Step(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Step(final Material type, final byte data) { public Step(final Material type, final byte data) {
super(type, data); super(type, data);
} }
@ -57,7 +72,7 @@ public class Step extends TexturedMaterial {
public boolean isInverted() { public boolean isInverted() {
return ((getData() & 0x8) != 0); return ((getData() & 0x8) != 0);
} }
/** /**
* Set step inverted state * Set step inverted state
* *
@ -70,12 +85,22 @@ public class Step extends TexturedMaterial {
} }
setData((byte) dat); setData((byte) dat);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
@Override @Override
protected int getTextureIndex() { protected int getTextureIndex() {
return getData() & 0x7; return getData() & 0x7;
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
@Override @Override
protected void setTextureIndex(int idx) { protected void setTextureIndex(int idx) {
setData((byte) ((getData() & 0x8) | idx)); setData((byte) ((getData() & 0x8) | idx));

Datei anzeigen

@ -13,14 +13,29 @@ public abstract class TexturedMaterial extends MaterialData {
super(m); super(m);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public TexturedMaterial(int type) { public TexturedMaterial(int type) {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public TexturedMaterial(final int type, final byte data) { public TexturedMaterial(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public TexturedMaterial(final Material type, final byte data) { public TexturedMaterial(final Material type, final byte data) {
super(type, data); super(type, data);
} }
@ -64,7 +79,9 @@ public abstract class TexturedMaterial extends MaterialData {
* Get material index from data * Get material index from data
* *
* @return index of data in textures list * @return index of data in textures list
* @deprecated Magic value
*/ */
@Deprecated
protected int getTextureIndex() { protected int getTextureIndex() {
return getData(); // Default to using all bits - override for other mappings return getData(); // Default to using all bits - override for other mappings
} }
@ -73,7 +90,9 @@ public abstract class TexturedMaterial extends MaterialData {
* Set material index * Set material index
* *
* @param idx - index of data in textures list * @param idx - index of data in textures list
* @deprecated Magic value
*/ */
@Deprecated
protected void setTextureIndex(int idx) { protected void setTextureIndex(int idx) {
setData((byte) idx); // Defult to using all bits - override for other mappings setData((byte) idx); // Defult to using all bits - override for other mappings
} }

Datei anzeigen

@ -11,6 +11,11 @@ public class Torch extends SimpleAttachableMaterialData {
super(Material.TORCH); super(Material.TORCH);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Torch(final int type) { public Torch(final int type) {
super(type); super(type);
} }
@ -19,10 +24,20 @@ public class Torch extends SimpleAttachableMaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Torch(final int type, final byte data) { public Torch(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Torch(final Material type, final byte data) { public Torch(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -11,6 +11,11 @@ public class TrapDoor extends SimpleAttachableMaterialData implements Openable {
super(Material.TRAP_DOOR); super(Material.TRAP_DOOR);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public TrapDoor(final int type) { public TrapDoor(final int type) {
super(type); super(type);
} }
@ -19,10 +24,20 @@ public class TrapDoor extends SimpleAttachableMaterialData implements Openable {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public TrapDoor(final int type, final byte data) { public TrapDoor(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public TrapDoor(final Material type, final byte data) { public TrapDoor(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -23,6 +23,11 @@ public class Tree extends MaterialData {
setDirection(dir); setDirection(dir);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Tree(final int type) { public Tree(final int type) {
super(type); super(type);
} }
@ -31,10 +36,20 @@ public class Tree extends MaterialData {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Tree(final int type, final byte data) { public Tree(final int type, final byte data) {
super(type, data); super(type, data);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Tree(final Material type, final byte data) { public Tree(final Material type, final byte data) {
super(type, data); super(type, data);
} }

Datei anzeigen

@ -11,10 +11,20 @@ public class Tripwire extends MaterialData {
super(Material.TRIPWIRE); super(Material.TRIPWIRE);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Tripwire(final int type) { public Tripwire(final int type) {
super(type); super(type);
} }
/**
*
* @deprecated Magic value
*/
@Deprecated
public Tripwire(final int type, final byte data) { public Tripwire(final int type, final byte data) {
super(type, data); super(type, data);
} }

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen