From 764d258ed02516fee655bbc7f4b00a2d986bd24b Mon Sep 17 00:00:00 2001 From: wizjany Date: Mon, 28 Oct 2024 08:49:59 -0400 Subject: [PATCH] Fix deprecations on stack methods. Also this was supposed to be on a branch but I just realized I forgot. --- .../com/sk89q/worldguard/bukkit/BukkitWorldGuardPlatform.java | 2 +- .../java/com/sk89q/worldguard/commands/GeneralCommands.java | 1 + .../sk89q/worldguard/internal/platform/WorldGuardPlatform.java | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/BukkitWorldGuardPlatform.java b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/BukkitWorldGuardPlatform.java index 53d11f13..f1e70e05 100644 --- a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/BukkitWorldGuardPlatform.java +++ b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/BukkitWorldGuardPlatform.java @@ -171,8 +171,8 @@ public Path getConfigDir() { return WorldGuardPlugin.inst().getDataFolder().toPath(); } + @SuppressWarnings("removal") @Override - @Deprecated(forRemoval = true) public void stackPlayerInventory(LocalPlayer localPlayer) { boolean ignoreMax = false; // localPlayer.hasPermission("worldguard.stack.illegitimate"); diff --git a/worldguard-core/src/main/java/com/sk89q/worldguard/commands/GeneralCommands.java b/worldguard-core/src/main/java/com/sk89q/worldguard/commands/GeneralCommands.java index 1111355a..61aa037c 100644 --- a/worldguard-core/src/main/java/com/sk89q/worldguard/commands/GeneralCommands.java +++ b/worldguard-core/src/main/java/com/sk89q/worldguard/commands/GeneralCommands.java @@ -229,6 +229,7 @@ public void locate(CommandContext args, Actor sender) throws CommandException { } } + @SuppressWarnings("removal") @Command(aliases = {"stack", ";"}, usage = "", desc = "Stack items", max = 0) @CommandPermissions({"worldguard.stack"}) public void stack(CommandContext args, Actor sender) throws CommandException { diff --git a/worldguard-core/src/main/java/com/sk89q/worldguard/internal/platform/WorldGuardPlatform.java b/worldguard-core/src/main/java/com/sk89q/worldguard/internal/platform/WorldGuardPlatform.java index 71e26a4d..0bbaaa94 100644 --- a/worldguard-core/src/main/java/com/sk89q/worldguard/internal/platform/WorldGuardPlatform.java +++ b/worldguard-core/src/main/java/com/sk89q/worldguard/internal/platform/WorldGuardPlatform.java @@ -145,6 +145,7 @@ public interface WorldGuardPlatform { * * @param localPlayer The player */ + @Deprecated(forRemoval = true) void stackPlayerInventory(LocalPlayer localPlayer); /**