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
|
# 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
|
## 8.17.5
|
||||||
- Fixed "/invsort hotbar" and "/invsort all" only sorting the normal inventory when "allow-automatic-inventory-sorting" is set to false
|
- 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>
|
<name>ChestSort</name>
|
||||||
<url>https://www.chestsort.de</url>
|
<url>https://www.chestsort.de</url>
|
||||||
<description>Automatically sorts your chests!</description>
|
<description>Automatically sorts your chests!</description>
|
||||||
<version>8.17.5</version>
|
<version>8.17.6</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -4,6 +4,7 @@ import de.jeff_media.ChestSort.hooks.CrackShotHook;
|
|||||||
import de.jeff_media.ChestSort.hooks.InventoryPagesHook;
|
import de.jeff_media.ChestSort.hooks.InventoryPagesHook;
|
||||||
import de.jeff_media.ChestSort.utils.CategoryLinePair;
|
import de.jeff_media.ChestSort.utils.CategoryLinePair;
|
||||||
import de.jeff_media.ChestSort.utils.TypeMatchPositionPair;
|
import de.jeff_media.ChestSort.utils.TypeMatchPositionPair;
|
||||||
|
import de.jeff_media.ChestSort.utils.Utils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
@ -164,8 +165,8 @@ public class ChestSortOrganizer {
|
|||||||
return totalEnchants;
|
return totalEnchants;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean doesInventoryContain(Inventory inv, Material mat) {
|
boolean doesInventoryContain(Inventory inv, Material mat) {
|
||||||
for (ItemStack item : inv.getStorageContents()) {
|
for (ItemStack item : Utils.getStorageContents(inv,plugin.mcMinorVersion)) {
|
||||||
if (item == null) continue;
|
if (item == null) continue;
|
||||||
if (item.getType() == mat) {
|
if (item.getType() == mat) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -7,9 +7,18 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||||
|
import org.bukkit.inventory.Inventory;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class Utils {
|
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
|
// We need this to write the category files inside the .jar to the disk
|
||||||
// Maybe there is a smarter way, i don't know.
|
// Maybe there is a smarter way, i don't know.
|
||||||
public static byte[] getBytes(InputStream is) throws IOException {
|
public static byte[] getBytes(InputStream is) throws IOException {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
main: de.jeff_media.ChestSort.ChestSortPlugin
|
main: de.jeff_media.ChestSort.ChestSortPlugin
|
||||||
name: ChestSort
|
name: ChestSort
|
||||||
version: 8.17.5
|
version: 8.17.6
|
||||||
api-version: "1.13"
|
api-version: "1.13"
|
||||||
description: Allows automatic chest sorting
|
description: Allows automatic chest sorting
|
||||||
author: mfnalex
|
author: mfnalex
|
||||||
|
Loading…
Reference in New Issue
Block a user