diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd2a606..34ff1c2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog
+## 8.17.1
+- Improved sorting of colored blocks
+ - White, light gray, gray and black comes first
+ - Remaining colors are sorted in a rainbow like order
+
## 8.17.0
- Added option to disable automatic sorting and/or automatic inventory sorting. Hotkeys will still work if enabled. When running /chestsort while automatic sorting is disabled, it will display the hotkeys gui instead.
diff --git a/pom.xml b/pom.xml
index c2bd96a..7ff1542 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
ChestSort
https://www.chestsort.de
Automatically sorts your chests!
- 8.17.0
+ 8.17.1
jar
diff --git a/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java b/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java
index 7dc6059..711f919 100644
--- a/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java
+++ b/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java
@@ -105,6 +105,44 @@ public class ChestSortOrganizer {
}
+ static String getColorOrdered(String c) {
+ switch(c) {
+ case "white":
+ return "01_white";
+ case "light_gray":
+ return "02_light_gray";
+ case "gray":
+ return "03_gray";
+ case "black":
+ return "04_black";
+ case "brown":
+ return "05_brown";
+ case "red":
+ return "06_red";
+ case "orange":
+ return "07_orange";
+ case "yellow":
+ return "08_yellow";
+ case "lime":
+ return "09_lime";
+ case "green":
+ return "10_green";
+ case "cyan":
+ return "11_cyan";
+ case "light_blue":
+ return "12_light_blue";
+ case "blue":
+ return "13_blue";
+ case "magenta":
+ return "14_magenta";
+ case "purple":
+ return "15_purple";
+ case "pink":
+ return "16_pink";
+ }
+ return "";
+ }
+
static int getNumberOfEnchantments(ItemStack is) {
int totalEnchants = 0;
@@ -214,7 +252,7 @@ public class ChestSortOrganizer {
for (String color : colors) {
if (typeName.startsWith(color)) {
typeName = typeName.replaceFirst(color + "_", "");
- myColor = color;
+ myColor = getColorOrdered(color);
}
}
// Same for wood, but the wood name can also be in the middle of the item name,
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 32973ad..0da61ad 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,6 +1,6 @@
main: de.jeff_media.ChestSort.ChestSortPlugin
name: ChestSort
-version: 8.17.0
+version: 8.17.1
api-version: "1.13"
description: Allows automatic chest sorting
author: mfnalex