mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
[ci skip] Fix various compile warnings (#6264)
This commit is contained in:
parent
23470be165
commit
bf8f91cf09
@ -27,6 +27,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* If your logic is not safe to run asynchronously, only react to the synchronous version.
|
||||
* @deprecated Draft API - Subject to change until confirmed solves desired use cases
|
||||
*/
|
||||
@Deprecated
|
||||
public class AsyncPlayerSendCommandsEvent <S extends BukkitBrigadierCommandSource> extends PlayerEvent {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
@ -21,6 +21,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*
|
||||
* @deprecated Draft API - Subject to change until confirmed solves desired use cases
|
||||
*/
|
||||
@Deprecated
|
||||
public class CommandRegisteredEvent <S extends BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
@ -21,6 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+/**
|
||||
+ * @deprecated Use {@link PlayerSpawnLocationEvent}, Duplicate API
|
||||
+ */
|
||||
+@Deprecated
|
||||
+public class PlayerInitialSpawnEvent extends PlayerSpawnLocationEvent {
|
||||
+
|
||||
+ public PlayerInitialSpawnEvent(@NotNull Player who, @NotNull Location spawnLocation) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 24 Mar 2019 18:39:01 -0400
|
||||
Subject: [PATCH] Flip some Spigot API null annotations
|
||||
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.
|
||||
@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* @param pitch The absolute rotation on the y-plane, in degrees
|
||||
*/
|
||||
- public Location(@Nullable final World world, final double x, final double y, final double z, final float yaw, final float pitch) {
|
||||
+ public Location(@UndefinedNullability final World world, final double x, final double y, final double z, final float yaw, final float pitch) {
|
||||
+ public Location(@UndefinedNullability final World world, final double x, final double y, final double z, final float yaw, final float pitch) { // Paper
|
||||
if (world != null) {
|
||||
this.world = new WeakReference<>(world);
|
||||
}
|
||||
@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* @see #isWorldLoaded()
|
||||
*/
|
||||
- @Nullable
|
||||
+ @UndefinedNullability
|
||||
+ @UndefinedNullability // Paper
|
||||
public World getWorld() {
|
||||
if (this.world == null) {
|
||||
return null;
|
||||
@ -79,10 +79,32 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* @return the tag or null
|
||||
*/
|
||||
- @Nullable
|
||||
+ @UndefinedNullability
|
||||
+ @UndefinedNullability // Paper
|
||||
<T extends Keyed> Tag<T> getTag(@NotNull String registry, @NotNull NamespacedKey tag, @NotNull Class<T> clazz);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/LingeringPotion.java b/src/main/java/org/bukkit/entity/LingeringPotion.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LingeringPotion.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LingeringPotion.java
|
||||
@@ -0,0 +0,0 @@ package org.bukkit.entity;
|
||||
*
|
||||
* @deprecated lingering status depends on only on the potion item.
|
||||
*/
|
||||
+@Deprecated // Paper
|
||||
public interface LingeringPotion extends ThrownPotion { }
|
||||
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
|
||||
+++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||
@@ -0,0 +0,0 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
||||
* @return experience level costs offered
|
||||
* @deprecated Use {@link #getOffers()} instead of this method
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
@NotNull
|
||||
public int[] getExpLevelCostsOffered() {
|
||||
int[] levelOffers = new int[offers.length];
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@ -116,6 +138,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
import org.bukkit.Utility;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
* @param damage durability / damage
|
||||
* @deprecated see {@link #setDurability(short)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public ItemStack(@NotNull final Material type, final int amount, final short damage) {
|
||||
this(type, amount, damage, null);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
*
|
||||
* @return a copy of the current ItemStack's ItemData
|
||||
@ -125,3 +155,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public ItemMeta getItemMeta() {
|
||||
return this.meta == null ? Bukkit.getItemFactory().getItemMeta(this.type) : this.meta.clone();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/material/Step.java b/src/main/java/org/bukkit/material/Step.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/material/Step.java
|
||||
+++ b/src/main/java/org/bukkit/material/Step.java
|
||||
@@ -0,0 +0,0 @@ public class Step extends TexturedMaterial {
|
||||
*
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
@Override
|
||||
protected int getTextureIndex() {
|
||||
return getData() & 0x7;
|
Loading…
Reference in New Issue
Block a user