mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
[CI skip] Removed deprecated events and methods
This commit is contained in:
parent
ce32681d1b
commit
5a1405014f
15
CHANGELOG.md
15
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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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.
|
||||
* <p>
|
||||
* Use {@link #forceWrap(ItemStack)} to wrap an {@link ItemStack}
|
||||
* regardless of whether it has already been wrapped.
|
||||
* </p>
|
||||
* <p>
|
||||
* Use {@link #wrap(ItemStack)} to wrap an {@link ItemStack} if
|
||||
* and only if it has not already been wrapped
|
||||
* </p>
|
||||
*/
|
||||
@Deprecated
|
||||
public ItemStackWrapper(@Nonnull ItemStack item) {
|
||||
private ItemStackWrapper(@Nonnull ItemStack item) {
|
||||
super(item.getType());
|
||||
|
||||
amount = item.getAmount();
|
||||
|
@ -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}.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user