Finish converting most of the undeprecated api to jspecify
This commit is contained in:
parent
29a25df60e
commit
0adf5876db
45 changed files with 782 additions and 718 deletions
|
@ -20,8 +20,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+import net.kyori.adventure.util.Index;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+import org.jspecify.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Describes the display of an advancement.
|
||||
|
@ -29,6 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * The display is used in the chat, in the toast messages and the advancements
|
||||
+ * screen.
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public interface AdvancementDisplay {
|
||||
+
|
||||
+ /**
|
||||
|
@ -39,7 +40,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @return the frame type
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Frame frame();
|
||||
+
|
||||
+ /**
|
||||
|
@ -47,7 +47,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @return the title
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Component title();
|
||||
+
|
||||
+ /**
|
||||
|
@ -55,7 +54,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @return the description
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Component description();
|
||||
+
|
||||
+ /**
|
||||
|
@ -63,7 +61,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @return a copy of the icon
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ ItemStack icon();
|
||||
+
|
||||
+ /**
|
||||
|
@ -104,8 +101,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @return the background texture path
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ NamespacedKey backgroundPath();
|
||||
+ @Nullable NamespacedKey backgroundPath();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the formatted display name for this display. This
|
||||
|
@ -115,7 +111,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @return the display name
|
||||
+ * @see org.bukkit.advancement.Advancement#displayName()
|
||||
+ */
|
||||
+ @NotNull Component displayName();
|
||||
+ Component displayName();
|
||||
+
|
||||
+ /**
|
||||
+ * Defines how the {@link #icon()} appears in the advancements screen and
|
||||
|
@ -148,7 +144,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ private final String name;
|
||||
+ private final TextColor color;
|
||||
+
|
||||
+ Frame(String name, TextColor color) {
|
||||
+ Frame(final String name, final TextColor color) {
|
||||
+ this.name = name;
|
||||
+ this.color = color;
|
||||
+ }
|
||||
|
@ -158,7 +154,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @return the text color
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public TextColor color() {
|
||||
+ return this.color;
|
||||
+ }
|
||||
|
@ -171,7 +166,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @return the toast message key
|
||||
+ */
|
||||
+ @Override
|
||||
+ @NotNull
|
||||
+ public String translationKey() {
|
||||
+ return "advancements.toast." + this.name;
|
||||
+ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue