Ignore deprecations we can't address (yet)

This commit is contained in:
Alexander Brandes 2023-09-16 21:48:13 +02:00
parent b7c9453a1a
commit f705487055
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
5 changed files with 9 additions and 1 deletions

View File

@ -252,6 +252,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
}
@Override
@SuppressWarnings("deprecation") // Paper deprecation
public void onEnable() {
this.pluginName = getDescription().getName();
@ -1160,6 +1161,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
return new BukkitPlotGenerator(world, generator, this.plotAreaManager);
}
@SuppressWarnings("deprecation") // Paper deprecation
@Override
public @NonNull String pluginsFormatted() {
StringBuilder msg = new StringBuilder();
@ -1181,7 +1183,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
}
@Override
@SuppressWarnings("ConstantConditions")
@SuppressWarnings({"ConstantConditions", "deprecation"}) // Paper deprecation
public @NonNull String worldEditImplementations() {
StringBuilder msg = new StringBuilder();
if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {

View File

@ -74,6 +74,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
private HorseStats horse;
private boolean noGravity;
@SuppressWarnings("deprecation") // Deprecation exists since 1.20, while we support 1.16 onwards
public ReplicatingEntityWrapper(Entity entity, short depth) {
super(entity);

View File

@ -369,6 +369,7 @@ public class PlayerEventListener implements Listener {
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@SuppressWarnings("deprecation") // Paper deprecation
public void onConnect(PlayerJoinEvent event) {
final Player player = event.getPlayer();
PlotSquared.platform().playerManager().removePlayer(player.getUniqueId());
@ -733,6 +734,7 @@ public class PlayerEventListener implements Listener {
}
@EventHandler(priority = EventPriority.LOW)
@SuppressWarnings("deprecation") // Paper deprecation
public void onChat(AsyncPlayerChatEvent event) {
if (event.isCancelled()) {
return;
@ -1063,6 +1065,7 @@ public class PlayerEventListener implements Listener {
}
@EventHandler(priority = EventPriority.LOW)
@SuppressWarnings("deprecation") // Paper deprecation
public void onCancelledInteract(PlayerInteractEvent event) {
if (event.isCancelled() && event.getAction() == Action.RIGHT_CLICK_AIR) {
Player player = event.getPlayer();

View File

@ -44,6 +44,7 @@ import java.util.stream.IntStream;
@Singleton
public class BukkitInventoryUtil extends InventoryUtil {
@SuppressWarnings("deprecation") // Paper deprecation
private static @Nullable ItemStack getItem(PlotItemStack item) {
if (item == null) {
return null;

View File

@ -67,6 +67,7 @@ public class BukkitSetupUtils extends SetupUtils {
this.worldFile = worldFile;
}
@SuppressWarnings("deprecation") // Paper deprecation
@Override
public void updateGenerators(final boolean force) {
if (loaded && !SetupUtils.generators.isEmpty() && !force) {