From 192cadbfb09feca5697c6411101adb58f82a3a9e Mon Sep 17 00:00:00 2001 From: mfnalex <1122571+mfnalex@users.noreply.github.com> Date: Sun, 24 May 2020 19:36:28 +0200 Subject: [PATCH] changed class and package names --- CHANGELOG.md | 2 + .../de/jeff_media/ChestSort/ChestSortAPI.java | 29 ++++++++ .../ChestSort/ChestSortCategory.java} | 10 +-- .../ChestSort/ChestSortChestSortCommand.java} | 10 +-- .../ChestSort/ChestSortConfigUpdater.java} | 10 +-- .../ChestSort/ChestSortInvSortCommand.java} | 12 ++-- .../ChestSort/ChestSortListener.java} | 24 +++---- .../ChestSort/ChestSortMessages.java} | 8 +-- .../ChestSort/ChestSortOrganizer.java} | 24 +++---- .../ChestSortPermissionsHandler.java} | 8 +-- .../ChestSort/ChestSortPlayerSetting.java} | 6 +- .../ChestSort/ChestSortPlugin.java} | 72 +++++++++++-------- .../ChestSort/ChestSortSettingsGUI.java} | 24 +++---- .../ChestSort/ChestSortTabCompleter.java} | 4 +- .../ChestSort/ChestSortUpdateChecker.java} | 8 +-- .../ChestSort}/hooks/CrackShotHook.java | 8 +-- .../ChestSort}/hooks/CustomItemsHook.java | 2 +- .../ChestSort}/hooks/InventoryPagesHook.java | 8 +-- .../ChestSort}/hooks/MinepacksHook.java | 8 +-- .../ChestSort}/utils/CategoryLinePair.java | 2 +- .../utils/TypeMatchPositionPair.java | 2 +- .../ChestSort}/utils/Utils.java | 6 +- src/main/resources/plugin.yml | 2 +- 23 files changed, 166 insertions(+), 123 deletions(-) create mode 100644 src/main/java/de/jeff_media/ChestSort/ChestSortAPI.java rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortCategory.java => jeff_media/ChestSort/ChestSortCategory.java} (85%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortChestSortCommand.java => jeff_media/ChestSort/ChestSortChestSortCommand.java} (87%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortConfigUpdater.java => jeff_media/ChestSort/ChestSortConfigUpdater.java} (95%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortInvSortCommand.java => jeff_media/ChestSort/ChestSortInvSortCommand.java} (83%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortListener.java => jeff_media/ChestSort/ChestSortListener.java} (94%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortMessages.java => jeff_media/ChestSort/ChestSortMessages.java} (96%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortOrganizer.java => jeff_media/ChestSort/ChestSortOrganizer.java} (96%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortPermissionsHandler.java => jeff_media/ChestSort/ChestSortPermissionsHandler.java} (85%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortPlayerSetting.java => jeff_media/ChestSort/ChestSortPlayerSetting.java} (86%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortPlugin.java => jeff_media/ChestSort/ChestSortPlugin.java} (92%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortSettingsGUI.java => jeff_media/ChestSort/ChestSortSettingsGUI.java} (83%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortTabCompleter.java => jeff_media/ChestSort/ChestSortTabCompleter.java} (91%) rename src/main/java/de/{jeffclan/JeffChestSort/JeffChestSortUpdateChecker.java => jeff_media/ChestSort/ChestSortUpdateChecker.java} (96%) rename src/main/java/de/{jeffclan => jeff_media/ChestSort}/hooks/CrackShotHook.java (78%) rename src/main/java/de/{jeffclan => jeff_media/ChestSort}/hooks/CustomItemsHook.java (79%) rename src/main/java/de/{jeffclan => jeff_media/ChestSort}/hooks/InventoryPagesHook.java (94%) rename src/main/java/de/{jeffclan => jeff_media/ChestSort}/hooks/MinepacksHook.java (86%) rename src/main/java/de/{jeffclan => jeff_media/ChestSort}/utils/CategoryLinePair.java (95%) rename src/main/java/de/{jeffclan => jeff_media/ChestSort}/utils/TypeMatchPositionPair.java (95%) rename src/main/java/de/{jeffclan => jeff_media/ChestSort}/utils/Utils.java (86%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b491e9..d52a45a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # Changelog +## 8.8-pre1 +- Changed class names and moved API to its own class - can be accessed via ChestSortPlugin#getAPI() ## 8.7 - When using Minepacks, the backpack item in the inventory will not be moved - Added use-permissions option. If you do not use a permissions plugin, you can set this to false to allow every player to use ChestSort diff --git a/src/main/java/de/jeff_media/ChestSort/ChestSortAPI.java b/src/main/java/de/jeff_media/ChestSort/ChestSortAPI.java new file mode 100644 index 0000000..0834c8b --- /dev/null +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortAPI.java @@ -0,0 +1,29 @@ +package de.jeff_media.ChestSort; + +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; + +public class ChestSortAPI { + + ChestSortPlugin plugin; + + ChestSortAPI(ChestSortPlugin plugin) { + this.plugin = plugin; + } + + // Public API method to sort any given inventory + public void sortInventory(Inventory inv) { + plugin.organizer.sortInventory(inv); + } + + // Public API method to sort any given inventory inbetween startSlot and endSlot + public void sortInventory(Inventory inv, int startSlot, int endSlot) { + plugin.organizer.sortInventory(inv, startSlot, endSlot); + } + + // Public API method to check if player has automatic chest sorting enabled + public boolean sortingEnabled(Player p) { + return plugin.isSortingEnabled(p); + } + +} diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortCategory.java b/src/main/java/de/jeff_media/ChestSort/ChestSortCategory.java similarity index 85% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortCategory.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortCategory.java index 76157e2..ffd85cf 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortCategory.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortCategory.java @@ -1,8 +1,8 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; -import de.jeffclan.utils.TypeMatchPositionPair; +import de.jeff_media.ChestSort.utils.TypeMatchPositionPair; -public class JeffChestSortCategory implements Comparable{ +public class ChestSortCategory implements Comparable{ // Represents a sorting category // Includes an array of strings called typeMatches @@ -16,7 +16,7 @@ public class JeffChestSortCategory implements Comparable{ boolean sticky = false; TypeMatchPositionPair[] typeMatches; - JeffChestSortCategory(String name, TypeMatchPositionPair[] typeMatchPositionPairs) { + ChestSortCategory(String name, TypeMatchPositionPair[] typeMatchPositionPairs) { this.name = name; this.typeMatches = typeMatchPositionPairs; } @@ -70,7 +70,7 @@ public class JeffChestSortCategory implements Comparable{ return 0; } - public int compareTo(JeffChestSortCategory compareCategory) { + public int compareTo(ChestSortCategory compareCategory) { return this.name.compareTo(compareCategory.name); } diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortChestSortCommand.java b/src/main/java/de/jeff_media/ChestSort/ChestSortChestSortCommand.java similarity index 87% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortChestSortCommand.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortChestSortCommand.java index 9037e2b..adff35c 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortChestSortCommand.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortChestSortCommand.java @@ -1,15 +1,15 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -public class JeffChestSortChestSortCommand implements CommandExecutor { +public class ChestSortChestSortCommand implements CommandExecutor { - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; - JeffChestSortChestSortCommand(JeffChestSortPlugin plugin) { + ChestSortChestSortCommand(ChestSortPlugin plugin) { this.plugin = plugin; } @@ -57,7 +57,7 @@ public class JeffChestSortChestSortCommand implements CommandExecutor { } // Settings GUI End - JeffChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); + ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); if(args.length>0 && !args[0].equalsIgnoreCase("toggle") diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortConfigUpdater.java b/src/main/java/de/jeff_media/ChestSort/ChestSortConfigUpdater.java similarity index 95% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortConfigUpdater.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortConfigUpdater.java index 01da03d..10459df 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortConfigUpdater.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortConfigUpdater.java @@ -1,4 +1,4 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import java.io.File; import java.io.FileNotFoundException; @@ -12,13 +12,13 @@ import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; -import de.jeffclan.utils.Utils; +import de.jeff_media.ChestSort.utils.Utils; -public class JeffChestSortConfigUpdater { +public class ChestSortConfigUpdater { - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; - public JeffChestSortConfigUpdater(JeffChestSortPlugin jeffChestSortPlugin) { + public ChestSortConfigUpdater(ChestSortPlugin jeffChestSortPlugin) { this.plugin = jeffChestSortPlugin; } diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortInvSortCommand.java b/src/main/java/de/jeff_media/ChestSort/ChestSortInvSortCommand.java similarity index 83% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortInvSortCommand.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortInvSortCommand.java index 5a7fcc4..0ef4101 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortInvSortCommand.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortInvSortCommand.java @@ -1,15 +1,15 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -public class JeffChestSortInvSortCommand implements CommandExecutor { +public class ChestSortInvSortCommand implements CommandExecutor { - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; - JeffChestSortInvSortCommand(JeffChestSortPlugin plugin) { + ChestSortInvSortCommand(ChestSortPlugin plugin) { this.plugin = plugin; } @@ -31,7 +31,7 @@ public class JeffChestSortInvSortCommand implements CommandExecutor { int start = 9; int end = 35; - JeffChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); + ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); if(args.length>0) { if(args[0].equalsIgnoreCase("all")) { @@ -66,7 +66,7 @@ public class JeffChestSortInvSortCommand implements CommandExecutor { } } - plugin.sortInventory(p.getInventory(), start, end); + plugin.organizer.sortInventory(p.getInventory(), start, end); p.sendMessage(plugin.messages.MSG_PLAYERINVSORTED); return true; diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortListener.java b/src/main/java/de/jeff_media/ChestSort/ChestSortListener.java similarity index 94% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortListener.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortListener.java index 51f2a21..d6ee4dc 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortListener.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortListener.java @@ -1,4 +1,4 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import org.bukkit.GameMode; import org.bukkit.Material; @@ -18,14 +18,14 @@ import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; -import de.jeffclan.hooks.MinepacksHook; +import de.jeff_media.ChestSort.hooks.MinepacksHook; -public class JeffChestSortListener implements Listener { +public class ChestSortListener implements Listener { - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; MinepacksHook minepacksHook; - JeffChestSortListener(JeffChestSortPlugin plugin) { + ChestSortListener(ChestSortPlugin plugin) { this.plugin = plugin; this.minepacksHook = new MinepacksHook(plugin); } @@ -73,7 +73,7 @@ public class JeffChestSortListener implements Listener { if(!minepacksHook.isMinepacksBackpack(inv)) return; if( !p.hasPermission("chestsort.use")) return; plugin.registerPlayerIfNeeded(p); - JeffChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); + ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); if(!setting.sortingEnabled) return; plugin.organizer.sortInventory(inv); } @@ -91,7 +91,7 @@ public class JeffChestSortListener implements Listener { if( !p.hasPermission("chestsort.use.inventory")) return; plugin.registerPlayerIfNeeded(p); - JeffChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); + ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); if(!setting.invSortingEnabled) return; plugin.organizer.sortInventory(p.getInventory(),9,35); @@ -218,7 +218,7 @@ public class JeffChestSortListener implements Listener { // Get the current player's settings // We do not immediately cancel when sorting is disabled because we might want // to show the hint message - JeffChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); + ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); // Show "how to enable ChestSort" message when ALL of the following criteria are // met: @@ -227,7 +227,7 @@ public class JeffChestSortListener implements Listener { // logout // is defined by the config setting "show-message-again-after-logout") // - "show-message-when-using-chest" is set to true in the config.yml - if (!plugin.sortingEnabled(p)) { + if (!plugin.isSortingEnabled(p)) { if (!setting.hasSeenMessage) { setting.hasSeenMessage = true; if (plugin.getConfig().getBoolean("show-message-when-using-chest")) { @@ -316,7 +316,7 @@ public class JeffChestSortListener implements Listener { boolean sort = false; - JeffChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); + ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); // Do not sort the GUI inventory if(event.getClickedInventory() == setting.guiInventory) { @@ -424,11 +424,11 @@ public class JeffChestSortListener implements Listener { if( !p.hasPermission("chestsort.use")) return; plugin.registerPlayerIfNeeded(p); - JeffChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); + ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); if(e.isLeftClick() && setting.leftClick) { plugin.organizer.stuffPlayerInventoryIntoAnother(p.getInventory(), e.getInventory()); - plugin.sortInventory(e.getInventory()); + plugin.organizer.sortInventory(e.getInventory()); plugin.organizer.updateInventoryView(e.getInventory()); } else if(e.isRightClick() && setting.rightClick) { plugin.organizer.stuffInventoryIntoAnother(e.getInventory(), p.getInventory(),e.getInventory()); diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortMessages.java b/src/main/java/de/jeff_media/ChestSort/ChestSortMessages.java similarity index 96% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortMessages.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortMessages.java index beb4aae..3da3e86 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortMessages.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortMessages.java @@ -1,8 +1,8 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import org.bukkit.ChatColor; -public class JeffChestSortMessages { +public class ChestSortMessages { // Messages can be customized in the config.yml // To avoid problems with missing messages in the config, the default messages @@ -11,7 +11,7 @@ public class JeffChestSortMessages { // When creating pull requests that feature a message to the player, please // stick to this scheme - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; final String MSG_ACTIVATED, MSG_DEACTIVATED, MSG_INVACTIVATED, MSG_INVDEACTIVATED, MSG_COMMANDMESSAGE, MSG_COMMANDMESSAGE2, MSG_PLAYERSONLY, MSG_PLAYERINVSORTED, MSG_INVALIDOPTIONS; @@ -20,7 +20,7 @@ public class JeffChestSortMessages { final String MSG_GUI_MIDDLECLICK, MSG_GUI_SHIFTCLICK, MSG_GUI_DOUBLECLICK, MSG_GUI_SHIFTRIGHTCLICK, MSG_GUI_LEFTCLICK, MSG_GUI_RIGHTCLICK; - JeffChestSortMessages(JeffChestSortPlugin plugin) { + ChestSortMessages(ChestSortPlugin plugin) { this.plugin = plugin; MSG_ACTIVATED = ChatColor.translateAlternateColorCodes('&', plugin.getConfig() diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java b/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java similarity index 96% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java index fc9e666..d200942 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortOrganizer.java @@ -1,4 +1,4 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import java.io.File; import java.io.FileNotFoundException; @@ -26,12 +26,12 @@ import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.PotionMeta; import org.bukkit.potion.PotionData; -import de.jeffclan.hooks.CrackShotHook; -import de.jeffclan.hooks.InventoryPagesHook; -import de.jeffclan.utils.CategoryLinePair; -import de.jeffclan.utils.TypeMatchPositionPair; +import de.jeff_media.ChestSort.hooks.CrackShotHook; +import de.jeff_media.ChestSort.hooks.InventoryPagesHook; +import de.jeff_media.ChestSort.utils.CategoryLinePair; +import de.jeff_media.ChestSort.utils.TypeMatchPositionPair; -public class JeffChestSortOrganizer { +public class ChestSortOrganizer { // This is the heart of ChestSort! // All of the sorting stuff happens here. @@ -44,7 +44,7 @@ public class JeffChestSortOrganizer { * they are already alphabetically in the right order */ - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; CrackShotHook crackShotHook; InventoryPagesHook inventoryPagesHook; @@ -64,10 +64,10 @@ public class JeffChestSortOrganizer { private static final String emptyPlaceholderString = "~"; // We store a list of all Category objects - ArrayList categories = new ArrayList(); + ArrayList categories = new ArrayList(); ArrayList stickyCategoryNames = new ArrayList(); - JeffChestSortOrganizer(JeffChestSortPlugin plugin) { + ChestSortOrganizer(ChestSortPlugin plugin) { this.plugin = plugin; // Load Categories @@ -95,7 +95,7 @@ public class JeffChestSortOrganizer { plugin.getLogger().info("Loading category file " + file.getName()); } try { - JeffChestSortCategory category = new JeffChestSortCategory(categoryName, loadCategoryFile(file)); + ChestSortCategory category = new ChestSortCategory(categoryName, loadCategoryFile(file)); categories.add(category); if (plugin.debug) { plugin.getLogger().info("Loaded category file " + file.getName() + " (" @@ -110,7 +110,7 @@ public class JeffChestSortOrganizer { // Make categories sticky for(String catName : stickyCategoryNames) { - for(JeffChestSortCategory cat : categories) { + for(ChestSortCategory cat : categories) { if(catName.equalsIgnoreCase(cat.name)) { cat.setSticky(); } @@ -280,7 +280,7 @@ public class JeffChestSortOrganizer { // items when sorting by category) CategoryLinePair getCategoryLinePair(String typeName) { typeName = typeName.toLowerCase(); - for (JeffChestSortCategory cat : categories) { + for (ChestSortCategory cat : categories) { short matchingLineNumber = cat.matches(typeName); if (matchingLineNumber != 0) { return new CategoryLinePair(cat.name, matchingLineNumber); diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortPermissionsHandler.java b/src/main/java/de/jeff_media/ChestSort/ChestSortPermissionsHandler.java similarity index 85% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortPermissionsHandler.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortPermissionsHandler.java index 26a5213..762f010 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortPermissionsHandler.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortPermissionsHandler.java @@ -1,4 +1,4 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import java.util.HashMap; import java.util.UUID; @@ -6,12 +6,12 @@ import java.util.UUID; import org.bukkit.entity.Player; import org.bukkit.permissions.PermissionAttachment; -public class JeffChestSortPermissionsHandler { +public class ChestSortPermissionsHandler { HashMap permissions; - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; - JeffChestSortPermissionsHandler(JeffChestSortPlugin plugin) { + ChestSortPermissionsHandler(ChestSortPlugin plugin) { this.plugin = plugin; this.permissions = new HashMap(); } diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortPlayerSetting.java b/src/main/java/de/jeff_media/ChestSort/ChestSortPlayerSetting.java similarity index 86% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortPlayerSetting.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortPlayerSetting.java index 6b21659..60caf03 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortPlayerSetting.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortPlayerSetting.java @@ -1,8 +1,8 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import org.bukkit.inventory.Inventory; -public class JeffChestSortPlayerSetting { +public class ChestSortPlayerSetting { // Represents the information regarding a player // That includes: @@ -26,7 +26,7 @@ public class JeffChestSortPlayerSetting { // Do we have to save these settings? boolean changed = false; - JeffChestSortPlayerSetting(boolean sortingEnabled, boolean invSortingEnabled, boolean middleClick, boolean shiftClick, boolean doubleClick, boolean shiftRightClick, boolean leftClick, boolean rightClick, boolean changed) { + ChestSortPlayerSetting(boolean sortingEnabled, boolean invSortingEnabled, boolean middleClick, boolean shiftClick, boolean doubleClick, boolean shiftRightClick, boolean leftClick, boolean rightClick, boolean changed) { this.sortingEnabled = sortingEnabled; this.middleClick = middleClick; this.shiftClick = shiftClick; diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortPlugin.java b/src/main/java/de/jeff_media/ChestSort/ChestSortPlugin.java similarity index 92% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortPlugin.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortPlugin.java index fc76594..c8a1186 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortPlugin.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortPlugin.java @@ -26,7 +26,7 @@ */ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import java.io.BufferedWriter; import java.io.File; @@ -47,24 +47,24 @@ import org.bukkit.Material; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; -import org.bukkit.permissions.PermissionAttachment; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin; -import de.jeffclan.utils.Utils; +import de.jeff_media.ChestSort.utils.Utils; -public class JeffChestSortPlugin extends JavaPlugin { +public class ChestSortPlugin extends JavaPlugin { - Map perPlayerSettings = new HashMap(); - JeffChestSortMessages messages; - JeffChestSortOrganizer organizer; - JeffChestSortUpdateChecker updateChecker; - JeffChestSortListener listener; - JeffChestSortSettingsGUI settingsGUI; - JeffChestSortPermissionsHandler permissionsHandler; + Map perPlayerSettings = new HashMap(); + ChestSortMessages messages; + ChestSortOrganizer organizer; + ChestSortUpdateChecker updateChecker; + ChestSortListener listener; + ChestSortSettingsGUI settingsGUI; + ChestSortPermissionsHandler permissionsHandler; String sortingMethod; ArrayList disabledWorlds; + ChestSortAPI api; int currentConfigVersion = 30; boolean usingMatchingConfig = true; protected boolean debug = false; @@ -82,22 +82,32 @@ public class JeffChestSortPlugin extends JavaPlugin { // 1.14.4 = 1_14_R1 // 1.8.0 = 1_8_R1 int mcMinorVersion; // 14 for 1.14, 13 for 1.13, ... + + public ChestSortAPI getAPI() { + return this.api; + } // Public API method to sort any given inventory + @Deprecated public void sortInventory(Inventory inv) { - this.organizer.sortInventory(inv); + api.sortInventory(inv); } // Public API method to sort any given inventory inbetween startSlot and endSlot + @Deprecated public void sortInventory(Inventory inv, int startSlot, int endSlot) { - this.organizer.sortInventory(inv, startSlot, endSlot); + api.sortInventory(inv, startSlot, endSlot); } - // Check whether sorting is enabled for a player. Public because it can be - // accessed as part of the API + // Public API method to check if player has automatic chest sorting enabled + @Deprecated public boolean sortingEnabled(Player p) { + return isSortingEnabled(p); + } + + boolean isSortingEnabled(Player p) { if (perPlayerSettings == null) { - perPlayerSettings = new HashMap(); + perPlayerSettings = new HashMap(); } listener.plugin.registerPlayerIfNeeded(p); return perPlayerSettings.get(p.getUniqueId().toString()).sortingEnabled; @@ -133,7 +143,7 @@ public class JeffChestSortPlugin extends JavaPlugin { // use the default values later on } else*/ if (getConfig().getInt("config-version", 0) != currentConfigVersion) { showOldConfigWarning(); - JeffChestSortConfigUpdater configUpdater = new JeffChestSortConfigUpdater(this); + ChestSortConfigUpdater configUpdater = new ChestSortConfigUpdater(this); configUpdater.updateConfig(); configUpdater = null; usingMatchingConfig = true; @@ -251,23 +261,25 @@ public class JeffChestSortPlugin extends JavaPlugin { // Messages class will load messages from config, fallback to hardcoded default // messages - messages = new JeffChestSortMessages(this); + messages = new ChestSortMessages(this); // Organizer will load all category files and will be ready to sort stuff - organizer = new JeffChestSortOrganizer(this); + organizer = new ChestSortOrganizer(this); - settingsGUI = new JeffChestSortSettingsGUI(this); + settingsGUI = new ChestSortSettingsGUI(this); // UpdateChecker will check on startup and every 24 hours for new updates (when // enabled) - updateChecker = new JeffChestSortUpdateChecker(this); + updateChecker = new ChestSortUpdateChecker(this); // The listener will register joining (and unregister leaving) players, and call // the Organizer to sort inventories when a player closes a chest, shulkerbox or // barrel inventory - listener = new JeffChestSortListener(this); + listener = new ChestSortListener(this); - permissionsHandler = new JeffChestSortPermissionsHandler(this); + api = new ChestSortAPI(this); + + permissionsHandler = new ChestSortPermissionsHandler(this); usePermissions = getConfig().getBoolean("use-permissions"); @@ -281,11 +293,11 @@ public class JeffChestSortPlugin extends JavaPlugin { getServer().getPluginManager().registerEvents(settingsGUI, this); // Create the CommandExecutor, register commands and set their TabCompleter - JeffChestSortChestSortCommand chestsortCommandExecutor = new JeffChestSortChestSortCommand(this); - JeffChestSortTabCompleter tabCompleter = new JeffChestSortTabCompleter(); + ChestSortChestSortCommand chestsortCommandExecutor = new ChestSortChestSortCommand(this); + ChestSortTabCompleter tabCompleter = new ChestSortTabCompleter(); this.getCommand("chestsort").setExecutor(chestsortCommandExecutor); this.getCommand("chestsort").setTabCompleter(tabCompleter); - JeffChestSortInvSortCommand invsortCommandExecutor = new JeffChestSortInvSortCommand(this); + ChestSortInvSortCommand invsortCommandExecutor = new ChestSortInvSortCommand(this); this.getCommand("invsort").setExecutor(invsortCommandExecutor); this.getCommand("invsort").setTabCompleter(tabCompleter); @@ -349,9 +361,9 @@ public class JeffChestSortPlugin extends JavaPlugin { private String getCategoryList() { String list = ""; - JeffChestSortCategory[] categories = organizer.categories.toArray(new JeffChestSortCategory[organizer.categories.size()]); + ChestSortCategory[] categories = organizer.categories.toArray(new ChestSortCategory[organizer.categories.size()]); Arrays.sort(categories); - for(JeffChestSortCategory category : categories) { + for(ChestSortCategory category : categories) { list = list + category.name + " ("; list = list + category.typeMatches.length + "), "; } @@ -491,7 +503,7 @@ public class JeffChestSortPlugin extends JavaPlugin { // are online // but not registered. So, we only continue when the player has been registered if (perPlayerSettings.containsKey(uniqueId.toString())) { - JeffChestSortPlayerSetting setting = perPlayerSettings.get(p.getUniqueId().toString()); + ChestSortPlayerSetting setting = perPlayerSettings.get(p.getUniqueId().toString()); File playerFile = new File(getDataFolder() + File.separator + "playerdata", p.getUniqueId().toString() + ".yml"); @@ -589,7 +601,7 @@ public class JeffChestSortPlugin extends JavaPlugin { rightClick = playerConfig.getBoolean("rightClick",getConfig().getBoolean("additional-hotkeys.right-click")); } - JeffChestSortPlayerSetting newSettings = new JeffChestSortPlayerSetting(activeForThisPlayer,invActiveForThisPlayer,middleClick,shiftClick,doubleClick,shiftRightClick,leftClick,rightClick,changed); + ChestSortPlayerSetting newSettings = new ChestSortPlayerSetting(activeForThisPlayer,invActiveForThisPlayer,middleClick,shiftClick,doubleClick,shiftRightClick,leftClick,rightClick,changed); // when "show-message-again-after-logout" is enabled, we don't care if the // player already saw the message diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortSettingsGUI.java b/src/main/java/de/jeff_media/ChestSort/ChestSortSettingsGUI.java similarity index 83% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortSettingsGUI.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortSettingsGUI.java index 2043b63..ba62775 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortSettingsGUI.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortSettingsGUI.java @@ -1,4 +1,4 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -13,9 +13,9 @@ import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -public class JeffChestSortSettingsGUI implements Listener { +public class ChestSortSettingsGUI implements Listener { - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; public static int slotMiddleClick = 1; public static int slotShiftClick = 3 ; @@ -31,7 +31,7 @@ public class JeffChestSortSettingsGUI implements Listener { MiddleClick, ShiftClick, DoubleClick, ShiftRightClick, LeftClick, RightClick; } - JeffChestSortSettingsGUI(JeffChestSortPlugin plugin) { + ChestSortSettingsGUI(ChestSortPlugin plugin) { this.plugin=plugin; } @@ -81,7 +81,7 @@ public class JeffChestSortSettingsGUI implements Listener { void openGUI(Player player) { Inventory inventory = createGUI("ChestSort", player); - JeffChestSortPlayerSetting setting = plugin.perPlayerSettings.get(player.getUniqueId().toString()); + ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(player.getUniqueId().toString()); inventory.setItem(slotMiddleClick, getItem(setting.middleClick,Hotkey.MiddleClick)); inventory.setItem(slotShiftClick, getItem(setting.shiftClick,Hotkey.ShiftClick)); @@ -109,7 +109,7 @@ public class JeffChestSortSettingsGUI implements Listener { } Player p = (Player) event.getWhoClicked(); plugin.listener.plugin.registerPlayerIfNeeded(p); - JeffChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); + ChestSortPlayerSetting setting = plugin.perPlayerSettings.get(p.getUniqueId().toString()); if(setting.guiInventory==null) { return; @@ -128,28 +128,28 @@ public class JeffChestSortSettingsGUI implements Listener { return; } - if(event.getSlot() == JeffChestSortSettingsGUI.slotMiddleClick) { + if(event.getSlot() == ChestSortSettingsGUI.slotMiddleClick) { setting.toggleMiddleClick(); plugin.settingsGUI.openGUI(p); return; } - else if(event.getSlot() == JeffChestSortSettingsGUI.slotShiftClick) { + else if(event.getSlot() == ChestSortSettingsGUI.slotShiftClick) { setting.toggleShiftClick(); plugin.settingsGUI.openGUI(p); return; - } else if(event.getSlot() == JeffChestSortSettingsGUI.slotDoubleClick) { + } else if(event.getSlot() == ChestSortSettingsGUI.slotDoubleClick) { setting.toggleDoubleClick(); plugin.settingsGUI.openGUI(p); return; - } else if(event.getSlot() == JeffChestSortSettingsGUI.slotShiftRightClick) { + } else if(event.getSlot() == ChestSortSettingsGUI.slotShiftRightClick) { setting.toggleShiftRightClick(); plugin.settingsGUI.openGUI(p); return; - } else if(event.getSlot() == JeffChestSortSettingsGUI.slotLeftClick) { + } else if(event.getSlot() == ChestSortSettingsGUI.slotLeftClick) { setting.toggleLeftClick(); plugin.settingsGUI.openGUI(p); return; - } else if(event.getSlot() == JeffChestSortSettingsGUI.slotRightClick) { + } else if(event.getSlot() == ChestSortSettingsGUI.slotRightClick) { setting.toggleRightClick(); plugin.settingsGUI.openGUI(p); return; diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortTabCompleter.java b/src/main/java/de/jeff_media/ChestSort/ChestSortTabCompleter.java similarity index 91% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortTabCompleter.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortTabCompleter.java index 20c69b6..30f103f 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortTabCompleter.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortTabCompleter.java @@ -1,4 +1,4 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import java.util.ArrayList; import java.util.List; @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; -public class JeffChestSortTabCompleter implements TabCompleter { +public class ChestSortTabCompleter implements TabCompleter { static final String[] chestsortOptions = { "toggle","on","off","hotkeys" }; static final String[] invsortOptions = { "toggle","on","off","all", "hotbar", "inv" }; diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortUpdateChecker.java b/src/main/java/de/jeff_media/ChestSort/ChestSortUpdateChecker.java similarity index 96% rename from src/main/java/de/jeffclan/JeffChestSort/JeffChestSortUpdateChecker.java rename to src/main/java/de/jeff_media/ChestSort/ChestSortUpdateChecker.java index 3c3b45c..63e97c9 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortUpdateChecker.java +++ b/src/main/java/de/jeff_media/ChestSort/ChestSortUpdateChecker.java @@ -1,4 +1,4 @@ -package de.jeffclan.JeffChestSort; +package de.jeff_media.ChestSort; import java.io.BufferedReader; import java.io.InputStreamReader; @@ -14,7 +14,7 @@ import net.md_5.bungee.api.chat.ComponentBuilder; import net.md_5.bungee.api.chat.HoverEvent; import net.md_5.bungee.api.chat.TextComponent; -public class JeffChestSortUpdateChecker { +public class ChestSortUpdateChecker { // This checks for updates. A txt file is downloaded. If the txt file contains a // string that is unequal to the currently used plugin's version, a message is @@ -24,9 +24,9 @@ public class JeffChestSortUpdateChecker { // Media GbR API server is offline, or if you have no internet connection, a // warning will be printed in the console. - private JeffChestSortPlugin plugin; + private ChestSortPlugin plugin; - JeffChestSortUpdateChecker(JeffChestSortPlugin plugin) { + ChestSortUpdateChecker(ChestSortPlugin plugin) { this.plugin = plugin; } diff --git a/src/main/java/de/jeffclan/hooks/CrackShotHook.java b/src/main/java/de/jeff_media/ChestSort/hooks/CrackShotHook.java similarity index 78% rename from src/main/java/de/jeffclan/hooks/CrackShotHook.java rename to src/main/java/de/jeff_media/ChestSort/hooks/CrackShotHook.java index 193ff79..4aff8bc 100644 --- a/src/main/java/de/jeffclan/hooks/CrackShotHook.java +++ b/src/main/java/de/jeff_media/ChestSort/hooks/CrackShotHook.java @@ -1,17 +1,17 @@ -package de.jeffclan.hooks; +package de.jeff_media.ChestSort.hooks; import org.bukkit.inventory.ItemStack; import com.shampaggon.crackshot.CSUtility; -import de.jeffclan.JeffChestSort.JeffChestSortPlugin; +import de.jeff_media.ChestSort.ChestSortPlugin; public class CrackShotHook { - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; CSUtility crackShotUtility = null; - public CrackShotHook(JeffChestSortPlugin plugin) { + public CrackShotHook(ChestSortPlugin plugin) { this.plugin=plugin; if(plugin.hookCrackShot) { diff --git a/src/main/java/de/jeffclan/hooks/CustomItemsHook.java b/src/main/java/de/jeff_media/ChestSort/hooks/CustomItemsHook.java similarity index 79% rename from src/main/java/de/jeffclan/hooks/CustomItemsHook.java rename to src/main/java/de/jeff_media/ChestSort/hooks/CustomItemsHook.java index a7023bc..b2265d5 100644 --- a/src/main/java/de/jeffclan/hooks/CustomItemsHook.java +++ b/src/main/java/de/jeff_media/ChestSort/hooks/CustomItemsHook.java @@ -1,4 +1,4 @@ -package de.jeffclan.hooks; +package de.jeff_media.ChestSort.hooks; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/de/jeffclan/hooks/InventoryPagesHook.java b/src/main/java/de/jeff_media/ChestSort/hooks/InventoryPagesHook.java similarity index 94% rename from src/main/java/de/jeffclan/hooks/InventoryPagesHook.java rename to src/main/java/de/jeff_media/ChestSort/hooks/InventoryPagesHook.java index dfaba0f..ae9e41e 100644 --- a/src/main/java/de/jeffclan/hooks/InventoryPagesHook.java +++ b/src/main/java/de/jeff_media/ChestSort/hooks/InventoryPagesHook.java @@ -1,4 +1,4 @@ -package de.jeffclan.hooks; +package de.jeff_media.ChestSort.hooks; import java.io.File; @@ -8,19 +8,19 @@ import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; -import de.jeffclan.JeffChestSort.JeffChestSortPlugin; +import de.jeff_media.ChestSort.ChestSortPlugin; import net.md_5.bungee.api.ChatColor; public class InventoryPagesHook { - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; YamlConfiguration inventoryPagesConfig; int prevSlot, nextSlot; Material prevMat, nextMat, noPageMat; String prevName, nextName, noPageName; - public InventoryPagesHook(JeffChestSortPlugin plugin) { + public InventoryPagesHook(ChestSortPlugin plugin) { this.plugin = plugin; if(!plugin.hookInventoryPages) { diff --git a/src/main/java/de/jeffclan/hooks/MinepacksHook.java b/src/main/java/de/jeff_media/ChestSort/hooks/MinepacksHook.java similarity index 86% rename from src/main/java/de/jeffclan/hooks/MinepacksHook.java rename to src/main/java/de/jeff_media/ChestSort/hooks/MinepacksHook.java index 53878fd..743a483 100644 --- a/src/main/java/de/jeffclan/hooks/MinepacksHook.java +++ b/src/main/java/de/jeff_media/ChestSort/hooks/MinepacksHook.java @@ -1,4 +1,4 @@ -package de.jeffclan.hooks; +package de.jeff_media.ChestSort.hooks; import org.bukkit.Bukkit; import org.bukkit.inventory.Inventory; @@ -7,14 +7,14 @@ import org.bukkit.plugin.Plugin; import at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack; import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin; -import de.jeffclan.JeffChestSort.JeffChestSortPlugin; +import de.jeff_media.ChestSort.ChestSortPlugin; public class MinepacksHook { - JeffChestSortPlugin plugin; + ChestSortPlugin plugin; MinepacksPlugin minepacks = null; - public MinepacksHook(JeffChestSortPlugin plugin) { + public MinepacksHook(ChestSortPlugin plugin) { this.plugin = plugin; Plugin bukkitPlugin = Bukkit.getPluginManager().getPlugin("Minepacks"); if(plugin.hookMinepacks && bukkitPlugin instanceof MinepacksPlugin) { diff --git a/src/main/java/de/jeffclan/utils/CategoryLinePair.java b/src/main/java/de/jeff_media/ChestSort/utils/CategoryLinePair.java similarity index 95% rename from src/main/java/de/jeffclan/utils/CategoryLinePair.java rename to src/main/java/de/jeff_media/ChestSort/utils/CategoryLinePair.java index f81129d..0c47365 100644 --- a/src/main/java/de/jeffclan/utils/CategoryLinePair.java +++ b/src/main/java/de/jeff_media/ChestSort/utils/CategoryLinePair.java @@ -1,4 +1,4 @@ -package de.jeffclan.utils; +package de.jeff_media.ChestSort.utils; public class CategoryLinePair { diff --git a/src/main/java/de/jeffclan/utils/TypeMatchPositionPair.java b/src/main/java/de/jeff_media/ChestSort/utils/TypeMatchPositionPair.java similarity index 95% rename from src/main/java/de/jeffclan/utils/TypeMatchPositionPair.java rename to src/main/java/de/jeff_media/ChestSort/utils/TypeMatchPositionPair.java index 8487782..2c613a6 100644 --- a/src/main/java/de/jeffclan/utils/TypeMatchPositionPair.java +++ b/src/main/java/de/jeff_media/ChestSort/utils/TypeMatchPositionPair.java @@ -1,4 +1,4 @@ -package de.jeffclan.utils; +package de.jeff_media.ChestSort.utils; public class TypeMatchPositionPair { diff --git a/src/main/java/de/jeffclan/utils/Utils.java b/src/main/java/de/jeff_media/ChestSort/utils/Utils.java similarity index 86% rename from src/main/java/de/jeffclan/utils/Utils.java rename to src/main/java/de/jeff_media/ChestSort/utils/Utils.java index 23e338c..105d2c9 100644 --- a/src/main/java/de/jeffclan/utils/Utils.java +++ b/src/main/java/de/jeff_media/ChestSort/utils/Utils.java @@ -1,4 +1,4 @@ -package de.jeffclan.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.jeffclan.JeffChestSort.JeffChestSortPlugin; +import de.jeff_media.ChestSort.ChestSortPlugin; public class Utils { @@ -36,7 +36,7 @@ public class Utils { return String.format("%05d", number); } - public static void renameFileInPluginDir(JeffChestSortPlugin plugin,String oldName, String newName) { + public static void renameFileInPluginDir(ChestSortPlugin plugin,String oldName, String newName) { File oldFile = new File(plugin.getDataFolder().getAbsolutePath() + File.separator + oldName); File newFile = new File(plugin.getDataFolder().getAbsolutePath() + File.separator + newName); oldFile.getAbsoluteFile().renameTo(newFile.getAbsoluteFile()); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 86b1d2e..aed71bf 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,4 +1,4 @@ -main: de.jeffclan.JeffChestSort.JeffChestSortPlugin +main: de.jeff_media.ChestSort.ChestSortPlugin name: ChestSort version: 8.7 api-version: 1.13