From 5a1405014f78f3e8b5a660b72e2f88ad8798e87b Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 3 Jun 2021 19:19:14 +0200 Subject: [PATCH] [CI skip] Removed deprecated events and methods --- CHANGELOG.md | 15 ++++ .../AsyncGeneratorProcessCompleteEvent.java | 68 ---------------- .../AsyncMachineProcessCompleteEvent.java | 80 ------------------- .../AsyncReactorProcessCompleteEvent.java | 68 ---------------- .../utils/itemstack/ItemStackWrapper.java | 15 +--- .../Objects/SlimefunItem/SlimefunItem.java | 13 --- 6 files changed, 16 insertions(+), 243 deletions(-) delete mode 100644 src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncGeneratorProcessCompleteEvent.java delete mode 100644 src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncMachineProcessCompleteEvent.java delete mode 100644 src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncReactorProcessCompleteEvent.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b2a1670b..e0318505f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Table of contents +- [Release Candidate 25 (TBD)](#release-candidate-25-tbd) - [Release Candidate 24 (03 Jun 2021)](#release-candidate-24-03-jun-2021) - [Release Candidate 23 (19 May 2021)](#release-candidate-23-19-may-2021) - [Release Candidate 22 (18 Apr 2021)](#release-candidate-22-18-apr-2021) @@ -24,7 +25,21 @@ - [Release Candidate 2 (29 Sep 2019)](#release-candidate-2-29-sep-2019) - [Release Candidate 1 (26 Sep 2019)](#release-candidate-1-26-sep-2019) +## Release Candidate 25 (TBD) + +#### Additions +* Added "4 Charcoal -> 1 Coal" recipe to the Compressor + +#### Changes +* (API) Removed `SlimefunItem#getID()` (renamed to `SlimefunItem#getId()`) +* (API) Removed AsyncGeneratorProcessCompleteEvent +* (API) Removed AsyncMachineProcessCompleteEvent +* (API) Removed AsyncReactorProcessCompleteEvent + +#### Fixes + ## Release Candidate 24 (03 Jun 2021) +https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#24 #### Additions * (API) Added AsyncMachineOperationFinishEvent diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncGeneratorProcessCompleteEvent.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncGeneratorProcessCompleteEvent.java deleted file mode 100644 index 727fd0d7e..000000000 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncGeneratorProcessCompleteEvent.java +++ /dev/null @@ -1,68 +0,0 @@ -package io.github.thebusybiscuit.slimefun4.api.events; - -import javax.annotation.Nonnull; -import javax.annotation.ParametersAreNonnullByDefault; - -import org.bukkit.Location; -import org.bukkit.event.Event; -import org.bukkit.event.HandlerList; - -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AGenerator; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineFuel; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; - -/** - * This {@link Event} is fired whenever an {@link AGenerator} has completed its process. - * - * @author poma123 - * - * @deprecated This event is no longer fired. Use the {@link AsyncMachineOperationFinishEvent} instead. - * - */ -@Deprecated -public class AsyncGeneratorProcessCompleteEvent extends AsyncMachineProcessCompleteEvent { - - private static final HandlerList handlers = new HandlerList(); - - private final AGenerator generator; - private final MachineFuel machineFuel; - - @ParametersAreNonnullByDefault - public AsyncGeneratorProcessCompleteEvent(Location l, AGenerator generator, MachineFuel machineFuel) { - super(l, null, null); - - this.generator = generator; - this.machineFuel = machineFuel; - } - - /** - * The {@link SlimefunItem} instance of the generator. - * - * @return The {@link SlimefunItem} instance of the generator - */ - @Nonnull - public AGenerator getGenerator() { - return generator; - } - - /** - * This returns the used {@link MachineFuel} in the process. - * - * @return The {@link MachineFuel} of the process - */ - @Nonnull - public MachineFuel getMachineFuel() { - return machineFuel; - } - - @Nonnull - public static HandlerList getHandlerList() { - return handlers; - } - - @Nonnull - @Override - public HandlerList getHandlers() { - return getHandlerList(); - } -} diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncMachineProcessCompleteEvent.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncMachineProcessCompleteEvent.java deleted file mode 100644 index 25fd94feb..000000000 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncMachineProcessCompleteEvent.java +++ /dev/null @@ -1,80 +0,0 @@ -package io.github.thebusybiscuit.slimefun4.api.events; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.event.Event; -import org.bukkit.event.HandlerList; - -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; - -/** - * This {@link Event} is fired whenever an {@link AContainer} has completed its process. - * - * @author poma123 - * - * @deprecated This event is no longer fired. Use the {@link AsyncMachineOperationFinishEvent} instead. - * - */ -@Deprecated -public class AsyncMachineProcessCompleteEvent extends Event { - - private static final HandlerList handlers = new HandlerList(); - - private final Location location; - private final AContainer container; - private final MachineRecipe machineRecipe; - - public AsyncMachineProcessCompleteEvent(@Nonnull Location l, @Nullable AContainer container, @Nullable MachineRecipe machineRecipe) { - super(!Bukkit.isPrimaryThread()); - - this.location = l; - this.container = container; - this.machineRecipe = machineRecipe; - } - - /** - * This returns the {@link Location} of the machine. - * - * @return The {@link Location} of the machine - */ - @Nonnull - public Location getLocation() { - return location; - } - - /** - * The {@link SlimefunItem} instance of the machine. - * - * @return The {@link SlimefunItem} instance of the machine - */ - @Nullable - public AContainer getMachine() { - return container; - } - - /** - * This returns the used {@link MachineRecipe} in the process. - * - * @return The {@link MachineRecipe} of the process - */ - @Nullable - public MachineRecipe getMachineRecipe() { - return machineRecipe; - } - - @Nonnull - public static HandlerList getHandlerList() { - return handlers; - } - - @Nonnull - @Override - public HandlerList getHandlers() { - return getHandlerList(); - } -} diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncReactorProcessCompleteEvent.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncReactorProcessCompleteEvent.java deleted file mode 100644 index 554553426..000000000 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/AsyncReactorProcessCompleteEvent.java +++ /dev/null @@ -1,68 +0,0 @@ -package io.github.thebusybiscuit.slimefun4.api.events; - -import javax.annotation.Nonnull; -import javax.annotation.ParametersAreNonnullByDefault; - -import org.bukkit.Location; -import org.bukkit.event.Event; -import org.bukkit.event.HandlerList; - -import io.github.thebusybiscuit.slimefun4.implementation.items.electric.reactors.Reactor; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineFuel; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; - -/** - * This {@link Event} is fired whenever a {@link Reactor} has completed its process. - * - * @author poma123 - * - * @deprecated This event is no longer fired. Use the {@link AsyncMachineOperationFinishEvent} instead. - * - */ -@Deprecated -public class AsyncReactorProcessCompleteEvent extends AsyncMachineProcessCompleteEvent { - - private static final HandlerList handlers = new HandlerList(); - - private final Reactor reactor; - private final MachineFuel machineFuel; - - @ParametersAreNonnullByDefault - public AsyncReactorProcessCompleteEvent(Location l, Reactor reactor, MachineFuel machineFuel) { - super(l, null, null); - - this.reactor = reactor; - this.machineFuel = machineFuel; - } - - /** - * The {@link SlimefunItem} instance of the reactor. - * - * @return The {@link SlimefunItem} instance of the reactor - */ - @Nonnull - public Reactor getReactor() { - return reactor; - } - - /** - * This returns the used {@link MachineFuel} in the process. - * - * @return The {@link MachineFuel} of the process - */ - @Nonnull - public MachineFuel getMachineFuel() { - return machineFuel; - } - - @Nonnull - public static HandlerList getHandlerList() { - return handlers; - } - - @Nonnull - @Override - public HandlerList getHandlers() { - return getHandlerList(); - } -} diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/itemstack/ItemStackWrapper.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/itemstack/ItemStackWrapper.java index de665a07b..f6ba0924e 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/itemstack/ItemStackWrapper.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/itemstack/ItemStackWrapper.java @@ -31,20 +31,7 @@ public final class ItemStackWrapper extends ItemStack { private final int amount; private final boolean hasItemMeta; - /** - * @deprecated This constructor is often misused leading to duplicate - * wrappers being made, used once, and then discarded. - *

- * Use {@link #forceWrap(ItemStack)} to wrap an {@link ItemStack} - * regardless of whether it has already been wrapped. - *

- *

- * Use {@link #wrap(ItemStack)} to wrap an {@link ItemStack} if - * and only if it has not already been wrapped - *

- */ - @Deprecated - public ItemStackWrapper(@Nonnull ItemStack item) { + private ItemStackWrapper(@Nonnull ItemStack item) { super(item.getType()); amount = item.getAmount(); diff --git a/src/main/java/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/SlimefunItem.java b/src/main/java/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/SlimefunItem.java index dfae28e36..51f0a54c9 100644 --- a/src/main/java/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/SlimefunItem.java +++ b/src/main/java/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/SlimefunItem.java @@ -183,19 +183,6 @@ public class SlimefunItem implements Placeable { this.recipe = recipe; } - /** - * Returns the identifier of this {@link SlimefunItem}. - * - * @deprecated This method has been renamed to {@link #getId()}. - * - * @return the identifier of this {@link SlimefunItem} - */ - @Nonnull - @Deprecated - public final String getID() { - return getId(); - } - /** * Returns the identifier of this {@link SlimefunItem}. *