geforkt von Mirrors/Paper
Use ApiStatus.Internal instead of Deprecated (#9042)
Mainly correctly marks a lot of still used "magic values" as Internal instead of "Deprecated".
Dieser Commit ist enthalten in:
Ursprung
cbce3a66aa
Commit
932b0256c7
@ -6,8 +6,39 @@ Subject: [PATCH] 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.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Art.java b/src/main/java/org/bukkit/Art.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Art.java
|
||||
+++ b/src/main/java/org/bukkit/Art.java
|
||||
@@ -0,0 +0,0 @@ public enum Art implements Keyed {
|
||||
* Get the ID of this painting.
|
||||
*
|
||||
* @return The ID of this painting
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public enum Art implements Keyed {
|
||||
*
|
||||
* @param id The ID
|
||||
* @return The painting
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Art getById(int id) {
|
||||
return BY_ID.get(id);
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
@ -44,6 +75,170 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public static ScoreboardManager getScoreboardManager() {
|
||||
return server.getScoreboardManager();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/CoalType.java b/src/main/java/org/bukkit/CoalType.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/CoalType.java
|
||||
+++ b/src/main/java/org/bukkit/CoalType.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents the two types of coal
|
||||
*/
|
||||
+@Deprecated // Paper
|
||||
public enum CoalType {
|
||||
COAL(0x0),
|
||||
CHARCOAL(0x1);
|
||||
diff --git a/src/main/java/org/bukkit/CropState.java b/src/main/java/org/bukkit/CropState.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/CropState.java
|
||||
+++ b/src/main/java/org/bukkit/CropState.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents the different growth states of crops
|
||||
*/
|
||||
+@Deprecated // Paper
|
||||
public enum CropState {
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Difficulty.java b/src/main/java/org/bukkit/Difficulty.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Difficulty.java
|
||||
+++ b/src/main/java/org/bukkit/Difficulty.java
|
||||
@@ -0,0 +0,0 @@ public enum Difficulty {
|
||||
* Gets the difficulty value associated with this Difficulty.
|
||||
*
|
||||
* @return An integer value of this difficulty
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public enum Difficulty {
|
||||
* @param value Value to check
|
||||
* @return Associative {@link Difficulty} with the given value, or null if
|
||||
* it doesn't exist
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Difficulty getByValue(final int value) {
|
||||
return BY_ID.get(value);
|
||||
diff --git a/src/main/java/org/bukkit/DyeColor.java b/src/main/java/org/bukkit/DyeColor.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/DyeColor.java
|
||||
+++ b/src/main/java/org/bukkit/DyeColor.java
|
||||
@@ -0,0 +0,0 @@ public enum DyeColor {
|
||||
*
|
||||
* @return A byte containing the wool data value of this color
|
||||
* @see #getDyeData()
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getWoolData() {
|
||||
return woolData;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public enum DyeColor {
|
||||
* @return The {@link DyeColor} representing the given value, or null if
|
||||
* it doesn't exist
|
||||
* @see #getByDyeData(byte)
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static DyeColor getByWoolData(final byte data) {
|
||||
int i = 0xff & data;
|
||||
@@ -0,0 +0,0 @@ public enum DyeColor {
|
||||
*
|
||||
* @param name dye name
|
||||
* @return dye color
|
||||
- * @deprecated legacy use only
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@NotNull
|
||||
public static DyeColor legacyValueOf(@Nullable String name) {
|
||||
return "SILVER".equals(name) ? DyeColor.LIGHT_GRAY : DyeColor.valueOf(name);
|
||||
diff --git a/src/main/java/org/bukkit/Effect.java b/src/main/java/org/bukkit/Effect.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Effect.java
|
||||
+++ b/src/main/java/org/bukkit/Effect.java
|
||||
@@ -0,0 +0,0 @@ public enum Effect {
|
||||
* Gets the ID for this effect.
|
||||
*
|
||||
* @return ID of this effect
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public enum Effect {
|
||||
*
|
||||
* @param id ID of the Effect to return
|
||||
* @return Effect with the given ID
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Effect getById(int id) {
|
||||
return BY_ID.get(id);
|
||||
diff --git a/src/main/java/org/bukkit/EntityEffect.java b/src/main/java/org/bukkit/EntityEffect.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/EntityEffect.java
|
||||
+++ b/src/main/java/org/bukkit/EntityEffect.java
|
||||
@@ -0,0 +0,0 @@ public enum EntityEffect {
|
||||
* Gets the data value of this EntityEffect
|
||||
*
|
||||
* @return The data value
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getData() {
|
||||
return data;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/GameMode.java b/src/main/java/org/bukkit/GameMode.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/GameMode.java
|
||||
+++ b/src/main/java/org/bukkit/GameMode.java
|
||||
@@ -0,0 +0,0 @@ public enum GameMode {
|
||||
* Gets the mode value associated with this GameMode
|
||||
*
|
||||
* @return An integer value of this gamemode
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public enum GameMode {
|
||||
* @param value Value to check
|
||||
* @return Associative {@link GameMode} with the given value, or null if
|
||||
* it doesn't exist
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static GameMode getByValue(final int value) {
|
||||
return BY_ID.get(value);
|
||||
diff --git a/src/main/java/org/bukkit/GrassSpecies.java b/src/main/java/org/bukkit/GrassSpecies.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/GrassSpecies.java
|
||||
@ -94,6 +289,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, Translatable {
|
||||
* Do not use for any reason.
|
||||
*
|
||||
* @return ID of this material
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public int getId() {
|
||||
Preconditions.checkArgument(legacy, "Cannot get ID of Modern Material");
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -155,6 +361,70 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public enum NetherWartsState {
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Note.java b/src/main/java/org/bukkit/Note.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Note.java
|
||||
+++ b/src/main/java/org/bukkit/Note.java
|
||||
@@ -0,0 +0,0 @@ public class Note {
|
||||
* Returns the not sharped id of this tone.
|
||||
*
|
||||
* @return the not sharped id of this tone.
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getId() {
|
||||
return getId(false);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class Note {
|
||||
*
|
||||
* @param sharped Set to true to return the sharped id.
|
||||
* @return the id of this tone.
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getId(boolean sharped) {
|
||||
byte id = (byte) (sharped && sharpable ? this.id + 1 : this.id);
|
||||
|
||||
@@ -0,0 +0,0 @@ public class Note {
|
||||
* @return if the tone id is the sharped id of the tone.
|
||||
* @throws IllegalArgumentException if neither the tone nor the
|
||||
* semitone have the id.
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public boolean isSharped(byte id) {
|
||||
if (id == getId(false)) {
|
||||
return false;
|
||||
@@ -0,0 +0,0 @@ public class Note {
|
||||
*
|
||||
* @param id the id of the tone.
|
||||
* @return the tone to id.
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Tone getById(byte id) {
|
||||
return BY_DATA.get(id);
|
||||
@@ -0,0 +0,0 @@ public class Note {
|
||||
* Returns the internal id of this note.
|
||||
*
|
||||
* @return the internal id of this note.
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getId() {
|
||||
return note;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Particle.java
|
||||
@ -379,6 +649,30 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
||||
@@ -0,0 +0,0 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* Gets the dimension ID of this environment
|
||||
*
|
||||
* @return dimension ID
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*
|
||||
* @param id The ID of the environment
|
||||
* @return The environment
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Environment getEnvironment(int id) {
|
||||
return lookup.get(id);
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
@ -430,6 +724,34 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public ItemStack getItem();
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/block/PistonMoveReaction.java b/src/main/java/org/bukkit/block/PistonMoveReaction.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/PistonMoveReaction.java
|
||||
+++ b/src/main/java/org/bukkit/block/PistonMoveReaction.java
|
||||
@@ -0,0 +0,0 @@ public enum PistonMoveReaction {
|
||||
|
||||
/**
|
||||
* @return The ID of the move reaction
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public enum PistonMoveReaction {
|
||||
/**
|
||||
* @param id An ID
|
||||
* @return The move reaction with that ID
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static PistonMoveReaction getById(int id) {
|
||||
return byId.get(id);
|
||||
diff --git a/src/main/java/org/bukkit/entity/Enderman.java b/src/main/java/org/bukkit/entity/Enderman.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Enderman.java
|
||||
@ -454,6 +776,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public void setCarriedMaterial(@NotNull MaterialData material);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
||||
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
@@ -0,0 +0,0 @@ public enum EntityType implements Keyed, Translatable {
|
||||
*
|
||||
* @param name the entity type's name
|
||||
* @return the matching entity type or null
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Contract("null -> null")
|
||||
@Nullable
|
||||
public static EntityType fromName(@Nullable String name) {
|
||||
diff --git a/src/main/java/org/bukkit/entity/LightningStrike.java b/src/main/java/org/bukkit/entity/LightningStrike.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LightningStrike.java
|
||||
@ -543,6 +881,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @Deprecated // Paper
|
||||
public MaterialData getDisplayBlock();
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
/**
|
||||
* Forces an update of the player's entire inventory.
|
||||
- *
|
||||
- * @apiNote It should not be necessary for plugins to use this method. If it
|
||||
- * is required for some reason, it is probably a bug.
|
||||
*/
|
||||
- @ApiStatus.Internal
|
||||
+ // @ApiStatus.Internal // Paper - is valid API
|
||||
public void updateInventory();
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Projectile.java b/src/main/java/org/bukkit/entity/Projectile.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
@ -580,6 +935,32 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
-@Deprecated
|
||||
+@Deprecated(forRemoval = true) // Paper
|
||||
public interface SplashPotion extends ThrownPotion { }
|
||||
diff --git a/src/main/java/org/bukkit/entity/TextDisplay.java b/src/main/java/org/bukkit/entity/TextDisplay.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/TextDisplay.java
|
||||
+++ b/src/main/java/org/bukkit/entity/TextDisplay.java
|
||||
@@ -0,0 +0,0 @@ public interface TextDisplay extends Display {
|
||||
* Gets the text background color.
|
||||
*
|
||||
* @return the background color
|
||||
- * @deprecated API subject to change
|
||||
*/
|
||||
@Nullable
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper - is stable API
|
||||
Color getBackgroundColor();
|
||||
|
||||
/**
|
||||
* Sets the text background color.
|
||||
*
|
||||
* @param color new background color
|
||||
- * @deprecated API subject to change
|
||||
*/
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper - is stable API
|
||||
void setBackgroundColor(@Nullable Color color);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||
@ -993,6 +1374,18 @@ diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/ja
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||
@@ -0,0 +0,0 @@ public abstract class InventoryView {
|
||||
* Gets the id of this view.
|
||||
*
|
||||
* @return the id of this view
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class InventoryView {
|
||||
/**
|
||||
* Get the item on the cursor of one of the viewing players.
|
||||
@ -1286,6 +1679,178 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
int getMapId();
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCanvas.java b/src/main/java/org/bukkit/map/MapCanvas.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCanvas.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCanvas.java
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
public byte getPixel(int x, int y);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
public byte getBasePixel(int x, int y);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getRawType() {
|
||||
return type;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
public void setRawType(byte type) {
|
||||
if (type < 0 || type > 26) {
|
||||
throw new IllegalArgumentException("Type must be in the range 0-26");
|
||||
@@ -0,0 +0,0 @@ public final class MapCursor {
|
||||
* Gets the internal value of the cursor.
|
||||
*
|
||||
* @return the value
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getValue() {
|
||||
return value;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public final class MapCursor {
|
||||
*
|
||||
* @param value the value
|
||||
* @return the matching type
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Type byValue(byte value) {
|
||||
for (Type t : values()) {
|
||||
diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapPalette.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
@NotNull
|
||||
public static byte[] imageToBytes(@NotNull Image image) {
|
||||
BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB);
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
public static byte matchColor(int r, int g, int b) {
|
||||
return matchColor(new Color(r, g, b));
|
||||
}
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
public static byte matchColor(@NotNull Color color) {
|
||||
if (color.getAlpha() < 128) return 0;
|
||||
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
@NotNull
|
||||
public static Color getColor(byte index) {
|
||||
// Minecraft has 143 colors, some of which have negative byte representations
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
byte matchColor(@NotNull Color color);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/map/MapView.java b/src/main/java/org/bukkit/map/MapView.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapView.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapView.java
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Scale valueOf(byte value) {
|
||||
switch (value) {
|
||||
@@ -0,0 +0,0 @@ public interface MapView {
|
||||
* Get the raw value of this scale level.
|
||||
*
|
||||
* @return The scale value
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public byte getValue() {
|
||||
return value;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/material/Openable.java b/src/main/java/org/bukkit/material/Openable.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/material/Openable.java
|
||||
@ -1335,6 +1900,34 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public enum MushroomBlockTexture {
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PotionEffectType implements Keyed {
|
||||
* Returns the unique ID of this type.
|
||||
*
|
||||
* @return Unique ID
|
||||
- * @deprecated Magic value
|
||||
+ * @deprecated use {@link #key()}
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class PotionEffectType implements Keyed {
|
||||
*
|
||||
* @param id Unique ID to fetch
|
||||
* @return Resulting type, or null if not found.
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static PotionEffectType getById(int id) {
|
||||
if (id >= byId.length || id < 0)
|
||||
diff --git a/src/test/java/org/bukkit/materials/MaterialDataTest.java b/src/test/java/org/bukkit/materials/MaterialDataTest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/test/java/org/bukkit/materials/MaterialDataTest.java
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren