This commit is contained in:
mfnalex 2018-08-13 13:05:32 +02:00
parent 50be26152e
commit 45fc9be373

View File

@ -9,8 +9,7 @@ public class JeffChestSortOrganizer {
static String getSortableString(ItemStack item) { static String getSortableString(ItemStack item) {
return item.getType().name() return item.getType().name()
+ "," + "," + String.valueOf(item.hashCode());
+ String.valueOf(item.hashCode());
} }
static void sortInventory(Inventory inv) { static void sortInventory(Inventory inv) {
@ -47,6 +46,7 @@ public class JeffChestSortOrganizer {
// put everything back in the inventory // put everything back in the inventory
for (String s : shortenedArray) { for (String s : shortenedArray) {
// System.out.println(s);
for (ItemStack item : items) { for (ItemStack item : items) {
if (item != null && s != null) { if (item != null && s != null) {
if (item.hashCode() == Integer.parseInt(s.split(",")[1])) { if (item.hashCode() == Integer.parseInt(s.split(",")[1])) {