mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-12-03 08:03:26 +01:00
10.0.0
This commit is contained in:
parent
1bda6e51e4
commit
295b616669
@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 10.0.0
|
||||
- API update - some weird Spigot update broke casting the Plugin instance to its interface.
|
||||
- Plugins depending on ChestSort or using its API must be updated too.
|
||||
- API is now accessed simply via de.jeff_media.chestsort.ChestSortAPI
|
||||
- Added "isChestSortInstalled" method
|
||||
|
||||
## 9.7.2
|
||||
- Updated Turkish translation
|
||||
|
||||
|
14
pom.xml
14
pom.xml
@ -9,7 +9,7 @@
|
||||
<name>ChestSort</name>
|
||||
<url>https://www.chestsort.de</url>
|
||||
<description>Automatically sorts your chests!</description>
|
||||
<version>9.7.2</version>
|
||||
<version>10.0.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
@ -45,23 +45,23 @@
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>de.jeff_media.jefflib</pattern>
|
||||
<shadedPattern>de.jeff_media.ChestSort.jefflib</shadedPattern>
|
||||
<shadedPattern>de.jeff_media.chestsort.jefflib</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>org.apache.maven.artifact</pattern>
|
||||
<shadedPattern>de.jeff_media.ChestSort.jefflib.thirdparty.org.apache.maven.artifact</shadedPattern>
|
||||
<shadedPattern>de.jeff_media.chestsort.jefflib.thirdparty.org.apache.maven.artifact</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>de.jeff_media.updatechecker</pattern>
|
||||
<shadedPattern>de.jeff_media.ChestSort.updatechecker</shadedPattern>
|
||||
<shadedPattern>de.jeff_media.chestsort.updatechecker</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>org.bstats</pattern>
|
||||
<shadedPattern>de.jeff_media.ChestSort</shadedPattern>
|
||||
<shadedPattern>de.jeff_media.chestsort</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>io.papermc.lib</pattern>
|
||||
<shadedPattern>de.jeff_media.ChestSort.paperlib</shadedPattern> <!-- Replace this -->
|
||||
<shadedPattern>de.jeff_media.chestsort.paperlib</shadedPattern> <!-- Replace this -->
|
||||
</relocation>
|
||||
</relocations>
|
||||
<artifactSet>
|
||||
@ -149,7 +149,7 @@
|
||||
<dependency>
|
||||
<groupId>de.jeff_media</groupId>
|
||||
<artifactId>ChestSortAPI</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<version>3.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -1,9 +1,12 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import de.jeff_media.ChestSortAPI.ChestSortAPI;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
/**
|
||||
* This isn't used anymore
|
||||
*/
|
||||
public class ChestSortAPIHandler implements ChestSortAPI {
|
||||
|
||||
final ChestSortPlugin plugin;
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import de.jeff_media.jefflib.NBTAPI;
|
||||
import org.bukkit.Bukkit;
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import de.jeff_media.ChestSort.utils.TypeMatchPositionPair;
|
||||
import de.jeff_media.chestsort.utils.TypeMatchPositionPair;
|
||||
|
||||
public class ChestSortCategory implements Comparable<ChestSortCategory>{
|
||||
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@ -11,7 +11,7 @@ import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import de.jeff_media.ChestSort.utils.Utils;
|
||||
import de.jeff_media.chestsort.utils.Utils;
|
||||
|
||||
public class ChestSortConfigUpdater {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
@ -1,8 +1,7 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import de.jeff_media.ChestSort.hooks.*;
|
||||
import de.jeff_media.ChestSort.utils.LlamaUtils;
|
||||
import de.jeff_media.ChestSortAPI.ChestSortAPI;
|
||||
import de.jeff_media.chestsort.hooks.*;
|
||||
import de.jeff_media.chestsort.utils.LlamaUtils;
|
||||
import de.jeff_media.ChestSortAPI.ChestSortEvent;
|
||||
import de.jeff_media.ChestSortAPI.ISortable;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.Nullable;
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import de.jeff_media.ChestSort.hooks.CrackShotHook;
|
||||
import de.jeff_media.ChestSort.hooks.InventoryPagesHook;
|
||||
import de.jeff_media.ChestSort.hooks.SlimeFunHook;
|
||||
import de.jeff_media.ChestSort.utils.CategoryLinePair;
|
||||
import de.jeff_media.ChestSort.utils.TypeMatchPositionPair;
|
||||
import de.jeff_media.ChestSort.utils.Utils;
|
||||
import de.jeff_media.chestsort.hooks.CrackShotHook;
|
||||
import de.jeff_media.chestsort.hooks.InventoryPagesHook;
|
||||
import de.jeff_media.chestsort.hooks.SlimeFunHook;
|
||||
import de.jeff_media.chestsort.utils.CategoryLinePair;
|
||||
import de.jeff_media.chestsort.utils.TypeMatchPositionPair;
|
||||
import de.jeff_media.chestsort.utils.Utils;
|
||||
import de.jeff_media.ChestSortAPI.ChestSortEvent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
@ -453,12 +453,12 @@ public class ChestSortOrganizer {
|
||||
}
|
||||
|
||||
// Sort a complete inventory
|
||||
void sortInventory(Inventory inv) {
|
||||
public void sortInventory(Inventory inv) {
|
||||
sortInventory(inv, 0, inv.getSize() - 1);
|
||||
}
|
||||
|
||||
// Sort an inventory only between startSlot and endSlot
|
||||
void sortInventory(@NotNull Inventory inv, int startSlot, int endSlot) {
|
||||
public void sortInventory(@NotNull Inventory inv, int startSlot, int endSlot) {
|
||||
if(inv==null) return;
|
||||
plugin.debug("Attempting to sort an Inventory and calling ChestSortEvent.");
|
||||
Class<? extends Inventory> invClass = inv.getClass();
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.UUID;
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.inventory.Inventory;
|
@ -25,15 +25,15 @@
|
||||
|
||||
*/
|
||||
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin;
|
||||
import de.jeff_media.ChestSort.config.Config;
|
||||
import de.jeff_media.ChestSort.hooks.EnderContainersHook;
|
||||
import de.jeff_media.ChestSort.hooks.GenericGUIHook;
|
||||
import de.jeff_media.ChestSort.hooks.PlayerVaultsHook;
|
||||
import de.jeff_media.ChestSort.placeholders.ChestSortPlaceholders;
|
||||
import de.jeff_media.ChestSort.utils.Utils;
|
||||
import de.jeff_media.chestsort.config.Config;
|
||||
import de.jeff_media.chestsort.hooks.EnderContainersHook;
|
||||
import de.jeff_media.chestsort.hooks.GenericGUIHook;
|
||||
import de.jeff_media.chestsort.hooks.PlayerVaultsHook;
|
||||
import de.jeff_media.chestsort.placeholders.ChestSortPlaceholders;
|
||||
import de.jeff_media.chestsort.utils.Utils;
|
||||
import de.jeff_media.jefflib.JeffLib;
|
||||
import de.jeff_media.jefflib.NBTAPI;
|
||||
import de.jeff_media.jefflib.VersionUtil;
|
||||
@ -74,7 +74,7 @@ public class ChestSortPlugin extends JavaPlugin implements de.jeff_media.ChestSo
|
||||
int mcMinorVersion; // 14 for 1.14, 13 for 1.13, ...
|
||||
String mcVersion; // 1.13.2 = 1_13_R2
|
||||
ChestSortMessages messages;
|
||||
ChestSortOrganizer organizer;
|
||||
public ChestSortOrganizer organizer;
|
||||
Map<String, ChestSortPlayerSetting> perPlayerSettings = new HashMap<>();
|
||||
ChestSortPermissionsHandler permissionsHandler;
|
||||
ChestSortSettingsGUI settingsGUI;
|
||||
@ -82,6 +82,11 @@ public class ChestSortPlugin extends JavaPlugin implements de.jeff_media.ChestSo
|
||||
UpdateChecker updateChecker;
|
||||
boolean usingMatchingConfig = true;
|
||||
boolean verbose = true;
|
||||
private static ChestSortPlugin instance;
|
||||
|
||||
public static ChestSortPlugin getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
// Creates the default configuration file
|
||||
// Also checks the config-version of an already existing file. If the existing
|
||||
@ -206,7 +211,7 @@ public class ChestSortPlugin extends JavaPlugin implements de.jeff_media.ChestSo
|
||||
return difference <= cooldown;
|
||||
}
|
||||
|
||||
boolean isSortingEnabled(Player p) {
|
||||
public boolean isSortingEnabled(Player p) {
|
||||
if (perPlayerSettings == null) {
|
||||
perPlayerSettings = new HashMap<>();
|
||||
}
|
||||
@ -352,6 +357,8 @@ public class ChestSortPlugin extends JavaPlugin implements de.jeff_media.ChestSo
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
instance = this;
|
||||
|
||||
JeffLib.init(this);
|
||||
|
||||
String tmpVersion = getServer().getClass().getPackage().getName();
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort;
|
||||
package de.jeff_media.chestsort;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort.config;
|
||||
package de.jeff_media.chestsort.config;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
|
||||
public class Config {
|
||||
public static final String HOTKEY_COOLDOWN = "hotkey-cooldown";
|
@ -1,10 +1,10 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.shampaggon.crackshot.CSUtility;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
|
||||
public class CrackShotHook {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
public class CrateReloadedHook {
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
public class EnderContainersHook {
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
public class GenericGUIHook {
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
public class GoldenCratesHook {
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
public class HeadDatabaseHook {
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@ -9,7 +9,7 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class InventoryPagesHook {
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
@ -7,7 +7,7 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
import at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack;
|
||||
import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin;
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
|
||||
public class MinepacksHook {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
public class PlayerVaultsHook {
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort.hooks;
|
||||
package de.jeff_media.chestsort.hooks;
|
||||
|
||||
import io.github.thebusybiscuit.slimefun4.implementation.items.backpacks.SlimefunBackpack;
|
||||
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort.placeholders;
|
||||
package de.jeff_media.chestsort.placeholders;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.jeff_media.ChestSort.test;
|
||||
package de.jeff_media.chestsort.test;
|
||||
|
||||
import de.jeff_media.ChestSort.ChestSortPlugin;
|
||||
import de.jeff_media.chestsort.ChestSortPlugin;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class APIDeprecation {
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort.utils;
|
||||
package de.jeff_media.chestsort.utils;
|
||||
|
||||
|
||||
public class CategoryLinePair {
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort.utils;
|
||||
package de.jeff_media.chestsort.utils;
|
||||
|
||||
import org.bukkit.entity.ChestedHorse;
|
||||
import org.bukkit.entity.Donkey;
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort.utils;
|
||||
package de.jeff_media.chestsort.utils;
|
||||
|
||||
public class TypeMatchPositionPair {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package de.jeff_media.ChestSort.utils;
|
||||
package de.jeff_media.chestsort.utils;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@ -6,7 +6,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
main: de.jeff_media.ChestSort.ChestSortPlugin
|
||||
main: de.jeff_media.chestsort.ChestSortPlugin
|
||||
name: ChestSort
|
||||
version: 9.7.1
|
||||
api-version: "1.13"
|
||||
|
Loading…
Reference in New Issue
Block a user