Explicitly deprecate all MaterialData subclasses

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2019-05-20 20:09:17 +10:00
parent 3acdc1f1b9
commit 7a2194f937
59 changed files with 231 additions and 4 deletions

View File

@@ -3,6 +3,11 @@ package org.bukkit.material;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
/**
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/
@Deprecated
public class Banner extends MaterialData implements Attachable { public class Banner extends MaterialData implements Attachable {
public Banner() { public Banner() {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a bed. * Represents a bed.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Bed extends MaterialData implements Directional { public class Bed extends MaterialData implements Directional {
/** /**

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a button * Represents a button
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Button extends SimpleAttachableMaterialData implements Redstone { public class Button extends SimpleAttachableMaterialData implements Redstone {
public Button() { public Button() {
super(Material.LEGACY_STONE_BUTTON); super(Material.LEGACY_STONE_BUTTON);

View File

@@ -2,6 +2,11 @@ package org.bukkit.material;
import org.bukkit.Material; import org.bukkit.Material;
/**
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/
@Deprecated
public class Cake extends MaterialData { public class Cake extends MaterialData {
public Cake() { public Cake() {
super(Material.LEGACY_CAKE_BLOCK); super(Material.LEGACY_CAKE_BLOCK);

View File

@@ -4,7 +4,11 @@ import org.bukkit.Material;
/** /**
* Represents a cauldron * Represents a cauldron
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Cauldron extends MaterialData { public class Cauldron extends MaterialData {
private static final int CAULDRON_FULL = 3; private static final int CAULDRON_FULL = 3;
private static final int CAULDRON_EMPTY = 0; private static final int CAULDRON_EMPTY = 0;

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a chest * Represents a chest
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Chest extends DirectionalContainer { public class Chest extends DirectionalContainer {
public Chest() { public Chest() {

View File

@@ -5,7 +5,11 @@ import org.bukkit.Material;
/** /**
* Represents the different types of coals. * Represents the different types of coals.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Coal extends MaterialData { public class Coal extends MaterialData {
public Coal() { public Coal() {
super(Material.LEGACY_COAL); super(Material.LEGACY_COAL);

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents the cocoa plant * Represents the cocoa plant
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class CocoaPlant extends MaterialData implements Directional, Attachable { public class CocoaPlant extends MaterialData implements Directional, Attachable {
public enum CocoaPlantSize { public enum CocoaPlantSize {

View File

@@ -4,7 +4,11 @@ import org.bukkit.Material;
/** /**
* Represents a command block * Represents a command block
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Command extends MaterialData implements Redstone { public class Command extends MaterialData implements Redstone {
public Command() { public Command() {
super(Material.LEGACY_COMMAND); super(Material.LEGACY_COMMAND);

View File

@@ -8,7 +8,11 @@ import org.bukkit.block.BlockFace;
* *
* @see Material#LEGACY_REDSTONE_COMPARATOR_OFF * @see Material#LEGACY_REDSTONE_COMPARATOR_OFF
* @see Material#LEGACY_REDSTONE_COMPARATOR_ON * @see Material#LEGACY_REDSTONE_COMPARATOR_ON
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Comparator extends MaterialData implements Directional, Redstone { public class Comparator extends MaterialData implements Directional, Redstone {
protected static final BlockFace DEFAULT_DIRECTION = BlockFace.NORTH; protected static final BlockFace DEFAULT_DIRECTION = BlockFace.NORTH;
protected static final boolean DEFAULT_SUBTRACTION_MODE = false; protected static final boolean DEFAULT_SUBTRACTION_MODE = false;

View File

@@ -11,7 +11,11 @@ import org.bukkit.Material;
* @see Material#LEGACY_POTATO * @see Material#LEGACY_POTATO
* @see Material#LEGACY_BEETROOT_BLOCK * @see Material#LEGACY_BEETROOT_BLOCK
* @see Material#LEGACY_NETHER_WARTS * @see Material#LEGACY_NETHER_WARTS
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Crops extends MaterialData { public class Crops extends MaterialData {
protected static final Material DEFAULT_TYPE = Material.LEGACY_CROPS; protected static final Material DEFAULT_TYPE = Material.LEGACY_CROPS;
protected static final CropState DEFAULT_STATE = CropState.SEEDED; protected static final CropState DEFAULT_STATE = CropState.SEEDED;

View File

@@ -4,7 +4,11 @@ import org.bukkit.Material;
/** /**
* Represents a detector rail * Represents a detector rail
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class DetectorRail extends ExtendedRails implements PressureSensor { public class DetectorRail extends ExtendedRails implements PressureSensor {
public DetectorRail() { public DetectorRail() {
super(Material.LEGACY_DETECTOR_RAIL); super(Material.LEGACY_DETECTOR_RAIL);

View File

@@ -9,7 +9,11 @@ import org.bukkit.block.BlockFace;
* *
* @see Material#LEGACY_DIODE_BLOCK_OFF * @see Material#LEGACY_DIODE_BLOCK_OFF
* @see Material#LEGACY_DIODE_BLOCK_ON * @see Material#LEGACY_DIODE_BLOCK_ON
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Diode extends MaterialData implements Directional, Redstone { public class Diode extends MaterialData implements Directional, Redstone {
protected static final BlockFace DEFAULT_DIRECTION = BlockFace.NORTH; protected static final BlockFace DEFAULT_DIRECTION = BlockFace.NORTH;

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a furnace or a dispenser. * Represents a furnace or a dispenser.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class DirectionalContainer extends MaterialData implements Directional { public class DirectionalContainer extends MaterialData implements Directional {
public DirectionalContainer(final Material type) { public DirectionalContainer(final Material type) {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a dispenser. * Represents a dispenser.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Dispenser extends FurnaceAndDispenser { public class Dispenser extends FurnaceAndDispenser {
public Dispenser() { public Dispenser() {

View File

@@ -18,7 +18,11 @@ import org.bukkit.block.BlockFace;
* @see Material#LEGACY_JUNGLE_DOOR * @see Material#LEGACY_JUNGLE_DOOR
* @see Material#LEGACY_ACACIA_DOOR * @see Material#LEGACY_ACACIA_DOOR
* @see Material#LEGACY_DARK_OAK_DOOR * @see Material#LEGACY_DARK_OAK_DOOR
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Door extends MaterialData implements Directional, Openable { public class Door extends MaterialData implements Directional, Openable {
// This class breaks API contracts on Directional and Openable because // This class breaks API contracts on Directional and Openable because

View File

@@ -5,7 +5,11 @@ import org.bukkit.Material;
/** /**
* Represents dye * Represents dye
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Dye extends MaterialData implements Colorable { public class Dye extends MaterialData implements Colorable {
public Dye() { public Dye() {
super(Material.LEGACY_INK_SACK); super(Material.LEGACY_INK_SACK);

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents an ender chest * Represents an ender chest
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class EnderChest extends DirectionalContainer { public class EnderChest extends DirectionalContainer {
public EnderChest() { public EnderChest() {

View File

@@ -6,7 +6,11 @@ import org.bukkit.block.BlockFace;
/** /**
* This is the superclass for the {@link DetectorRail} and {@link PoweredRail} * This is the superclass for the {@link DetectorRail} and {@link PoweredRail}
* classes * classes
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class ExtendedRails extends Rails { public class ExtendedRails extends Rails {
public ExtendedRails(final Material type) { public ExtendedRails(final Material type) {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a furnace. * Represents a furnace.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Furnace extends FurnaceAndDispenser { public class Furnace extends FurnaceAndDispenser {
public Furnace() { public Furnace() {

View File

@@ -4,7 +4,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
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class FurnaceAndDispenser extends DirectionalContainer { public class FurnaceAndDispenser extends DirectionalContainer {
public FurnaceAndDispenser(final Material type) { public FurnaceAndDispenser(final Material type) {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a fence gate * Represents a fence gate
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Gate extends MaterialData implements Directional, Openable { public class Gate extends MaterialData implements Directional, Openable {
private static final byte OPEN_BIT = 0x4; private static final byte OPEN_BIT = 0x4;
private static final byte DIR_BIT = 0x3; private static final byte DIR_BIT = 0x3;

View File

@@ -8,7 +8,11 @@ import org.bukkit.block.BlockFace;
* specific direction. * specific direction.
* *
* @see Material#HOPPER * @see Material#HOPPER
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Hopper extends MaterialData implements Directional, Redstone { public class Hopper extends MaterialData implements Directional, Redstone {
protected static final BlockFace DEFAULT_DIRECTION = BlockFace.DOWN; protected static final BlockFace DEFAULT_DIRECTION = BlockFace.DOWN;

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents Ladder data * Represents Ladder data
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Ladder extends SimpleAttachableMaterialData { public class Ladder extends SimpleAttachableMaterialData {
public Ladder() { public Ladder() {
super(Material.LEGACY_LADDER); super(Material.LEGACY_LADDER);

View File

@@ -9,7 +9,11 @@ import org.bukkit.TreeSpecies;
* *
* @see Material#LEGACY_LEAVES * @see Material#LEGACY_LEAVES
* @see Material#LEGACY_LEAVES_2 * @see Material#LEGACY_LEAVES_2
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Leaves extends Wood { public class Leaves extends Wood {
protected static final Material DEFAULT_TYPE = Material.LEGACY_LEAVES; protected static final Material DEFAULT_TYPE = Material.LEGACY_LEAVES;
protected static final boolean DEFAULT_DECAYABLE = true; protected static final boolean DEFAULT_DECAYABLE = true;

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a lever * Represents a lever
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Lever extends SimpleAttachableMaterialData implements Redstone { public class Lever extends SimpleAttachableMaterialData implements Redstone {
public Lever() { public Lever() {
super(Material.LEGACY_LEVER); super(Material.LEGACY_LEVER);

View File

@@ -5,7 +5,11 @@ import org.bukkit.Material;
/** /**
* Represents the different types of long grasses. * Represents the different types of long grasses.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class LongGrass extends MaterialData { public class LongGrass extends MaterialData {
public LongGrass() { public LongGrass() {
super(Material.LEGACY_LONG_GRASS); super(Material.LEGACY_LONG_GRASS);

View File

@@ -1,14 +1,13 @@
package org.bukkit.material; package org.bukkit.material;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.data.BlockData;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
/** /**
* Handles specific metadata for certain items or blocks * Handles specific metadata for certain items or blocks
* *
* @deprecated all usage of MaterialData is deprecated and subject to removal. * @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link BlockData}. * Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated @Deprecated
public class MaterialData implements Cloneable { public class MaterialData implements Cloneable {

View File

@@ -6,7 +6,11 @@ import org.bukkit.Material;
/** /**
* Represents the different types of monster eggs * Represents the different types of monster eggs
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class MonsterEggs extends TexturedMaterial { public class MonsterEggs extends TexturedMaterial {
private static final List<Material> textures = new ArrayList<Material>(); private static final List<Material> textures = new ArrayList<Material>();

View File

@@ -13,7 +13,11 @@ import org.bukkit.material.types.MushroomBlockTexture;
* *
* @see Material#LEGACY_HUGE_MUSHROOM_1 * @see Material#LEGACY_HUGE_MUSHROOM_1
* @see Material#LEGACY_HUGE_MUSHROOM_2 * @see Material#LEGACY_HUGE_MUSHROOM_2
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Mushroom extends MaterialData { public class Mushroom extends MaterialData {
private static final byte NORTH_LIMIT = 4; private static final byte NORTH_LIMIT = 4;
private static final byte SOUTH_LIMIT = 6; private static final byte SOUTH_LIMIT = 6;

View File

@@ -5,7 +5,11 @@ import org.bukkit.NetherWartsState;
/** /**
* Represents nether wart * Represents nether wart
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class NetherWarts extends MaterialData { public class NetherWarts extends MaterialData {
public NetherWarts() { public NetherWarts() {
super(Material.LEGACY_NETHER_WARTS); super(Material.LEGACY_NETHER_WARTS);

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents an observer. * Represents an observer.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Observer extends MaterialData implements Directional, Redstone { public class Observer extends MaterialData implements Directional, Redstone {
public Observer() { public Observer() {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Material data for the piston base block * Material data for the piston base block
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class PistonBaseMaterial extends MaterialData implements Directional, Redstone { public class PistonBaseMaterial extends MaterialData implements Directional, Redstone {
public PistonBaseMaterial(final Material type) { public PistonBaseMaterial(final Material type) {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Material data for the piston extension block * Material data for the piston extension block
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class PistonExtensionMaterial extends MaterialData implements Attachable { public class PistonExtensionMaterial extends MaterialData implements Attachable {
public PistonExtensionMaterial(final Material type) { public PistonExtensionMaterial(final Material type) {

View File

@@ -4,7 +4,11 @@ import org.bukkit.Material;
/** /**
* Represents a powered rail * Represents a powered rail
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class PoweredRail extends ExtendedRails implements Redstone { public class PoweredRail extends ExtendedRails implements Redstone {
public PoweredRail() { public PoweredRail() {
super(Material.LEGACY_POWERED_RAIL); super(Material.LEGACY_POWERED_RAIL);

View File

@@ -4,7 +4,11 @@ import org.bukkit.Material;
/** /**
* Represents a pressure plate * Represents a pressure plate
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class PressurePlate extends MaterialData implements PressureSensor { public class PressurePlate extends MaterialData implements PressureSensor {
public PressurePlate() { public PressurePlate() {
super(Material.LEGACY_WOOD_PLATE); super(Material.LEGACY_WOOD_PLATE);

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a pumpkin. * Represents a pumpkin.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Pumpkin extends MaterialData implements Directional { public class Pumpkin extends MaterialData implements Directional {
public Pumpkin() { public Pumpkin() {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents minecart rails. * Represents minecart rails.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Rails extends MaterialData { public class Rails extends MaterialData {
public Rails() { public Rails() {

View File

@@ -4,7 +4,11 @@ import org.bukkit.Material;
/** /**
* Represents a redstone torch * Represents a redstone torch
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class RedstoneTorch extends Torch implements Redstone { public class RedstoneTorch extends Torch implements Redstone {
public RedstoneTorch() { public RedstoneTorch() {
super(Material.LEGACY_REDSTONE_TORCH_ON); super(Material.LEGACY_REDSTONE_TORCH_ON);

View File

@@ -4,7 +4,11 @@ import org.bukkit.Material;
/** /**
* Represents redstone wire * Represents redstone wire
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class RedstoneWire extends MaterialData implements Redstone { public class RedstoneWire extends MaterialData implements Redstone {
public RedstoneWire() { public RedstoneWire() {
super(Material.LEGACY_REDSTONE_WIRE); super(Material.LEGACY_REDSTONE_WIRE);

View File

@@ -5,7 +5,11 @@ import org.bukkit.SandstoneType;
/** /**
* Represents the different types of sandstone. * Represents the different types of sandstone.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Sandstone extends MaterialData { public class Sandstone extends MaterialData {
public Sandstone() { public Sandstone() {
super(Material.LEGACY_SANDSTONE); super(Material.LEGACY_SANDSTONE);

View File

@@ -7,7 +7,11 @@ import org.bukkit.TreeSpecies;
* Represents the different types of Tree block that face a direction. * Represents the different types of Tree block that face a direction.
* *
* @see Material#LEGACY_SAPLING * @see Material#LEGACY_SAPLING
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Sapling extends Wood { public class Sapling extends Wood {
/** /**

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* MaterialData for signs * MaterialData for signs
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Sign extends MaterialData implements Attachable { public class Sign extends MaterialData implements Attachable {
public Sign() { public Sign() {
super(Material.LEGACY_SIGN_POST); super(Material.LEGACY_SIGN_POST);

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Simple utility class for attachable MaterialData subclasses * Simple utility class for attachable MaterialData subclasses
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public abstract class SimpleAttachableMaterialData extends MaterialData implements Attachable { public abstract class SimpleAttachableMaterialData extends MaterialData implements Attachable {
public SimpleAttachableMaterialData(Material type, BlockFace direction) { public SimpleAttachableMaterialData(Material type, BlockFace direction) {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a skull. * Represents a skull.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Skull extends MaterialData implements Directional { public class Skull extends MaterialData implements Directional {
public Skull() { public Skull() {
super(Material.LEGACY_SKULL); super(Material.LEGACY_SKULL);

View File

@@ -6,7 +6,11 @@ import org.bukkit.Material;
/** /**
* Represents the different types of smooth bricks. * Represents the different types of smooth bricks.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class SmoothBrick extends TexturedMaterial { public class SmoothBrick extends TexturedMaterial {
private static final List<Material> textures = new ArrayList<Material>(); private static final List<Material> textures = new ArrayList<Material>();

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents stairs. * Represents stairs.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Stairs extends MaterialData implements Directional { public class Stairs extends MaterialData implements Directional {
public Stairs(final Material type) { public Stairs(final Material type) {

View File

@@ -6,7 +6,11 @@ import org.bukkit.Material;
/** /**
* Represents the different types of steps. * Represents the different types of steps.
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Step extends TexturedMaterial { public class Step extends TexturedMaterial {
private static final List<Material> textures = new ArrayList<Material>(); private static final List<Material> textures = new ArrayList<Material>();
static { static {

View File

@@ -5,7 +5,11 @@ import org.bukkit.Material;
/** /**
* Represents textured materials like steps and smooth bricks * Represents textured materials like steps and smooth bricks
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public abstract class TexturedMaterial extends MaterialData { public abstract class TexturedMaterial extends MaterialData {
public TexturedMaterial(Material m) { public TexturedMaterial(Material m) {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* MaterialData for torches * MaterialData for torches
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Torch extends SimpleAttachableMaterialData { public class Torch extends SimpleAttachableMaterialData {
public Torch() { public Torch() {
super(Material.LEGACY_TORCH); super(Material.LEGACY_TORCH);

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a trap door * Represents a trap door
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class TrapDoor extends SimpleAttachableMaterialData implements Openable { public class TrapDoor extends SimpleAttachableMaterialData implements Openable {
public TrapDoor() { public TrapDoor() {
super(Material.LEGACY_TRAP_DOOR); super(Material.LEGACY_TRAP_DOOR);

View File

@@ -9,7 +9,11 @@ import org.bukkit.block.BlockFace;
* *
* @see Material#LEGACY_LOG * @see Material#LEGACY_LOG
* @see Material#LEGACY_LOG_2 * @see Material#LEGACY_LOG_2
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Tree extends Wood { public class Tree extends Wood {
protected static final Material DEFAULT_TYPE = Material.LEGACY_LOG; protected static final Material DEFAULT_TYPE = Material.LEGACY_LOG;
protected static final BlockFace DEFAULT_DIRECTION = BlockFace.UP; protected static final BlockFace DEFAULT_DIRECTION = BlockFace.UP;

View File

@@ -4,7 +4,11 @@ import org.bukkit.Material;
/** /**
* Represents the tripwire * Represents the tripwire
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Tripwire extends MaterialData { public class Tripwire extends MaterialData {
public Tripwire() { public Tripwire() {

View File

@@ -5,7 +5,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents the tripwire hook * Represents the tripwire hook
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class TripwireHook extends SimpleAttachableMaterialData implements Redstone { public class TripwireHook extends SimpleAttachableMaterialData implements Redstone {
public TripwireHook() { public TripwireHook() {

View File

@@ -7,7 +7,11 @@ import org.bukkit.block.BlockFace;
/** /**
* Represents a vine * Represents a vine
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Vine extends MaterialData { public class Vine extends MaterialData {
private static final int VINE_NORTH = 0x4; private static final int VINE_NORTH = 0x4;
private static final int VINE_EAST = 0x8; private static final int VINE_EAST = 0x8;

View File

@@ -9,7 +9,11 @@ import org.bukkit.TreeSpecies;
* @see Material#LEGACY_WOOD * @see Material#LEGACY_WOOD
* @see Material#LEGACY_SAPLING * @see Material#LEGACY_SAPLING
* @see Material#LEGACY_WOOD_DOUBLE_STEP * @see Material#LEGACY_WOOD_DOUBLE_STEP
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Wood extends MaterialData { public class Wood extends MaterialData {
protected static final Material DEFAULT_TYPE = Material.LEGACY_WOOD; protected static final Material DEFAULT_TYPE = Material.LEGACY_WOOD;
protected static final TreeSpecies DEFAULT_SPECIES = TreeSpecies.GENERIC; protected static final TreeSpecies DEFAULT_SPECIES = TreeSpecies.GENERIC;

View File

@@ -7,7 +7,11 @@ import org.bukkit.TreeSpecies;
* Represents the different types of wooden steps. * Represents the different types of wooden steps.
* *
* @see Material#LEGACY_WOOD_STEP * @see Material#LEGACY_WOOD_STEP
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class WoodenStep extends Wood { public class WoodenStep extends Wood {
protected static final Material DEFAULT_TYPE = Material.LEGACY_WOOD_STEP; protected static final Material DEFAULT_TYPE = Material.LEGACY_WOOD_STEP;
protected static final boolean DEFAULT_INVERTED = false; protected static final boolean DEFAULT_INVERTED = false;

View File

@@ -5,7 +5,10 @@ import org.bukkit.Material;
/** /**
* Represents a Wool/Cloth block * Represents a Wool/Cloth block
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/ */
@Deprecated
public class Wool extends MaterialData implements Colorable { public class Wool extends MaterialData implements Colorable {
public Wool() { public Wool() {
super(Material.LEGACY_WOOL); super(Material.LEGACY_WOOL);

View File

@@ -132,8 +132,7 @@ public class AnnotationTest {
} }
if (isSubclassOf(clazz, "org/bukkit/material/MaterialData", allClasses)) { if (isSubclassOf(clazz, "org/bukkit/material/MaterialData", allClasses)) {
// MaterialData is deprecated and all of its subclasses are excluded throw new AssertionError("Subclass of MaterialData must be deprecated: " + clazz.name);
return false;
} }
if (isSubclassOf(clazz, "java/lang/Exception", allClasses) if (isSubclassOf(clazz, "java/lang/Exception", allClasses)