From f00320095d48675937c55a6bdeb56c965ae0970a Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 5 Feb 2023 15:55:51 -0800 Subject: [PATCH] Added since and forRemoval to Deprecated annotations. --- .../bentobox/bentobox/api/configuration/WorldSettings.java | 4 ++-- src/main/java/world/bentobox/bentobox/database/Database.java | 4 +--- .../bentobox/bentobox/listeners/PlayerEntityPortalEvent.java | 2 +- .../bentobox/listeners/PortalTeleportationListener.java | 2 +- src/main/java/world/bentobox/bentobox/lists/Flags.java | 4 ++-- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/api/configuration/WorldSettings.java b/src/main/java/world/bentobox/bentobox/api/configuration/WorldSettings.java index 64a5d5297..100ff2606 100644 --- a/src/main/java/world/bentobox/bentobox/api/configuration/WorldSettings.java +++ b/src/main/java/world/bentobox/bentobox/api/configuration/WorldSettings.java @@ -37,7 +37,7 @@ public interface WorldSettings extends ConfigObject { * @see WorldSettings#getDefaultIslandFlagNames() * @since 1.21.0 */ - @Deprecated + @Deprecated(since="1.21.0", forRemoval=true) Map getDefaultIslandFlags(); /** @@ -62,7 +62,7 @@ public interface WorldSettings extends ConfigObject { * @see WorldSettings#getDefaultIslandSettingNames() * @since 1.21.0 */ - @Deprecated + @Deprecated(since="1.21.0", forRemoval=true) Map getDefaultIslandSettings(); /** diff --git a/src/main/java/world/bentobox/bentobox/database/Database.java b/src/main/java/world/bentobox/bentobox/database/Database.java index 074f59220..0eae05e35 100644 --- a/src/main/java/world/bentobox/bentobox/database/Database.java +++ b/src/main/java/world/bentobox/bentobox/database/Database.java @@ -99,13 +99,11 @@ public class Database { } /** - * Save object. Saving may be done async or sync, depending on the underlying database. + * Save object. Saving is done async. Same as {@link #saveObjectAsync(Object)}, which is recommended. * @param instance to save * @return true - always. - * @deprecated Use {@link #saveObjectAsync(Object)}. * @since 1.13.0 */ - @Deprecated public boolean saveObject(T instance) { saveObjectAsync(instance).thenAccept(r -> { if (Boolean.FALSE.equals(r)) logger.severe(() -> "Could not save object to database!"); diff --git a/src/main/java/world/bentobox/bentobox/listeners/PlayerEntityPortalEvent.java b/src/main/java/world/bentobox/bentobox/listeners/PlayerEntityPortalEvent.java index 04d13b592..f58960133 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/PlayerEntityPortalEvent.java +++ b/src/main/java/world/bentobox/bentobox/listeners/PlayerEntityPortalEvent.java @@ -20,7 +20,7 @@ import world.bentobox.bentobox.database.objects.Island; * @deprecated replaced not used in new listeners. * @since 1.12.1 */ -@Deprecated +@Deprecated(since="1.21.0", forRemoval=true) public class PlayerEntityPortalEvent { private final EntityPortalEvent epe; diff --git a/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java b/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java index bbea686a8..a275d0d01 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java +++ b/src/main/java/world/bentobox/bentobox/listeners/PortalTeleportationListener.java @@ -45,7 +45,7 @@ import world.bentobox.bentobox.util.teleport.SafeSpotTeleport; * @see world.bentobox.bentobox.listeners.teleports.EntityTeleportListener * @since 1.12.1 */ -@Deprecated +@Deprecated(since="1.21.0", forRemoval=true) public class PortalTeleportationListener implements Listener { private final BentoBox plugin; diff --git a/src/main/java/world/bentobox/bentobox/lists/Flags.java b/src/main/java/world/bentobox/bentobox/lists/Flags.java index d61609241..76d9ba7be 100644 --- a/src/main/java/world/bentobox/bentobox/lists/Flags.java +++ b/src/main/java/world/bentobox/bentobox/lists/Flags.java @@ -393,13 +393,13 @@ public final class Flags { * @deprecated see {@link #ANIMAL_NATURAL_SPAWN} and {@link #ANIMAL_SPAWNERS_SPAWN}. * @since 1.14.0 */ - @Deprecated + @Deprecated(since="1.14.0", forRemoval=true) public static final Flag ANIMAL_SPAWN = new Flag.Builder("ANIMAL_SPAWN", Material.APPLE).defaultSetting(true).type(Type.SETTING).build(); /** * @deprecated see {@link #MONSTER_NATURAL_SPAWN} and {@link #MONSTER_SPAWNERS_SPAWN}. * @since 1.14.0 */ - @Deprecated + @Deprecated(since="1.14.0", forRemoval=true) public static final Flag MONSTER_SPAWN = new Flag.Builder("MONSTER_SPAWN", Material.SPAWNER).defaultSetting(true).type(Type.SETTING).build(); /**