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:
@@ -23,7 +23,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
||||
private boolean cancelled;
|
||||
private final Player enchanter;
|
||||
|
||||
public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull EnchantmentView view, @NotNull final Block table, @NotNull final ItemStack item, @NotNull final EnchantmentOffer[] offers, final int bonus) {
|
||||
public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull EnchantmentView view, @NotNull final Block table, @NotNull final ItemStack item, @org.jetbrains.annotations.Nullable final EnchantmentOffer @NotNull [] offers, final int bonus) { // Paper - offers can contain null values
|
||||
super(view);
|
||||
this.enchanter = enchanter;
|
||||
this.table = table;
|
||||
@@ -86,8 +86,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
||||
*
|
||||
* @return list of available enchantment offers
|
||||
*/
|
||||
@NotNull
|
||||
public EnchantmentOffer[] getOffers() {
|
||||
public @org.jetbrains.annotations.Nullable EnchantmentOffer @NotNull [] getOffers() { // Paper offers can contain null values
|
||||
return offers;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user