#1082: Add "since" to Deprecation annotations

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
Bukkit/Spigot
2024-11-25 07:52:33 +11:00
parent 98f6ab9a04
commit 0023e5549a
257 changed files with 1523 additions and 1176 deletions

View File

@@ -6,5 +6,5 @@ import org.bukkit.material.Colorable;
* Represents a captured state of a bed.
* @deprecated does not provide useful information beyond the material itself
*/
@Deprecated
@Deprecated(since = "1.13")
public interface Bed extends TileState, Colorable { }

View File

@@ -40,7 +40,7 @@ public interface Block extends Metadatable, Translatable {
* @return block specific metadata
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
byte getData();
/**

View File

@@ -221,14 +221,14 @@ public interface BlockState extends Metadatable {
* @return The data as a raw byte.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public byte getRawData();
/**
* @param data The new data value for the block.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public void setRawData(byte data);
/**

View File

@@ -3634,6 +3634,6 @@ public interface BlockType extends Keyed, Translatable {
* @deprecated only for internal use
*/
@Nullable
@Deprecated
@Deprecated(since = "1.20.6")
Material asMaterial();
}

View File

@@ -15,7 +15,7 @@ public interface CreatureSpawner extends TileState, Spawner {
* @deprecated magic value, use
* {@link #setSpawnedType(org.bukkit.entity.EntityType)}.
*/
@Deprecated
@Deprecated(since = "1.11.2")
public void setCreatureTypeByName(@Nullable String creatureType);
/**
@@ -24,7 +24,7 @@ public interface CreatureSpawner extends TileState, Spawner {
* @return The creature type's name if is set.
* @deprecated magic value, use {@link #getSpawnedType()}.
*/
@Deprecated
@Deprecated(since = "1.11.2")
@Nullable
public String getCreatureTypeName();
}

View File

@@ -51,7 +51,7 @@ public interface DecoratedPot extends TileState, BlockInventoryHolder {
* @return the sherds
* @deprecated in favor of {@link #getSherds()}
*/
@Deprecated
@Deprecated(since = "1.20.1")
@NotNull
public List<Material> getShards();

View File

@@ -26,7 +26,7 @@ public interface Lockable {
* @deprecated locks are not necessarily pure strings
*/
@NotNull
@Deprecated
@Deprecated(since = "1.21.2")
String getLock();
/**
@@ -36,7 +36,7 @@ public interface Lockable {
* @param key the key required to access the container.
* @deprecated locks are not necessarily pure strings
*/
@Deprecated
@Deprecated(since = "1.21.2")
void setLock(@Nullable String key);
/**

View File

@@ -50,7 +50,7 @@ public enum PistonMoveReaction {
* @return The ID of the move reaction
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public int getId() {
return this.id;
}
@@ -60,7 +60,7 @@ public enum PistonMoveReaction {
* @return The move reaction with that ID
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
@Nullable
public static PistonMoveReaction getById(int id) {
return byId.get(id);

View File

@@ -19,7 +19,7 @@ public interface Sign extends TileState, Colorable {
* @return Array of Strings containing each line of text
* @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#getLines()}.
*/
@Deprecated
@Deprecated(since = "1.20")
@NotNull
public String[] getLines();
@@ -33,7 +33,7 @@ public interface Sign extends TileState, Colorable {
* @throws IndexOutOfBoundsException Thrown when the line does not exist
* @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#getLine(int)}.
*/
@Deprecated
@Deprecated(since = "1.20")
@NotNull
public String getLine(int index) throws IndexOutOfBoundsException;
@@ -48,7 +48,7 @@ public interface Sign extends TileState, Colorable {
* @throws IndexOutOfBoundsException If the index is out of the range 0..3
* @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#setLine(int, String)}.
*/
@Deprecated
@Deprecated(since = "1.20")
public void setLine(int index, @NotNull String line) throws IndexOutOfBoundsException;
/**
@@ -57,7 +57,7 @@ public interface Sign extends TileState, Colorable {
* @return if this sign is currently editable
* @deprecated use {@link #isWaxed()} instead
*/
@Deprecated
@Deprecated(since = "1.20.1")
public boolean isEditable();
/**
@@ -66,7 +66,7 @@ public interface Sign extends TileState, Colorable {
* @param editable if this sign is currently editable
* @deprecated use {@link #setWaxed(boolean)} instead
*/
@Deprecated
@Deprecated(since = "1.20.1")
public void setEditable(boolean editable);
/**
@@ -91,7 +91,7 @@ public interface Sign extends TileState, Colorable {
* @return if this sign has glowing text
* @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#isGlowingText()}.
*/
@Deprecated
@Deprecated(since = "1.20")
public boolean isGlowingText();
/**
@@ -100,7 +100,7 @@ public interface Sign extends TileState, Colorable {
* @param glowing if this sign has glowing text
* @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#setGlowingText(boolean)}.
*/
@Deprecated
@Deprecated(since = "1.20")
public void setGlowingText(boolean glowing);
/**
@@ -110,7 +110,7 @@ public interface Sign extends TileState, Colorable {
*/
@NotNull
@Override
@Deprecated
@Deprecated(since = "1.20")
public DyeColor getColor();
/**
@@ -119,7 +119,7 @@ public interface Sign extends TileState, Colorable {
* @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#setColor(org.bukkit.DyeColor)}.
*/
@Override
@Deprecated
@Deprecated(since = "1.20")
public void setColor(@NotNull DyeColor color);
/**

View File

@@ -28,7 +28,7 @@ public interface Skull extends TileState {
* @return the owner of the skull or null if the skull does not have an owner
* @deprecated See {@link #getOwningPlayer()}.
*/
@Deprecated
@Deprecated(since = "1.9.4")
@Nullable
public String getOwner();
@@ -42,7 +42,7 @@ public interface Skull extends TileState {
* @return true if the owner was successfully set
* @deprecated see {@link #setOwningPlayer(org.bukkit.OfflinePlayer)}.
*/
@Deprecated
@Deprecated(since = "1.94")
@Contract("null -> false")
public boolean setOwner(@Nullable String name);
@@ -115,7 +115,7 @@ public interface Skull extends TileState {
* @return the rotation of the skull
* @deprecated use {@link BlockData}
*/
@Deprecated
@Deprecated(since = "1.13")
@NotNull
public BlockFace getRotation();
@@ -126,7 +126,7 @@ public interface Skull extends TileState {
* @param rotation the rotation of the skull
* @deprecated use {@link BlockData}
*/
@Deprecated
@Deprecated(since = "1.13")
public void setRotation(@NotNull BlockFace rotation);
/**
@@ -135,7 +135,7 @@ public interface Skull extends TileState {
* @return the type of skull
* @deprecated check {@link Material} instead
*/
@Deprecated
@Deprecated(since = "1.13")
@NotNull
public SkullType getSkullType();
@@ -145,7 +145,7 @@ public interface Skull extends TileState {
* @param skullType the type of skull
* @deprecated check {@link Material} instead
*/
@Deprecated
@Deprecated(since = "1.13")
@Contract("_ -> fail")
public void setSkullType(SkullType skullType);
}

View File

@@ -5,6 +5,6 @@ package org.bukkit.block;
*
* @see BrushableBlock
*/
@Deprecated
@Deprecated(since = "1.20")
public interface SuspiciousSand extends BrushableBlock {
}

View File

@@ -69,7 +69,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
* @deprecated magic value
*/
@NotNull
@Deprecated(forRemoval = true)
@Deprecated(since = "1.20.4", forRemoval = true)
public String getIdentifier();
/**
@@ -83,7 +83,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
*/
@Contract("null -> null")
@Nullable
@Deprecated(forRemoval = true)
@Deprecated(since = "1.20.4", forRemoval = true)
public static PatternType getByIdentifier(@Nullable String identifier) {
if (identifier == null) {
return null;

View File

@@ -14,7 +14,7 @@ public interface Switch extends Directional, FaceAttachable, Powerable {
* @deprecated use {@link #getAttachedFace()}
*/
@NotNull
@Deprecated
@Deprecated(since = "1.15.2")
Face getFace();
/**
@@ -23,7 +23,7 @@ public interface Switch extends Directional, FaceAttachable, Powerable {
* @param face the new 'face' value
* @deprecated use {@link #getAttachedFace()}
*/
@Deprecated
@Deprecated(since = "1.15.2")
void setFace(@NotNull Face face);
/**
@@ -31,7 +31,7 @@ public interface Switch extends Directional, FaceAttachable, Powerable {
*
* @deprecated use {@link AttachedFace}
*/
@Deprecated
@Deprecated(since = "1.15.2")
public enum Face {
/**
* The switch is mounted to the floor and pointing upwards.

View File

@@ -24,7 +24,7 @@ public interface Vault extends Directional {
* @return the 'vault_state' value
* @deprecated see {@link #getVaultState()}
*/
@Deprecated(forRemoval = true)
@Deprecated(since = "1.21.3", forRemoval = true)
@NotNull
State getTrialSpawnerState();
@@ -41,7 +41,7 @@ public interface Vault extends Directional {
* @param state the new 'vault_state' value
* @deprecated see {@link #setVaultState(State)}
*/
@Deprecated(forRemoval = true)
@Deprecated(since = "1.21.3", forRemoval = true)
void setTrialSpawnerState(@NotNull State state);
/**