8.14.0 release

This commit is contained in:
mfnalex 2020-07-12 03:58:40 +02:00
parent 435f90e488
commit 581abf9edd
9 changed files with 14 additions and 72 deletions

View File

@ -1,7 +1,7 @@
# Changelog
## 8.13.1
## 8.14.0
- Updated Russian and Turkish translation
- Separated ChestSort plugin and API
- Separated ChestSort plugin and API. You can view the new API documentation [here](https://github.com/JEFF-Media-GbR/Spigot-ChestSort/blob/master/HOW_TO_USE_API.md).
## 8.13.0
- Updated Chinese (Traditional) and Spanish translation

View File

@ -16,7 +16,7 @@ You can use maven to add ChestSort as a dependency to your Spigot-/Bukkit-Plugin
<dependency>
<groupId>de.jeff_media</groupId>
<artifactId>ChestSortAPI</artifactId>
<version>8.13.1</version> <!-- Check www.chestsort.de for latest version -->
<version>1.0.0</version> <!-- The API version is independent of the ChestSort version -->
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -6,10 +6,10 @@
<groupId>de.jeff_media</groupId>
<artifactId>ChestSort</artifactId>
<name>JeffChestSort</name>
<name>ChestSort</name>
<url>https://www.chestsort.de</url>
<description>Automatically sorts your chests!</description>
<version>8.13.1</version>
<version>8.14.0</version>
<packaging>jar</packaging>
<properties>
@ -113,7 +113,7 @@
<dependency>
<groupId>de.jeff_media</groupId>
<artifactId>ChestSortAPI</artifactId>
<version>8.13.1</version>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -3,7 +3,7 @@ package de.jeff_media.ChestSort;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
public class ChestSortAPIHandler implements ChestSortAPI {
public class ChestSortAPIHandler implements de.jeff_media.ChestSortAPI.ChestSortAPI {
final ChestSortPlugin plugin;

View File

@ -1,58 +0,0 @@
package de.jeff_media.ChestSort;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.Inventory;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class ChestSortEvent extends Event implements Cancellable {
boolean cancelled = false;
Location loc;
final Inventory inv;
Player p;
private static final HandlerList HANDLERS = new HandlerList();
public ChestSortEvent(Inventory inv) {
this.inv = inv;
}
@Nullable
public Location getLocation() {
return loc;
}
public Inventory getInventory() {
return inv;
}
@Nullable
public Player getPlayer() {
return p;
}
public @NotNull HandlerList getHandlers() {
return HANDLERS;
}
public static HandlerList getHandlerList() {
return HANDLERS;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean cancel) {
cancelled = cancel;
}
}

View File

@ -437,7 +437,7 @@ public class ChestSortListener implements Listener {
}
private boolean isAPICall(Inventory inv) {
return inv.getHolder() instanceof ISortable;
return inv.getHolder() instanceof de.jeff_media.ChestSortAPI.ISortable;
}
@EventHandler
@ -486,8 +486,8 @@ public class ChestSortListener implements Listener {
ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString());
ChestSortEvent chestSortEvent = new ChestSortEvent(e.getInventory());
chestSortEvent.loc = e.getWhoClicked().getLocation();
de.jeff_media.ChestSortAPI.ChestSortEvent chestSortEvent = new de.jeff_media.ChestSortAPI.ChestSortEvent(e.getInventory());
chestSortEvent.setLocation(e.getWhoClicked().getLocation());
Bukkit.getPluginManager().callEvent(chestSortEvent);
if (chestSortEvent.isCancelled()) {
return;

View File

@ -408,8 +408,8 @@ public class ChestSortOrganizer {
// This whole try/catch fixes MethodNotFoundException when using inv.getLocation in Spigot 1.8.
}
if (inv.getLocation() != null) {
ChestSortEvent chestSortEvent = new ChestSortEvent(inv);
chestSortEvent.loc = inv.getLocation();
de.jeff_media.ChestSortAPI.ChestSortEvent chestSortEvent = new de.jeff_media.ChestSortAPI.ChestSortEvent(inv);
chestSortEvent.setLocation(inv.getLocation());
Bukkit.getPluginManager().callEvent(chestSortEvent);
if (chestSortEvent.isCancelled()) {
return;

View File

@ -55,7 +55,7 @@ import org.bukkit.plugin.java.JavaPlugin;
import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin;
import de.jeff_media.ChestSort.utils.Utils;
public class ChestSortPlugin extends JavaPlugin implements ChestSort {
public class ChestSortPlugin extends JavaPlugin implements de.jeff_media.ChestSortAPI.ChestSort {
ChestSortLogger lgr;
Map<String, ChestSortPlayerSetting> perPlayerSettings = new HashMap<>();

View File

@ -1,6 +1,6 @@
main: de.jeff_media.ChestSort.ChestSortPlugin
name: ChestSort
version: 8.13.1
version: 8.14.0
api-version: "1.13"
description: Allows automatic chest sorting
author: mfnalex