Fix Spigot annotation mistakes
while some of these may of been true, they are extreme cases and cause a ton of noise to plugin developers. Use ApiStatus.Internal instead of Deprecated for actual internal API that continues to have use (internally). These do not help plugin developers if they bring moise noise than value.
This commit is contained in:
@@ -95,9 +95,9 @@ public interface MapCanvas {
|
||||
* @param x The x coordinate, from 0 to 127.
|
||||
* @param y The y coordinate, from 0 to 127.
|
||||
* @return The color. See {@link MapPalette}.
|
||||
* @deprecated Magic value, use {@link #getPixelColor(int, int)}
|
||||
* @deprecated use {@link #getPixelColor(int, int)}
|
||||
*/
|
||||
@Deprecated(since = "1.19")
|
||||
@Deprecated(since = "1.19", forRemoval = true) // Paper
|
||||
public byte getPixel(int x, int y);
|
||||
|
||||
/**
|
||||
@@ -106,9 +106,9 @@ public interface MapCanvas {
|
||||
* @param x The x coordinate, from 0 to 127.
|
||||
* @param y The y coordinate, from 0 to 127.
|
||||
* @return The color. See {@link MapPalette}.
|
||||
* @deprecated Magic value, use {@link #getBasePixelColor(int, int)}
|
||||
* @deprecated use {@link #getBasePixelColor(int, int)}
|
||||
*/
|
||||
@Deprecated(since = "1.19")
|
||||
@Deprecated(since = "1.19", forRemoval = true) // Paper
|
||||
public byte getBasePixel(int x, int y);
|
||||
|
||||
/**
|
||||
|
||||
@@ -163,9 +163,9 @@ public final class MapCursor {
|
||||
* Get the type of this cursor.
|
||||
*
|
||||
* @return The type (color/style) of the map cursor.
|
||||
* @deprecated Magic value
|
||||
* @apiNote Internal Use Only
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getRawType() {
|
||||
return type.getValue();
|
||||
}
|
||||
@@ -220,9 +220,9 @@ public final class MapCursor {
|
||||
* Set the type of this cursor.
|
||||
*
|
||||
* @param type The type (color/style) of the map cursor.
|
||||
* @deprecated Magic value
|
||||
* @deprecated use {@link #setType(Type)}
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true) // Paper
|
||||
public void setRawType(byte type) {
|
||||
Type enumType = Type.byValue(type);
|
||||
Preconditions.checkArgument(enumType != null, "Unknown type by id %s", type);
|
||||
@@ -332,9 +332,9 @@ public final class MapCursor {
|
||||
* Gets the internal value of the cursor.
|
||||
*
|
||||
* @return the value
|
||||
* @deprecated Magic value
|
||||
* @apiNote Internal Use Only
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
byte getValue();
|
||||
|
||||
/**
|
||||
@@ -342,9 +342,9 @@ public final class MapCursor {
|
||||
*
|
||||
* @param value the value
|
||||
* @return the matching type
|
||||
* @deprecated Magic value
|
||||
* @apiNote Internal Use Only
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
static Type byValue(byte value) {
|
||||
for (Type t : values()) {
|
||||
|
||||
@@ -197,9 +197,9 @@ public final class MapPalette {
|
||||
*
|
||||
* @param image The image to convert.
|
||||
* @return A byte[] containing the pixels of the image.
|
||||
* @deprecated Magic value
|
||||
* @deprecated use color-related methods
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true) // Paper
|
||||
@NotNull
|
||||
public static byte[] imageToBytes(@NotNull Image image) {
|
||||
BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB);
|
||||
@@ -225,9 +225,9 @@ public final class MapPalette {
|
||||
* @param b The blue component of the color.
|
||||
* @param g The green component of the color.
|
||||
* @return The index in the palette.
|
||||
* @deprecated Magic value
|
||||
* @deprecated use color-related methods
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true) // Paper
|
||||
public static byte matchColor(int r, int g, int b) {
|
||||
return matchColor(new Color(r, g, b));
|
||||
}
|
||||
@@ -238,9 +238,9 @@ public final class MapPalette {
|
||||
*
|
||||
* @param color The Color to match.
|
||||
* @return The index in the palette.
|
||||
* @deprecated Magic value
|
||||
* @deprecated use color-related methods
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true) // Paper
|
||||
public static byte matchColor(@NotNull Color color) {
|
||||
if (color.getAlpha() < 128) return 0;
|
||||
|
||||
@@ -268,9 +268,9 @@ public final class MapPalette {
|
||||
*
|
||||
* @param index The index in the palette.
|
||||
* @return The Color of the palette entry.
|
||||
* @deprecated Magic value
|
||||
* @deprecated use color directly
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true) // Paper
|
||||
@NotNull
|
||||
public static Color getColor(byte index) {
|
||||
// Minecraft has 143 colors, some of which have negative byte representations
|
||||
@@ -311,9 +311,9 @@ public final class MapPalette {
|
||||
* @param color The Color to match.
|
||||
* @return The index in the palette.
|
||||
* @throws IllegalStateException if {@link #isCached()} returns false
|
||||
* @deprecated Magic value
|
||||
* @apiNote Internal Use Only
|
||||
*/
|
||||
@Deprecated(since = "1.19")
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
byte matchColor(@NotNull Color color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ public interface MapView {
|
||||
*
|
||||
* @param value The raw scale
|
||||
* @return The enum scale, or null for an invalid input
|
||||
* @deprecated Magic value
|
||||
* @apiNote Internal Use Only
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Scale valueOf(byte value) {
|
||||
switch (value) {
|
||||
@@ -51,9 +51,9 @@ public interface MapView {
|
||||
* Get the raw value of this scale level.
|
||||
*
|
||||
* @return The scale value
|
||||
* @deprecated Magic value
|
||||
* @apiNote Internal Use Only
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user