diff --git a/README.md b/README.md
index affc3ed96c..b5172a3612 100644
--- a/README.md
+++ b/README.md
@@ -1,165 +1,2 @@
-# Slimefun 4
-*Looking for the download link? [**Click here**](https://github.com/Slimefun/Slimefun4/blob/master/README.md#floppy_disk-download-slimefun-4)*
+# This is our modification of Slimefun4 to be optimised for large servers. No support will be given by us or Slimefun for issues with this.
-Slimefun is a plugin which aims to turn your Spigot Server into a modpack without ever installing a single mod. It offers everything you could possibly imagine. From Backpacks to Jetpacks! Slimefun lets every player decide on their own how much they want to dive into Magic or Tech.
-We got everything from magical wands to nuclear reactors.
-We feature a magical altar, an electric power grid and even item transport systems.
-
-This project originally started back **in 2013** and has grown ever since.
-From one single person working on this plugin back then, we grew to a community of thousands of players and hundreds of contributors to this project.
-It currently adds over **500 new items and recipes** to Minecraft ([Read more about the history of this project](https://github.com/Slimefun/Slimefun4/wiki/Slimefun-in-a-nutshell)).
-
-But it also comes with a lot of addons! Check out our [addons](https://github.com/Slimefun/Slimefun4/wiki/Addons), you may find exactly what you were looking for.
-
-### Quick navigation
-* **[:floppy_disk: Download Slimefun4](#floppy_disk-download-slimefun-4)**
-* **[:framed_picture: Screenshots](#framed_picture-screenshots)**
-* **[:headphones: Discord Support Server](#headphones-discord)**
-* **[:beetle: Bug Tracker](https://github.com/Slimefun/Slimefun4/issues)**
-* **[:open_book: Wiki](https://github.com/Slimefun/Slimefun4/wiki)**
-* **[:interrobang: FAQ](https://github.com/Slimefun/Slimefun4/wiki/FAQ)**
-* **[:handshake: How to contribute](https://github.com/Slimefun/Slimefun4/blob/master/CONTRIBUTING.md)**
-
-## :floppy_disk: Download Slimefun 4
-Slimefun requires your Minecraft Server to be running on [Spigot](https://spigotmc.org/), [Paper](https://papermc.io/) or on any fork of these.
-(See also: [How to install Slimefun](https://github.com/Slimefun/Slimefun4/wiki/Installing-Slimefun))
-
-Slimefun 4 can be downloaded **for free** on our builds page.
-We currently provide two distinct versions of Slimefun, development builds and "stable" builds.
-Here is a full summary of the differences between the two different versions of Slimefun.
-
-| | development (latest) | "stable" |
-| ------------------ | -------- | -------- |
-| **Minecraft version(s)** | :video_game: **1.16.\* - 1.20.\*** | :video_game: **1.16.\* - 1.20.\*** |
-| **Java version** | :computer: **Java 16 (or higher)** | :computer: **Java 16 (or higher)** |
-| **automatic updates** | :heavy_check_mark: | :heavy_check_mark: |
-| **frequent updates** | :heavy_check_mark: | :x: |
-| **latest content** | :heavy_check_mark: | :x: |
-| **Discord support** | :heavy_check_mark: | :x: |
-| **Bug Reports** | :heavy_check_mark: | :x: |
-| **testing before release** | :x: | :heavy_check_mark: |
-| **change logs** | :x: | :memo: **[change log](https://github.com/Slimefun/Slimefun4/blob/master/CHANGELOG.md)** |
-| **Download links** | :floppy_disk: **[download latest](https://blob.build/project/Slimefun4/Dev)** | :floppy_disk: **[download "stable"](https://blob.build/project/Slimefun4/RC)** |
-
-**:exclamation: We wholeheartedly recommend you to use _development builds_, they are the most recent version of Slimefun and also receive the most frequent updates! In fact, "stable" builds are so outdated that we won't accept bug reports from them at all.**
-Here's why...
-
-"Stable" builds do not receive frequent updates or fast patches. As time goes on, bugs are fixed but it will take some time until these fixes make it into a "stable" build. We will also not accept or review any bug reports from "stable" builds. They are in fact just old development builds that seemed to run fine without any __major__ issues.
-
-**:question: Why use a "stable" build then?**
-While "stable" builds most definitely contain more bugs than development builds due to their very slow update schedule. you can be sure that they will not include __game-breaking__ issues, but rest assured that development builds almost never contain such issues either. If your server or business however heavily depends on a version of Slimefun that does not change/update a lot, you are forgiven if you choose the "stable" branch. But development builds will bring you the best experience, both in terms of features and bug fixes.
-
-**:question: What exactly are these "stable" builds then and why do you put them in quotes?**
-"Stable" builds are literally just outdated development builds that seemed to run fine without any __major__ issues. But they are far from bug-free hence why actually calling them stable would be hypocritical. However these builds can only really stay "stable" if there are enough people using development builds and report any bugs they come across. Otherwise potential issues may go unnoticed and slip into a "stable" build. Again, we really recommend you to choose the development builds. But since a few people really wanted "stable" builds, they are now an option too.
-
-
-Well, we asked some users on our [Discord server](#headphones-discord) to send us some screenshots, so see for yourself:
-| Reactors and electricity | Awesome factories | Magic and Altars |
-| :-------------------------------------------: | :--------------------------------------: | :----------------------------------------: |
-| ![](https://raw.githubusercontent.com/Slimefun/Slimefun-Wiki/master/images/showcase1.png) | ![](https://raw.githubusercontent.com/Slimefun/Slimefun-Wiki/master/images/showcase6.png) | ![](https://raw.githubusercontent.com/Slimefun/Slimefun-Wiki/master/images/showcase5.png) |
-| *Screenshot provided by HamtaBot#0001* | *Screenshot provided by Piͭxͪeͤl (mnb)#5049* | *Screenshot provided by Kilaruna#4981* |
-| ![](https://raw.githubusercontent.com/Slimefun/Slimefun-Wiki/master/images/showcase4.png) | ![](https://raw.githubusercontent.com/Slimefun/Slimefun-Wiki/master/images/showcase3.png) | ![](https://raw.githubusercontent.com/Slimefun/Slimefun-Wiki/master/images/showcase2.png) |
-| *Screenshot provided by GalaxyKat11#3816* | *Screenshot provided by TamThan#7987* | *Screenshot provided by Kilaruna#4981* |
-
-## :headphones: Discord
-You can find Slimefun's community on Discord and connect with **over 7000** users of this plugin from all over the world.
-Click the badge down below to join the server for suggestions/questions or other discussions about this plugin.
-We are also hosting a community event every so often, join us to find out more.
-**Important: We don't accept bug reports on discord, please use our [Issue Tracker](https://github.com/Slimefun/Slimefun4/issues) to submit bug reports!**
-
-Due to the sheer size of this discord server, we need to enforce some [important rules](https://github.com/Slimefun/Slimefun4/wiki/Discord-Rules).
-Not following these rules can lead to a kick or even a ban from the server.
-
-
- - - -
- -## :open_book: Wiki -Slimefun has a (detailed and well-maintained - *cough*) Wiki for new players, maybe also consider -expanding the wiki to help grow our community and help out new users of this plugin. -https://github.com/Slimefun/Slimefun4/wiki - -#### :star: Highlighted Articles -* [What is Slimefun?](https://github.com/Slimefun/Slimefun4/wiki/Slimefun-in-a-nutshell) -* [How to install Slimefun](https://github.com/Slimefun/Slimefun4/wiki/Installing-Slimefun) -* [Addons for Slimefun 4](https://github.com/Slimefun/Slimefun4/wiki/Addons) -* [How to create an Addon for Slimefun 4](https://github.com/Slimefun/Slimefun4/wiki/Developer-Guide) -* [Getting Started](https://github.com/Slimefun/Slimefun4/wiki/Getting-Started) -* [Frequently Asked Questions](https://github.com/Slimefun/Slimefun4/wiki/FAQ) -* [Common issues](https://github.com/Slimefun/Slimefun4/wiki/Common-Issues) -* [Help us expand the Wiki!](https://github.com/Slimefun/Slimefun4/wiki/Expanding-the-Wiki) -* [Help us translate Slimefun!](https://github.com/Slimefun/Slimefun4/wiki/Translating-Slimefun) - -The wiki is entirely community-run, so if you find an article missing, feel free to write one and share it with others. - -## :handshake: Contributing to this project -Slimefun 4 is an Open-Source project and licensed under -[GNU GPLv3](https://github.com/Slimefun/Slimefun4/blob/master/LICENSE).* Example: - * + * *
* { 1.14.x, 1.15.x, 1.16.x } *- * + * * @return A {@link Collection} of all compatible minecraft versions as strings */ static @Nonnull Collection
* Any {@link SlimefunAddon} should use their own {@link Logger} instance! - * + * * @return Our {@link Logger} instance */ public static @Nonnull Logger logger() { @@ -774,7 +787,7 @@ private static void validateInstance() { * This returns our {@link GPSNetwork} instance. * The {@link GPSNetwork} is responsible for handling any GPS-related * operations and for managing any {@link GEOResource}. - * + * * @return Our {@link GPSNetwork} instance */ public static @Nonnull GPSNetwork getGPSNetwork() { @@ -801,7 +814,7 @@ private static void validateInstance() { * This method returns out {@link MinecraftRecipeService} for Slimefun. * This service is responsible for finding/identifying {@link Recipe Recipes} * from vanilla Minecraft. - * + * * @return Slimefun's {@link MinecraftRecipeService} instance */ public static @Nonnull MinecraftRecipeService getMinecraftRecipeService() { @@ -834,7 +847,7 @@ private static void validateInstance() { * That service is responsible for managing item settings per * {@link World}, such as disabling a {@link SlimefunItem} in a * specific {@link World}. - * + * * @return Our instance of {@link PerWorldSettingsService} */ public static @Nonnull PerWorldSettingsService getWorldSettingsService() { @@ -845,7 +858,7 @@ private static void validateInstance() { /** * This returns our {@link HologramsService} which handles the creation and * cleanup of any holograms. - * + * * @return Our instance of {@link HologramsService} */ public static @Nonnull HologramsService getHologramsService() { @@ -867,7 +880,7 @@ public static SoundService getSoundService() { /** * This returns our instance of {@link IntegrationsManager}. * This is responsible for managing any integrations with third party {@link Plugin plugins}. - * + * * @return Our instance of {@link IntegrationsManager} */ public static @Nonnull IntegrationsManager getIntegrations() { @@ -878,7 +891,7 @@ public static SoundService getSoundService() { /** * This returns out instance of the {@link ProtectionManager}. * This bridge is used to hook into any third-party protection {@link Plugin}. - * + * * @return Our instanceof of the {@link ProtectionManager} */ public static @Nonnull ProtectionManager getProtectionManager() { @@ -932,7 +945,7 @@ public static SoundService getSoundService() { /** * This returns our {@link NetworkManager} which is responsible * for handling the Cargo and Energy networks. - * + * * @return Our {@link NetworkManager} instance */ @@ -1026,15 +1039,13 @@ public static boolean isNewlyInstalled() { /** * This method schedules a delayed synchronous task for Slimefun. * For Slimefun only, not for addons. - * + *
* This method should only be invoked by Slimefun itself. * Addons must schedule their own tasks using their own {@link Plugin} instance. - * - * @param runnable - * The {@link Runnable} to run - * @param delay - * The delay for this task - * + * + * @param runnable The {@link Runnable} to run + * @param delay The delay for this task + * * @return The resulting {@link BukkitTask} or null if Slimefun was disabled */ public static @Nullable BukkitTask runSync(@Nonnull Runnable runnable, long delay) { @@ -1057,13 +1068,12 @@ public static boolean isNewlyInstalled() { /** * This method schedules a synchronous task for Slimefun. * For Slimefun only, not for addons. - * + *
* This method should only be invoked by Slimefun itself.
* Addons must schedule their own tasks using their own {@link Plugin} instance.
- *
- * @param runnable
- * The {@link Runnable} to run
- *
+ *
+ * @param runnable The {@link Runnable} to run
+ *
* @return The resulting {@link BukkitTask} or null if Slimefun was disabled
*/
public static @Nullable BukkitTask runSync(@Nonnull Runnable runnable) {
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java
index 471551575b..8db9826bc7 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java
@@ -25,7 +25,6 @@
import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
-import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
@@ -55,8 +54,6 @@
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu;
-import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.AdvancedMenuClickHandler;
-import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineFuel;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock;
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
@@ -847,18 +844,7 @@ private void constructMenu(@Nonnull BlockMenuPreset preset) {
preset.drawBackground(ChestMenuUtils.getOutputSlotTexture(), OUTPUT_BORDER);
for (int i : getOutputSlots()) {
- preset.addMenuClickHandler(i, new AdvancedMenuClickHandler() {
-
- @Override
- public boolean onClick(Player p, int slot, ItemStack cursor, ClickAction action) {
- return false;
- }
-
- @Override
- public boolean onClick(InventoryClickEvent e, Player p, int slot, ItemStack cursor, ClickAction action) {
- return cursor == null || cursor.getType() == null || cursor.getType() == Material.AIR;
- }
- });
+ preset.addMenuClickHandler(i, ChestMenuUtils.getDefaultOutputHandler());
}
preset.addItem(34, getFuelSource().getItem(), ChestMenuUtils.getEmptyClickHandler());
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractFilterNode.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractFilterNode.java
index d3197270bf..9101f02ffd 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractFilterNode.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractFilterNode.java
@@ -1,13 +1,20 @@
package io.github.thebusybiscuit.slimefun4.implementation.items.cargo;
+import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
+import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
+import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
+import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.AdvancedMenuClickHandler;
+import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
+import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockPlaceEvent;
+import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.ItemStack;
import io.github.bakedlibs.dough.items.CustomItemStack;
@@ -37,11 +44,13 @@ abstract class AbstractFilterNode extends AbstractCargoNode {
protected static final int[] SLOTS = { 19, 20, 21, 28, 29, 30, 37, 38, 39 };
private static final String FILTER_TYPE = "filter-type";
private static final String FILTER_LORE = "filter-lore";
+ private final boolean allowCustomItems;
@ParametersAreNonnullByDefault
protected AbstractFilterNode(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, @Nullable ItemStack recipeOutput) {
super(itemGroup, item, recipeType, recipe, recipeOutput);
+ allowCustomItems = Slimefun.getCfg().getBoolean("options.allow-custom-items-in-cargo-filters");
addItemHandler(onBreak());
}
@@ -125,6 +134,31 @@ protected void updateBlockMenu(BlockMenu menu, Block b) {
});
}
+ if (!allowCustomItems) {
+ for (int filterSlot : SLOTS) {
+ menu.addMenuClickHandler(filterSlot, new AdvancedMenuClickHandler() {
+ @Override
+ public boolean onClick(Player p, int slot, ItemStack item, ClickAction action) {
+ return false;
+ }
+
+ @Override
+ public boolean onClick(InventoryClickEvent e, Player p, int slot, ItemStack cursor, ClickAction action) {
+ if (cursor != null) {
+ SlimefunItem sfItem = SlimefunItem.getByItem(cursor);
+ if (sfItem == null && !(SlimefunUtils.isItemSimilar(cursor,
+ new ItemStack(cursor.getType()), true, false))
+ ) {
+ Slimefun.getLocalization().sendMessage(p, "machines.CARGO_NODES.no-custom-items", true);
+ return false;
+ }
+ }
+ return true;
+ }
+ });
+ }
+ }
+
addChannelSelector(b, menu, 41, 42, 43);
markDirty(loc);
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ElectricSmeltery.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ElectricSmeltery.java
index 24e0e0c33e..2218339998 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ElectricSmeltery.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ElectricSmeltery.java
@@ -11,7 +11,6 @@
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.ItemStack;
import io.github.bakedlibs.dough.items.CustomItemStack;
@@ -25,8 +24,6 @@
import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
-import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.AdvancedMenuClickHandler;
-import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
import me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu;
@@ -126,18 +123,7 @@ protected void constructMenu(BlockMenuPreset preset) {
preset.addItem(22, new CustomItemStack(Material.BLACK_STAINED_GLASS_PANE, " "), ChestMenuUtils.getEmptyClickHandler());
for (int i : getOutputSlots()) {
- preset.addMenuClickHandler(i, new AdvancedMenuClickHandler() {
-
- @Override
- public boolean onClick(Player p, int slot, ItemStack cursor, ClickAction action) {
- return false;
- }
-
- @Override
- public boolean onClick(InventoryClickEvent e, Player p, int slot, ItemStack cursor, ClickAction action) {
- return cursor == null || cursor.getType() == null || cursor.getType() == Material.AIR;
- }
- });
+ preset.addMenuClickHandler(i, ChestMenuUtils.getDefaultOutputHandler());
}
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/FluidPump.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/FluidPump.java
index d5607d1736..13b66afc08 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/FluidPump.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/FluidPump.java
@@ -14,8 +14,6 @@
import org.bukkit.block.BlockFace;
import org.bukkit.block.data.BlockData;
import org.bukkit.block.data.Levelled;
-import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.ItemStack;
import io.github.bakedlibs.dough.blocks.Vein;
@@ -33,8 +31,6 @@
import io.github.thebusybiscuit.slimefun4.utils.itemstack.ItemStackWrapper;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
-import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu.AdvancedMenuClickHandler;
-import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock;
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
@@ -101,18 +97,7 @@ private void constructMenu(@Nonnull BlockMenuPreset preset) {
}
for (int i : getOutputSlots()) {
- preset.addMenuClickHandler(i, new AdvancedMenuClickHandler() {
-
- @Override
- public boolean onClick(Player p, int slot, ItemStack cursor, ClickAction action) {
- return false;
- }
-
- @Override
- public boolean onClick(InventoryClickEvent e, Player p, int slot, ItemStack cursor, ClickAction action) {
- return cursor == null || cursor.getType() == null || cursor.getType() == Material.AIR;
- }
- });
+ preset.addMenuClickHandler(i, ChestMenuUtils.getDefaultOutputHandler());
}
}
@@ -158,7 +143,7 @@ protected void tick(@Nonnull Block b) {
removeCharge(b.getLocation(), ENERGY_CONSUMPTION);
menu.consumeItem(slot);
menu.pushItem(bucket, getOutputSlots());
- nextFluid.setType(Material.AIR);
+ // nextFluid.setType(Material.AIR);
}
return;
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/Freezer.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/Freezer.java
index c2ad401d80..cd39441c9f 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/Freezer.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/Freezer.java
@@ -3,13 +3,10 @@
import java.util.ArrayList;
import java.util.List;
-import javax.annotation.ParametersAreNonnullByDefault;
-
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
-import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem;
@@ -18,36 +15,18 @@
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe;
-/**
- * The {@link Freezer} can freeze items into its frozen state, e.g. water to ice.
- *
- * @author TheBusyBiscuit
- * @author svr333
- * @author J3fftw1
- */
public class Freezer extends AContainer implements RecipeDisplayItem {
- private final ItemSetting
* If you already have an instance of {@link SlimefunItem}, please use {@link SlimefunItem#canUse(Player, boolean)}.
*
- * @param p
- * The {@link Player}
- * @param item
- * The {@link ItemStack} to check
- * @param sendMessage
- * Whether to send a message response to the {@link Player}
+ * @param p The {@link Player}
+ * @param item The {@link ItemStack} to check
+ * @param sendMessage Whether to send a message response to the {@link Player}
*
* @return Whether the {@link Player} is able to use that item.
*/
@@ -594,16 +575,11 @@ public static boolean canPlayerUseItem(@Nonnull Player p, @Nullable ItemStack it
* This method automatically calls a {@link SlimefunItemSpawnEvent} to allow
* other plugins to catch the item being dropped.
*
- * @param loc
- * The {@link Location} where to drop the item
- * @param item
- * The {@link ItemStack} to drop
- * @param reason
- * The {@link ItemSpawnReason} why the item is being dropped
- * @param addRandomOffset
- * Whether a random offset should be added (see {@link World#dropItemNaturally(Location, ItemStack)})
- * @param player
- * The player that caused this {@link SlimefunItemSpawnEvent}
+ * @param loc The {@link Location} where to drop the item
+ * @param item The {@link ItemStack} to drop
+ * @param reason The {@link ItemSpawnReason} why the item is being dropped
+ * @param addRandomOffset Whether a random offset should be added (see {@link World#dropItemNaturally(Location, ItemStack)})
+ * @param player The player that caused this {@link SlimefunItemSpawnEvent}
*
* @return The dropped {@link Item} (or null if the {@link SlimefunItemSpawnEvent} was cancelled)
*/
@@ -630,14 +606,10 @@ public static boolean canPlayerUseItem(@Nonnull Player p, @Nullable ItemStack it
* This method automatically calls a {@link SlimefunItemSpawnEvent} to allow
* other plugins to catch the item being dropped.
*
- * @param loc
- * The {@link Location} where to drop the item
- * @param item
- * The {@link ItemStack} to drop
- * @param reason
- * The {@link ItemSpawnReason} why the item is being dropped
- * @param addRandomOffset
- * Whether a random offset should be added (see {@link World#dropItemNaturally(Location, ItemStack)})
+ * @param loc The {@link Location} where to drop the item
+ * @param item The {@link ItemStack} to drop
+ * @param reason The {@link ItemSpawnReason} why the item is being dropped
+ * @param addRandomOffset Whether a random offset should be added (see {@link World#dropItemNaturally(Location, ItemStack)})
*
* @return The dropped {@link Item} (or null if the {@link SlimefunItemSpawnEvent} was cancelled)
*/
@@ -651,12 +623,9 @@ public static boolean canPlayerUseItem(@Nonnull Player p, @Nullable ItemStack it
* This method automatically calls a {@link SlimefunItemSpawnEvent} to allow
* other plugins to catch the item being dropped.
*
- * @param loc
- * The {@link Location} where to drop the item
- * @param item
- * The {@link ItemStack} to drop
- * @param reason
- * The {@link ItemSpawnReason} why the item is being dropped
+ * @param loc The {@link Location} where to drop the item
+ * @param item The {@link ItemStack} to drop
+ * @param reason The {@link ItemSpawnReason} why the item is being dropped
*
* @return The dropped {@link Item} (or null if the {@link SlimefunItemSpawnEvent} was cancelled)
*/
@@ -670,8 +639,7 @@ public static boolean canPlayerUseItem(@Nonnull Player p, @Nullable ItemStack it
* If the MC version is 1.16 or above
* this will call {@link Inventory#isEmpty()} (Which calls MC code resulting in a faster method).
*
- * @param inventory
- * The {@link Inventory} to check.
+ * @param inventory The {@link Inventory} to check.
*
* @return True if the inventory is empty and false otherwise
*/
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/biomes/BiomeMap.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/biomes/BiomeMap.java
index 872972c687..e257f40647 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/biomes/BiomeMap.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/biomes/BiomeMap.java
@@ -1,5 +1,17 @@
package io.github.thebusybiscuit.slimefun4.utils.biomes;
+import com.google.gson.JsonElement;
+import io.github.thebusybiscuit.slimefun4.api.exceptions.BiomeMapException;
+import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource;
+import org.apache.commons.lang.Validate;
+import org.bukkit.Keyed;
+import org.bukkit.NamespacedKey;
+import org.bukkit.block.Biome;
+import org.bukkit.plugin.java.JavaPlugin;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import javax.annotation.ParametersAreNonnullByDefault;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
@@ -8,21 +20,6 @@
import java.util.Map;
import java.util.stream.Collectors;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-import javax.annotation.ParametersAreNonnullByDefault;
-
-import org.apache.commons.lang.Validate;
-import org.bukkit.Keyed;
-import org.bukkit.NamespacedKey;
-import org.bukkit.block.Biome;
-
-import com.google.gson.JsonElement;
-
-import io.github.thebusybiscuit.slimefun4.api.exceptions.BiomeMapException;
-import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource;
-import org.bukkit.plugin.java.JavaPlugin;
-
/**
* {@link BiomeMap}s are used to map data values to {@link Biome} constants.
*
@@ -34,11 +31,10 @@
* The most common type is {@link Integer}, if you are using complex objects and try to read
* your {@link BiomeMap} from a {@link JsonElement}, make sure to provide an adequate
* {@link BiomeDataConverter} to convert the raw json data.
- *
- * @author TheBusyBiscuit
*
- * @param
* If false is passed, this property will be removed.
*
- * @param item
- * The {@link ItemStack} you want to add/remove Soulbound from.
- * @param makeSoulbound
- * If the item should be soulbound.
+ * @param item The {@link ItemStack} you want to add/remove Soulbound from.
+ * @param makeSoulbound If the item should be soulbound.
*
* @see #isSoulbound(ItemStack)
*/
@@ -206,8 +200,7 @@ public static void setSoulbound(@Nullable ItemStack item, boolean makeSoulbound)
/**
* This method checks whether the given {@link ItemStack} is radioactive.
*
- * @param item
- * The {@link ItemStack} to check
+ * @param item The {@link ItemStack} to check
*
* @return Whether this {@link ItemStack} is radioactive or not
*/
@@ -219,8 +212,7 @@ public static boolean isRadioactive(@Nullable ItemStack item) {
* This method returns an {@link ItemStack} for the given texture.
* The result will be a Player Head with this texture.
*
- * @param texture
- * The texture for this head (base64 or hash)
+ * @param texture The texture for this head (base64 or hash)
*
* @return An {@link ItemStack} with this Head texture
*/
@@ -275,16 +267,14 @@ public static boolean containsSimilarItem(Inventory inventory, ItemStack item, b
* for performance.
* Will check for distintion of items by default and will also confirm the amount
* is the same.
- * @see DistinctiveItem
*
- * @param item
- * The {@link ItemStack} being tested.
- * @param sfitem
- * The {@link ItemStack} that {@param item} is being compared against.
- * @param checkLore
- * Whether to include the current lore of either item in the comparison
+ * @param item The {@link ItemStack} being tested.
+ * @param sfitem The {@link ItemStack} that {@param item} is being compared against.
+ * @param checkLore Whether to include the current lore of either item in the comparison
*
* @return True if the given {@link ItemStack}s are similar under the given constraints
+ *
+ * @see DistinctiveItem
*/
public static boolean isItemSimilar(@Nullable ItemStack item, @Nullable ItemStack sfitem, boolean checkLore) {
return isItemSimilar(item, sfitem, checkLore, true, true);
@@ -295,18 +285,15 @@ public static boolean isItemSimilar(@Nullable ItemStack item, @Nullable ItemStac
* Takes into account some shortcut checks specific to {@link SlimefunItem}s
* for performance.
* Will check for distintion of items by default
- * @see DistinctiveItem
*
- * @param item
- * The {@link ItemStack} being tested.
- * @param sfitem
- * The {@link ItemStack} that {@param item} is being compared against.
- * @param checkLore
- * Whether to include the current lore of either item in the comparison
- * @param checkAmount
- * Whether to include the item's amount(s) in the comparison
+ * @param item The {@link ItemStack} being tested.
+ * @param sfitem The {@link ItemStack} that {@param item} is being compared against.
+ * @param checkLore Whether to include the current lore of either item in the comparison
+ * @param checkAmount Whether to include the item's amount(s) in the comparison
*
* @return True if the given {@link ItemStack}s are similar under the given constraints
+ *
+ * @see DistinctiveItem
*/
public static boolean isItemSimilar(@Nullable ItemStack item, @Nullable ItemStack sfitem, boolean checkLore, boolean checkAmount) {
return isItemSimilar(item, sfitem, checkLore, checkAmount, true);
@@ -317,19 +304,15 @@ public static boolean isItemSimilar(@Nullable ItemStack item, @Nullable ItemStac
* Takes into account some shortcut checks specific to {@link SlimefunItem}s
* for performance.
*
- * @param item
- * The {@link ItemStack} being tested.
- * @param sfitem
- * The {@link ItemStack} that {@param item} is being compared against.
- * @param checkLore
- * Whether to include the current lore of either item in the comparison
- * @param checkAmount
- * Whether to include the item's amount(s) in the comparison
- * @param checkDistinction
- * Whether to check for special distinctive properties of the items.
- * @see DistinctiveItem
+ * @param item The {@link ItemStack} being tested.
+ * @param sfitem The {@link ItemStack} that {@param item} is being compared against.
+ * @param checkLore Whether to include the current lore of either item in the comparison
+ * @param checkAmount Whether to include the item's amount(s) in the comparison
+ * @param checkDistinction Whether to check for special distinctive properties of the items.
*
* @return True if the given {@link ItemStack}s are similar under the given constraints
+ *
+ * @see DistinctiveItem
*/
public static boolean isItemSimilar(@Nullable ItemStack item, @Nullable ItemStack sfitem, boolean checkLore, boolean checkAmount, boolean checkDistinction) {
if (item == null) {
@@ -345,7 +328,10 @@ public static boolean isItemSimilar(@Nullable ItemStack item, @Nullable ItemStac
/*
* PR #3417
*
- * Some items can't rely on just IDs matching and will implement {@link DistinctiveItem}
+ * Some items can't rely on just IDs matching and will implement Distinctive Item
+ * in which case we want to use the method provided to compare
+ *
+ * Some items can 't rely on just IDs matching and will implement {@link DistinctiveItem}
* in which case we want to use the method provided to compare
*/
if (checkDistinction && stackOne instanceof DistinctiveItem distinctive && stackTwo instanceof DistinctiveItem) {
@@ -509,10 +495,8 @@ private static boolean equalsItemMeta(@Nonnull ItemMeta itemMeta, @Nonnull ItemM
* This checks if the two provided lores are equal.
* This method will ignore any lines such as the soulbound one.
*
- * @param lore1
- * The first lore
- * @param lore2
- * The second lore
+ * @param lore1 The first lore
+ * @param lore2 The second lore
*
* @return Whether the two lores are equal
*/
@@ -568,12 +552,9 @@ public static void updateCapacitorTexture(@Nonnull Location l, int charge, int c
*