diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/exceptions/WrongItemStackException.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/exceptions/WrongItemStackException.java deleted file mode 100644 index ef1c9e6c46..0000000000 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/exceptions/WrongItemStackException.java +++ /dev/null @@ -1,39 +0,0 @@ -package io.github.thebusybiscuit.slimefun4.api.exceptions; - -import javax.annotation.ParametersAreNonnullByDefault; - -import org.bukkit.inventory.ItemStack; - -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; -import io.github.thebusybiscuit.slimefun4.core.attributes.DamageableItem; - -/** - * A {@link WrongItemStackException} is thrown when someone tries to alter an {@link ItemStack} - * but actually wanted to alter a different one. - * - * If for example a {@link DamageableItem} accidentally damages the original {@link SlimefunItem} - * instead of the held {@link ItemStack}, this will be thrown. - * - * @author TheBusyBiscuit - * - * @see SlimefunItemStack - * @see SlimefunItem - * - */ -public class WrongItemStackException extends RuntimeException { - - private static final long serialVersionUID = 9144658137363309071L; - - /** - * This constructs a new {@link WrongItemStackException} with the given error context. - * - * @param message - * An error message to display - */ - @ParametersAreNonnullByDefault - public WrongItemStackException(String message) { - super("You probably wanted to alter a different ItemStack: " + message); - } - -} diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItem.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItem.java index c9ce57cbe1..3d52b81245 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItem.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItem.java @@ -31,7 +31,6 @@ import io.github.thebusybiscuit.slimefun4.api.exceptions.IncompatibleItemHandlerException; import io.github.thebusybiscuit.slimefun4.api.exceptions.MissingDependencyException; import io.github.thebusybiscuit.slimefun4.api.exceptions.UnregisteredItemException; -import io.github.thebusybiscuit.slimefun4.api.exceptions.WrongItemStackException; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; import io.github.thebusybiscuit.slimefun4.api.researches.Research; @@ -575,20 +574,6 @@ private void loadItemHandlers() { } } - /** - * This method returns whether the original {@link SlimefunItemStack} of this - * {@link SlimefunItem} is immutable. - * - * If true is returned, then any changes to the original {@link SlimefunItemStack} - * will be rejected with a {@link WrongItemStackException}. - * This ensures integrity so developers don't accidentally damage the wrong {@link ItemStack}. - * - * @return Whether the original {@link SlimefunItemStack} is immutable. - */ - protected boolean isItemStackImmutable() { - return true; - } - /** * This method checks if the dependencies have been set up correctly. * diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItemStack.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItemStack.java index 025067dcca..bfe2d2312b 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItemStack.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItemStack.java @@ -42,7 +42,6 @@ import io.github.bakedlibs.dough.skins.PlayerSkin; import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; import io.github.thebusybiscuit.slimefun4.api.exceptions.PrematureCodeException; -import io.github.thebusybiscuit.slimefun4.api.exceptions.WrongItemStackException; import io.github.thebusybiscuit.slimefun4.implementation.Slimefun; import io.github.thebusybiscuit.slimefun4.utils.HeadTexture; import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedItemFlag;