7.5-pre1 update

This commit is contained in:
mfnalex 2020-05-16 21:55:07 +02:00
parent 811ada97b6
commit 4179833297
4 changed files with 11 additions and 10 deletions

View File

@ -1,5 +1,5 @@
# ChestSort # ChestSort
1.8 to 1.14 compatible Minecraft-/Spigot-Plugin to allow automatic chest and inventory sorting. 1.8.x to 1.15.x compatible Minecraft-/Spigot-Plugin to allow automatic chest and inventory sorting.
## Download & more information ## Download & more information
Please see the related topic at spigotmc.org for information regarding the commands, permissions and download links: Please see the related topic at spigotmc.org for information regarding the commands, permissions and download links:
@ -7,7 +7,7 @@ Please see the related topic at spigotmc.org for information regarding the comma
https://www.spigotmc.org/resources/1-13-chestsort.59773/ https://www.spigotmc.org/resources/1-13-chestsort.59773/
## Building .jar file ## Building .jar file
To build the .jar file, you will need maven. Also, the CrackShot library is in no public repository, so please create a directory called `lib` and put the latest CrackShot.jar file inside it. Now you can do `mvn install` To build the .jar file, you will need maven. Also, the CrackShot library is in no public repository, so please create a directory called `lib` and put the latest CrackShot.jar file [(available here)](https://www.spigotmc.org/resources/crackshot-guns.48301/) inside it. Now you can do `mvn install`
## Technical stuff ## Technical stuff
ChestSort takes an instance of org.bukkit.inventory.Inventory and copies the contents. The resulting array is sorted by rules defined in the config.yml. This takes far less than one millisecond for a whole chest. So there should be no problems even on big servers, where hundreds of players are using chests at the same time. ChestSort takes an instance of org.bukkit.inventory.Inventory and copies the contents. The resulting array is sorted by rules defined in the config.yml. This takes far less than one millisecond for a whole chest. So there should be no problems even on big servers, where hundreds of players are using chests at the same time.

View File

@ -6,7 +6,7 @@
<groupId>de.jeffclan</groupId> <groupId>de.jeffclan</groupId>
<artifactId>JeffChestSort</artifactId> <artifactId>JeffChestSort</artifactId>
<version>7.4</version> <version>7.5-pre1</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>JeffChestSort</name> <name>JeffChestSort</name>
@ -95,7 +95,7 @@
<dependency> <dependency>
<groupId>com.shampaggon.crackshot</groupId> <groupId>com.shampaggon.crackshot</groupId>
<artifactId>CSUtility</artifactId> <artifactId>CSUtility</artifactId>
<version>0.98.9</version> <version>latest</version>
<scope>system</scope> <scope>system</scope>
<systemPath>${project.basedir}/lib/CrackShot.jar</systemPath> <systemPath>${project.basedir}/lib/CrackShot.jar</systemPath>
</dependency> </dependency>

View File

@ -181,9 +181,9 @@ public class JeffChestSortListener implements Listener {
} }
private boolean belongsToChestLikeBlock(Inventory inventory) { private boolean belongsToChestLikeBlock(Inventory inventory) {
// Special check if the inventory is an Enderchest,
// as for Enderchests getHolder() is null // Check by InventoryType
if (inventory.getType() == InventoryType.ENDER_CHEST) { if (inventory.getType() == InventoryType.ENDER_CHEST || inventory.getType() == InventoryType.SHULKER_BOX) {
return true; return true;
} }
@ -192,10 +192,11 @@ public class JeffChestSortListener implements Listener {
return false; return false;
} }
// Check by InventoryHolder
// Only continue if the inventory belongs to one of the following: // Only continue if the inventory belongs to one of the following:
// - a chest, // - a chest,
// - double chest, // - double chest,
// - shulkerbox (MC 1.11) // - shulkerbox (MC 1.11) (obsolete, is checked above by InventoryType
// - barrel (MC 1.14) // - barrel (MC 1.14)
// - Minecart with Chest (MC 1.0) // - Minecart with Chest (MC 1.0)
// NOTE: Hoppers are NOT included because it may break item sorters like those: https://minecraft.gamepedia.com/Tutorials/Hopper#Item_sorter // NOTE: Hoppers are NOT included because it may break item sorters like those: https://minecraft.gamepedia.com/Tutorials/Hopper#Item_sorter
@ -208,7 +209,7 @@ public class JeffChestSortListener implements Listener {
// in Spigot 1.14 while a double chest returns org.bukkit.block.DoubleChest // in Spigot 1.14 while a double chest returns org.bukkit.block.DoubleChest
if (!(inventory.getHolder() instanceof Chest) && !(inventory.getHolder() instanceof DoubleChest) if (!(inventory.getHolder() instanceof Chest) && !(inventory.getHolder() instanceof DoubleChest)
&& !(inventory.getHolder().getClass().toString().endsWith(".CraftMinecartChest")) && !(inventory.getHolder().getClass().toString().endsWith(".CraftMinecartChest"))
&& !(inventory.getHolder().getClass().toString().endsWith(".CraftShulkerBox")) && !(inventory.getHolder().getClass().toString().endsWith(".CraftShulkerBox")) //Obsolete, is checked above by InventoryType
&& !(inventory.getHolder().getClass().toString().endsWith(".CraftBarrel"))) { && !(inventory.getHolder().getClass().toString().endsWith(".CraftBarrel"))) {
return false; return false;
} }

View File

@ -1,6 +1,6 @@
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
name: ChestSort name: ChestSort
version: 7.4 version: 7.5-pre1
api-version: 1.13 api-version: 1.13
description: Allows automatic chest sorting description: Allows automatic chest sorting
author: mfnalex author: mfnalex