#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

@@ -86,7 +86,7 @@ public interface MapCanvas {
* @param color The color. See {@link MapPalette}.
* @deprecated Magic value, use {@link #setPixelColor(int, int, Color)}
*/
@Deprecated
@Deprecated(since = "1.20.5")
public void setPixel(int x, int y, byte color);
/**
@@ -97,7 +97,7 @@ public interface MapCanvas {
* @return The color. See {@link MapPalette}.
* @deprecated Magic value, use {@link #getPixelColor(int, int)}
*/
@Deprecated
@Deprecated(since = "1.19")
public byte getPixel(int x, int y);
/**
@@ -108,7 +108,7 @@ public interface MapCanvas {
* @return The color. See {@link MapPalette}.
* @deprecated Magic value, use {@link #getBasePixelColor(int, int)}
*/
@Deprecated
@Deprecated(since = "1.19")
public byte getBasePixel(int x, int y);
/**

View File

@@ -30,7 +30,7 @@ public final class MapCursor {
* @param visible Whether the cursor is visible by default.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public MapCursor(byte x, byte y, byte direction, byte type, boolean visible) {
this(x, y, direction, type, visible, null);
}
@@ -59,7 +59,7 @@ public final class MapCursor {
* @param caption cursor caption
* @deprecated Magic value, use {@link #MapCursor(byte, byte, byte, Type, boolean, String)}
*/
@Deprecated
@Deprecated(since = "1.13")
public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable String caption) {
this.x = x;
this.y = y;
@@ -131,7 +131,7 @@ public final class MapCursor {
* @return The type (color/style) of the map cursor.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public byte getRawType() {
return type.getValue();
}
@@ -188,7 +188,7 @@ public final class MapCursor {
* @param type The type (color/style) of the map cursor.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public void setRawType(byte type) {
Type enumType = Type.byValue(type);
Preconditions.checkArgument(enumType != null, "Unknown type by id %s", type);
@@ -278,7 +278,7 @@ public final class MapCursor {
* @return the value
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
byte getValue();
/**
@@ -288,7 +288,7 @@ public final class MapCursor {
* @return the matching type
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
@Nullable
static Type byValue(byte value) {
for (Type t : values()) {

View File

@@ -77,7 +77,7 @@ public final class MapCursorCollection {
* @return The newly added MapCursor.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
@NotNull
public MapCursor addCursor(int x, int y, byte direction, byte type) {
return addCursor(x, y, direction, type, true);
@@ -94,7 +94,7 @@ public final class MapCursorCollection {
* @return The newly added MapCursor.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
@NotNull
public MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible) {
return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible));
@@ -112,7 +112,7 @@ public final class MapCursorCollection {
* @return The newly added MapCursor.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.13")
@NotNull
public MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible, @Nullable String caption) {
return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible, caption));

View File

@@ -109,72 +109,72 @@ public final class MapPalette {
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte TRANSPARENT = 0;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte LIGHT_GREEN = 4;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte LIGHT_BROWN = 8;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte GRAY_1 = 12;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte RED = 16;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte PALE_BLUE = 20;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte GRAY_2 = 24;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte DARK_GREEN = 28;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte WHITE = 32;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte LIGHT_GRAY = 36;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte BROWN = 40;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte DARK_GRAY = 44;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte BLUE = 48;
/**
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static final byte DARK_BROWN = 52;
/**
@@ -199,7 +199,7 @@ public final class MapPalette {
* @return A byte[] containing the pixels of the image.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
@NotNull
public static byte[] imageToBytes(@NotNull Image image) {
BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB);
@@ -227,7 +227,7 @@ public final class MapPalette {
* @return The index in the palette.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static byte matchColor(int r, int g, int b) {
return matchColor(new Color(r, g, b));
}
@@ -240,7 +240,7 @@ public final class MapPalette {
* @return The index in the palette.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public static byte matchColor(@NotNull Color color) {
if (color.getAlpha() < 128) return 0;
@@ -270,7 +270,7 @@ public final class MapPalette {
* @return The Color of the palette entry.
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
@NotNull
public static Color getColor(byte index) {
// Minecraft has 143 colors, some of which have negative byte representations
@@ -313,7 +313,7 @@ public final class MapPalette {
* @throws IllegalStateException if {@link #isCached()} returns false
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.19")
byte matchColor(@NotNull Color color);
}
}

View File

@@ -34,7 +34,7 @@ public interface MapView {
* @return The enum scale, or null for an invalid input
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
@Nullable
public static Scale valueOf(byte value) {
switch (value) {
@@ -53,7 +53,7 @@ public interface MapView {
* @return The scale value
* @deprecated Magic value
*/
@Deprecated
@Deprecated(since = "1.6.2")
public byte getValue() {
return value;
}