diff --git a/CHANGELOG.md b/CHANGELOG.md
index f424583..84d623b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,10 @@
# Changelog
-## 8.19.0
-- Improved API for ItemJoin
+## 9.0.0
+THIS UPDATE IS IMPORTANT WHEN YOU ARE USING PLUGINS THAT INTERACT WITH CHESTSORT
+Note: When you are using other plugins that depend on the ChestSortAPI 2.0.0+ (e.g. probably the next release of ItemJoin AFAIK) you need at least this version of ChestSort.
+- Improved API, especially for plugins that want to prevent specific items from being moved.
+- Implements ChestSortAPI version 2.0.0
## 8.18.1
- Improved API
diff --git a/HOW_TO_USE_API.md b/HOW_TO_USE_API.md
index ab87502..34476ec 100644
--- a/HOW_TO_USE_API.md
+++ b/HOW_TO_USE_API.md
@@ -19,7 +19,7 @@ You can use maven to add ChestSort as a dependency to your Spigot-/Bukkit-Plugin
de.jeff_media
ChestSortAPI
- 1.1.0
+ 2.0.0
compile
diff --git a/pom.xml b/pom.xml
index 6182e50..eccae69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
ChestSort
https://www.chestsort.de
Automatically sorts your chests!
- 8.19.0-SNAPSHOT
+ 9.0.0
jar
@@ -123,7 +123,7 @@
de.jeff_media
ChestSortAPI
- 1.1.0
+ 2.0.0
compile
diff --git a/src/main/java/de/jeff_media/ChestSort/ChestSortAPIHandler.java b/src/main/java/de/jeff_media/ChestSort/ChestSortAPIHandler.java
index e7c376f..113191f 100644
--- a/src/main/java/de/jeff_media/ChestSort/ChestSortAPIHandler.java
+++ b/src/main/java/de/jeff_media/ChestSort/ChestSortAPIHandler.java
@@ -30,4 +30,15 @@ public class ChestSortAPIHandler implements ChestSortAPI {
return plugin.isSortingEnabled(p);
}
+ @Override
+ public String getChestSortVersion() {
+ return plugin.getDescription().getVersion();
+ }
+
+ @Override
+ public String getChestSortAPIVersion() {
+ return "1.2.0";
+ }
+
+
}
diff --git a/src/main/java/de/jeff_media/ChestSort/ChestSortListener.java b/src/main/java/de/jeff_media/ChestSort/ChestSortListener.java
index 9efc3b2..e6b372a 100644
--- a/src/main/java/de/jeff_media/ChestSort/ChestSortListener.java
+++ b/src/main/java/de/jeff_media/ChestSort/ChestSortListener.java
@@ -564,6 +564,7 @@ public class ChestSortListener implements Listener {
ChestSortEvent chestSortEvent = new ChestSortEvent(e.getInventory());
+ chestSortEvent.setPlayer(e.getWhoClicked());
chestSortEvent.setLocation(e.getWhoClicked().getLocation());
chestSortEvent.setSortableMaps(new HashMap>());
diff --git a/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java b/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java
index 9bb200f..5f9dbc2 100644
--- a/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java
+++ b/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java
@@ -476,6 +476,12 @@ public class ChestSortOrganizer {
}
+ if(inv.getHolder() != null) {
+ if(inv.getHolder() instanceof HumanEntity) {
+ chestSortEvent.setPlayer((HumanEntity) inv.getHolder());
+ }
+ }
+
chestSortEvent.setSortableMaps(new HashMap>());
for (ItemStack item : inv.getContents()) {
chestSortEvent.getSortableMaps().put(item, getSortableMap(item));
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 039e9b5..52e0327 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.18.1
+version: 9.0.0
api-version: "1.13"
description: Allows automatic chest sorting
author: mfnalex