This commit is contained in:
mfnalex 2022-10-01 13:03:38 +02:00
parent 48cd7f170b
commit 3afb5e49f8
6 changed files with 29 additions and 22 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## 13.4.0
- Hoppers can now be sorted using hotkeys (not via automatic sorting, as this would break hopper sorting machines)
- Added Hebrew translation
## 13.2.1
- Fixed exceptions when using the latest version of AdvancedChests

View File

@ -9,7 +9,7 @@
<name>ChestSort</name>
<url>https://www.chestsort.de</url>
<description>Allows automatic chest sorting!</description>
<version>13.3.0</version>
<version>13.4.0</version>
<packaging>jar</packaging>
<properties>

View File

@ -54,6 +54,7 @@ public enum Hotkey {
public static Hotkey fromPermission(String permission) {
//System.out.println("Checking permission " + permission + " and returning the proper hotkey...");
if(permission == null) return null;
switch(permission) {
case "shiftclick": return SHIFT_CLICK;
case "middleclick": return MIDDLE_CLICK;

View File

@ -30,6 +30,7 @@ public class NewUI {
if(conf.isString("slots." + slot)) {
String buttonName = conf.getString("slots." + slot);
//if(!player.hasPermission("chestsort.hotkey." + buttonName)) {
Hotkey key = Hotkey.fromPermission(buttonName);
if(!Hotkey.fromPermission(buttonName).hasPermission(player)) {
buttonName = buttonName + "-nopermission";
} else {

View File

@ -569,6 +569,7 @@ public class ChestSortListener implements org.bukkit.event.Listener {
if (isAPICall
|| belongsToChestLikeBlock(event.getClickedInventory())
|| (event.getClickedInventory() != null && event.getClickedInventory().getType() == InventoryType.HOPPER)
|| plugin.getOrganizer().isMarkedAsSortable(event.getClickedInventory())
|| LlamaUtils.belongsToLlama(event.getClickedInventory())
|| minepacksHook.isMinepacksBackpack(event.getClickedInventory())

View File

@ -553,6 +553,27 @@ message-gui-left-click-outside: "Left-Click from outside"
#message-gui-right-click: "Kiste leeren (Rechtsklick/doppelter Rechtsklick)"
#message-gui-left-click-outside: "Linksklick von außen"
##### Hebrew / עברית
#message-when-using-chest: "&7רמז: &fהקלידו &e/chestsort&f בשביל להפעיל מיון תיבות."
#message-when-using-chest2: "&7רמז: &fהקלידו &e/chestsort&7 בשביל לכבות מיון תיבות."
#message-sorting-disabled: "&fמיון תיבות &cלא פועל&f."
#message-sorting-enabled: "&fמיון תיבות &aפועל&f."
#message-inv-sorting-disabled: "&fמיון אינבנטורי &cלא פועל&f."
#message-inv-sorting-enabled: "&fמיון אינבנטורי &aפועל&f."
#message-player-inventory-sorted: "&fהאינבנטורי שלך סודר."
#message-error-players-only: "&c&lשגיאה: הפקודה הזאת היא לשימוש השחקנים בלבד."
#message-error-invalid-options: "&c&lשגיאה: Unknown option %s. Valid options are %s."
#message-container-sorted: "&a&lסודר מחדש!"
#message-gui-enabled: "&aפועל&f"
#message-gui-disabled: "&cלא פועל"
#message-gui-middle-click: "לחיצה בעמצא(עכבר)"
#message-gui-shift-click: "Shift + קליד"
#message-gui-double-click: "לחיצה כפולה"
#message-gui-shift-right-click: "Shift + לחיצה ימנית"
#message-gui-left-click: "למלא תיבה (לחיצה שמאלית/לחיצה שמאלית כפולה)"
#message-gui-right-click: "לרוקן תיבה (לחיצה ימנית/לחיצה ימנית כפולה)"
#message-gui-left-click-outside: "לחיצה שמאלית מבחוץ"
##### Hungarian
#message-when-using-chest: "&7Automatikus láda rendezés bekapcsolás: &6/chestsort"
#message-when-using-chest2: "&7Automatikus láda rendezés bekapcsolás: &6/chestsort"
@ -786,27 +807,6 @@ message-gui-left-click-outside: "Left-Click from outside"
#message-gui-right-click: "Empty Chest (Chuột phải/nhấn đúp chuột phải)"
#message-gui-left-click-outside: "Nhấn chuột trái bên ngoài"
##### Hebrew / עברית
#message-when-using-chest: "&7רמז: &fהקלידו &e/chestsort&f בשביל להפעיל מיון תיבות."
#message-when-using-chest2: "&7רמז: &fהקלידו &e/chestsort&7 בשביל לכבות מיון תיבות."
#message-sorting-disabled: "&fמיון תיבות &cלא פועל&f."
#message-sorting-enabled: "&fמיון תיבות &aפועל&f."
#message-inv-sorting-disabled: "&fמיון אינבנטורי &cלא פועל&f."
#message-inv-sorting-enabled: "&fמיון אינבנטורי &aפועל&f."
#message-player-inventory-sorted: "&fהאינבנטורי שלך סודר."
#message-error-players-only: "&c&lשגיאה: הפקודה הזאת היא לשימוש השחקנים בלבד."
#message-error-invalid-options: "&c&lשגיאה: Unknown option %s. Valid options are %s."
#message-container-sorted: "&a&lסודר מחדש!"
#message-gui-enabled: "&aפועל&f"
#message-gui-disabled: "&cלא פועל"
#message-gui-middle-click: "לחיצה בעמצא(עכבר)"
#message-gui-shift-click: "Shift + קליד"
#message-gui-double-click: "לחיצה כפולה"
#message-gui-shift-right-click: "Shift + לחיצה ימנית"
#message-gui-left-click: "למלא תיבה (לחיצה שמאלית/לחיצה שמאלית כפולה)"
#message-gui-right-click: "לרוקן תיבה (לחיצה ימנית/לחיצה ימנית כפולה)"
#message-gui-left-click-outside: "לחיצה שמאלית מבחוץ"
############################
##### Technical stuff! #####
############################