mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-09-27 14:42:34 +02:00
7.5-pre1 update
This commit is contained in:
parent
811ada97b6
commit
4179833297
@ -1,5 +1,5 @@
|
||||
# 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
|
||||
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/
|
||||
|
||||
## 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
|
||||
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.
|
||||
|
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>de.jeffclan</groupId>
|
||||
<artifactId>JeffChestSort</artifactId>
|
||||
<version>7.4</version>
|
||||
<version>7.5-pre1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>JeffChestSort</name>
|
||||
@ -95,7 +95,7 @@
|
||||
<dependency>
|
||||
<groupId>com.shampaggon.crackshot</groupId>
|
||||
<artifactId>CSUtility</artifactId>
|
||||
<version>0.98.9</version>
|
||||
<version>latest</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/CrackShot.jar</systemPath>
|
||||
</dependency>
|
||||
|
@ -181,9 +181,9 @@ public class JeffChestSortListener implements Listener {
|
||||
}
|
||||
|
||||
private boolean belongsToChestLikeBlock(Inventory inventory) {
|
||||
// Special check if the inventory is an Enderchest,
|
||||
// as for Enderchests getHolder() is null
|
||||
if (inventory.getType() == InventoryType.ENDER_CHEST) {
|
||||
|
||||
// Check by InventoryType
|
||||
if (inventory.getType() == InventoryType.ENDER_CHEST || inventory.getType() == InventoryType.SHULKER_BOX) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -192,10 +192,11 @@ public class JeffChestSortListener implements Listener {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check by InventoryHolder
|
||||
// Only continue if the inventory belongs to one of the following:
|
||||
// - a chest,
|
||||
// - double chest,
|
||||
// - shulkerbox (MC 1.11)
|
||||
// - shulkerbox (MC 1.11) (obsolete, is checked above by InventoryType
|
||||
// - barrel (MC 1.14)
|
||||
// - 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
|
||||
@ -208,7 +209,7 @@ public class JeffChestSortListener implements Listener {
|
||||
// in Spigot 1.14 while a double chest returns org.bukkit.block.DoubleChest
|
||||
if (!(inventory.getHolder() instanceof Chest) && !(inventory.getHolder() instanceof DoubleChest)
|
||||
&& !(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"))) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
|
||||
name: ChestSort
|
||||
version: 7.4
|
||||
version: 7.5-pre1
|
||||
api-version: 1.13
|
||||
description: Allows automatic chest sorting
|
||||
author: mfnalex
|
||||
|
Loading…
Reference in New Issue
Block a user