mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-12-02 15:43:22 +01:00
8.17.6 release
This commit is contained in:
parent
2df5959fac
commit
127cbb2e1c
@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
## 8.17.6
|
||||
- Fixed exception and hotbar being filled up with barrier blocks when using the addition right-click-hotkey on MC 1.8
|
||||
|
||||
## 8.17.5
|
||||
- Fixed "/invsort hotbar" and "/invsort all" only sorting the normal inventory when "allow-automatic-inventory-sorting" is set to false
|
||||
|
||||
|
2
pom.xml
2
pom.xml
@ -9,7 +9,7 @@
|
||||
<name>ChestSort</name>
|
||||
<url>https://www.chestsort.de</url>
|
||||
<description>Automatically sorts your chests!</description>
|
||||
<version>8.17.5</version>
|
||||
<version>8.17.6</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
|
@ -4,6 +4,7 @@ import de.jeff_media.ChestSort.hooks.CrackShotHook;
|
||||
import de.jeff_media.ChestSort.hooks.InventoryPagesHook;
|
||||
import de.jeff_media.ChestSort.utils.CategoryLinePair;
|
||||
import de.jeff_media.ChestSort.utils.TypeMatchPositionPair;
|
||||
import de.jeff_media.ChestSort.utils.Utils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@ -164,8 +165,8 @@ public class ChestSortOrganizer {
|
||||
return totalEnchants;
|
||||
}
|
||||
|
||||
static boolean doesInventoryContain(Inventory inv, Material mat) {
|
||||
for (ItemStack item : inv.getStorageContents()) {
|
||||
boolean doesInventoryContain(Inventory inv, Material mat) {
|
||||
for (ItemStack item : Utils.getStorageContents(inv,plugin.mcMinorVersion)) {
|
||||
if (item == null) continue;
|
||||
if (item.getType() == mat) {
|
||||
return true;
|
||||
|
@ -7,8 +7,17 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class Utils {
|
||||
|
||||
public static ItemStack[] getStorageContents(Inventory inv, int bukkitMinorVersion) {
|
||||
if(bukkitMinorVersion<=8) {
|
||||
return inv.getContents();
|
||||
}
|
||||
return inv.getStorageContents();
|
||||
}
|
||||
|
||||
// We need this to write the category files inside the .jar to the disk
|
||||
// Maybe there is a smarter way, i don't know.
|
||||
|
@ -1,6 +1,6 @@
|
||||
main: de.jeff_media.ChestSort.ChestSortPlugin
|
||||
name: ChestSort
|
||||
version: 8.17.5
|
||||
version: 8.17.6
|
||||
api-version: "1.13"
|
||||
description: Allows automatic chest sorting
|
||||
author: mfnalex
|
||||
|
Loading…
Reference in New Issue
Block a user