mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-03 18:53:43 +01:00 
			
		
		
		
	Ignore deprecations we can't address (yet)
This commit is contained in:
		@@ -252,6 +252,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
 | 
					    @SuppressWarnings("deprecation") // Paper deprecation
 | 
				
			||||||
    public void onEnable() {
 | 
					    public void onEnable() {
 | 
				
			||||||
        this.pluginName = getDescription().getName();
 | 
					        this.pluginName = getDescription().getName();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1160,6 +1161,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
				
			|||||||
        return new BukkitPlotGenerator(world, generator, this.plotAreaManager);
 | 
					        return new BukkitPlotGenerator(world, generator, this.plotAreaManager);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @SuppressWarnings("deprecation") // Paper deprecation
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public @NonNull String pluginsFormatted() {
 | 
					    public @NonNull String pluginsFormatted() {
 | 
				
			||||||
        StringBuilder msg = new StringBuilder();
 | 
					        StringBuilder msg = new StringBuilder();
 | 
				
			||||||
@@ -1181,7 +1183,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    @SuppressWarnings("ConstantConditions")
 | 
					    @SuppressWarnings({"ConstantConditions", "deprecation"}) // Paper deprecation
 | 
				
			||||||
    public @NonNull String worldEditImplementations() {
 | 
					    public @NonNull String worldEditImplementations() {
 | 
				
			||||||
        StringBuilder msg = new StringBuilder();
 | 
					        StringBuilder msg = new StringBuilder();
 | 
				
			||||||
        if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
 | 
					        if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -74,6 +74,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
 | 
				
			|||||||
    private HorseStats horse;
 | 
					    private HorseStats horse;
 | 
				
			||||||
    private boolean noGravity;
 | 
					    private boolean noGravity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @SuppressWarnings("deprecation") // Deprecation exists since 1.20, while we support 1.16 onwards
 | 
				
			||||||
    public ReplicatingEntityWrapper(Entity entity, short depth) {
 | 
					    public ReplicatingEntityWrapper(Entity entity, short depth) {
 | 
				
			||||||
        super(entity);
 | 
					        super(entity);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -369,6 +369,7 @@ public class PlayerEventListener implements Listener {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
 | 
					    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
 | 
				
			||||||
 | 
					    @SuppressWarnings("deprecation") // Paper deprecation
 | 
				
			||||||
    public void onConnect(PlayerJoinEvent event) {
 | 
					    public void onConnect(PlayerJoinEvent event) {
 | 
				
			||||||
        final Player player = event.getPlayer();
 | 
					        final Player player = event.getPlayer();
 | 
				
			||||||
        PlotSquared.platform().playerManager().removePlayer(player.getUniqueId());
 | 
					        PlotSquared.platform().playerManager().removePlayer(player.getUniqueId());
 | 
				
			||||||
@@ -733,6 +734,7 @@ public class PlayerEventListener implements Listener {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @EventHandler(priority = EventPriority.LOW)
 | 
					    @EventHandler(priority = EventPriority.LOW)
 | 
				
			||||||
 | 
					    @SuppressWarnings("deprecation") // Paper deprecation
 | 
				
			||||||
    public void onChat(AsyncPlayerChatEvent event) {
 | 
					    public void onChat(AsyncPlayerChatEvent event) {
 | 
				
			||||||
        if (event.isCancelled()) {
 | 
					        if (event.isCancelled()) {
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
@@ -1063,6 +1065,7 @@ public class PlayerEventListener implements Listener {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @EventHandler(priority = EventPriority.LOW)
 | 
					    @EventHandler(priority = EventPriority.LOW)
 | 
				
			||||||
 | 
					    @SuppressWarnings("deprecation") // Paper deprecation
 | 
				
			||||||
    public void onCancelledInteract(PlayerInteractEvent event) {
 | 
					    public void onCancelledInteract(PlayerInteractEvent event) {
 | 
				
			||||||
        if (event.isCancelled() && event.getAction() == Action.RIGHT_CLICK_AIR) {
 | 
					        if (event.isCancelled() && event.getAction() == Action.RIGHT_CLICK_AIR) {
 | 
				
			||||||
            Player player = event.getPlayer();
 | 
					            Player player = event.getPlayer();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,6 +44,7 @@ import java.util.stream.IntStream;
 | 
				
			|||||||
@Singleton
 | 
					@Singleton
 | 
				
			||||||
public class BukkitInventoryUtil extends InventoryUtil {
 | 
					public class BukkitInventoryUtil extends InventoryUtil {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @SuppressWarnings("deprecation") // Paper deprecation
 | 
				
			||||||
    private static @Nullable ItemStack getItem(PlotItemStack item) {
 | 
					    private static @Nullable ItemStack getItem(PlotItemStack item) {
 | 
				
			||||||
        if (item == null) {
 | 
					        if (item == null) {
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -67,6 +67,7 @@ public class BukkitSetupUtils extends SetupUtils {
 | 
				
			|||||||
        this.worldFile = worldFile;
 | 
					        this.worldFile = worldFile;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @SuppressWarnings("deprecation") // Paper deprecation
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void updateGenerators(final boolean force) {
 | 
					    public void updateGenerators(final boolean force) {
 | 
				
			||||||
        if (loaded && !SetupUtils.generators.isEmpty() && !force) {
 | 
					        if (loaded && !SetupUtils.generators.isEmpty() && !force) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user