From 720c7e60d4fcbab730e912f22d6d1d2ab55e0fdf Mon Sep 17 00:00:00 2001 From: mfnalex <1122571+mfnalex@users.noreply.github.com> Date: Sat, 23 May 2020 19:33:54 +0200 Subject: [PATCH] Closes: #58 --- CHANGELOG.md | 2 +- .../JeffChestSort/JeffChestSortOrganizer.java | 7 ++-- src/main/resources/config.yml | 42 +++++++++---------- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c56dab..0a14f08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog ## 8.5 -- Updated French translation - Fixed InventoryPages support: when using &f at the beginning of button names, it was not detected by ChestSort as button +- Updated French, Chinese and Chinese (Traditional) translation ## 8.4 - Fixes InventoryPages support for the new hotkeys diff --git a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java b/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java index eb6d761..7fb1a20 100644 --- a/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java +++ b/src/main/java/de/jeffclan/JeffChestSort/JeffChestSortOrganizer.java @@ -398,13 +398,14 @@ public class JeffChestSortOrganizer { items[i] = null; } // Get rid of all stuff that contains more than maxStackSize - for(int i = 0; i inv.getItem(i).getMaxStackSize()) { //System.out.println("Debug: "+inv.getItem(i).getMaxStackSize()); //items[i] = null; //unsortableSlots.add(i); } - } + }*/ // If InventoryPages is installed: get rid of the buttons if(plugin.hookInventoryPages) { for(int i = startSlot; i<= endSlot; i++) { @@ -461,7 +462,7 @@ public class JeffChestSortOrganizer { // Create the temporary inventory with a null holder. 54 slots is enough for // every inventory - Inventory tempInventory = Bukkit.createInventory(null, 54); // cannot be bigger than 54 as of 1.14 + Inventory tempInventory = Bukkit.createInventory(null, maxInventorySize); // cannot be bigger than 54 as of 1.14 for (ItemStack item : nonNullItems) { if (plugin.debug) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index d1fade9..70458ce 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -255,28 +255,26 @@ message-gui-right-click: "Empty Chest (Right-Click)" #message-gui-left-click: "Fill Chest (Left-Click)" #message-gui-right-click: "Empty Chest (Right-Click)" -##### Chinese - Thanks to qsefthuopq and Aira-Sakuranomiya for translating! -##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC -#message-when-using-chest: "&7提示: 输入 &6/chestsort&7 来启用自动整理" -#message-when-using-chest2: "&7提示: 输入 &6/chestsort&7 来关闭自动整理" -#message-sorting-disabled: "&7自动整理已 &c关闭&7." -#message-sorting-enabled: "&7自动整理已 &a启用&7." -#message-inv-sorting-disabled: "&7Automatic inventory sorting has been &cdisabled&7." -#message-inv-sorting-enabled: "&7Automatic inventory sorting has been &aenabled&7." -#message-player-inventory-sorted: "&7已成功整理你的背包" -#message-error-players-only: "&c错误: 指令只能由玩家运行" -#message-error-invalid-options: "&c错误: 位置选项 %s. 有效选项为 %s" -#message-gui-enabled: "&a已启用" -#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: "Fill Chest (Left-Click)" -#message-gui-right-click: "Empty Chest (Right-Click)" +##### Chinese - Thanks to qsefthuopq, Aira-Sakuranomiya and BackWheel for translating! +#message-when-using-chest: "&7提示: 输入 &6/chestsort&7 来启用自动整理箱子." +#message-when-using-chest2: "&7提示: 输入 &6/chestsort&7 来关闭自动整理箱子." +#message-sorting-disabled: "&7自动整理箱子已 &c关闭&7." +#message-sorting-enabled: "&7自动整理箱子已 &a启用&7." +#message-inv-sorting-disabled: "&7自动整理背包已 &c关闭&7." +#message-inv-sorting-enabled: "&7自动整理背包已 &a开启&7." +#message-player-inventory-sorted: "&7已成功整理你的背包." +#message-error-players-only: "&c错误: 指令只能由玩家运行." +#message-error-invalid-options: "&c错误: 位置选项 %s. 有效选项为 %s." +#message-gui-enabled: "&a开启" +#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: "清空箱子 (右键)" ##### Chinese (Traditional) 繁體中文 - Thanks to Command1264 for translating! -##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC #message-when-using-chest: "&7小提醒: 輸入 &6/chestsort&7 來開啟自動整理箱子" #message-when-using-chest2: "&7小提醒: 輸入 &6/chestsort&7 來關閉自動整理箱子" #message-sorting-disabled: "&7自動整理箱子已 &c關閉&7" @@ -292,8 +290,8 @@ message-gui-right-click: "Empty Chest (Right-Click)" #message-gui-shift-click: "Shift + 左鍵" #message-gui-double-click: "雙擊左鍵" #message-gui-shift-right-click: "Shift + 右鍵" -#message-gui-left-click: "Fill Chest (Left-Click)" -#message-gui-right-click: "Empty Chest (Right-Click)" +#message-gui-left-click: "填滿箱子 (左鍵)" +#message-gui-right-click: "清空箱子 (右鍵)" ##### Dutch - Thanks to Xeyame for translating! ##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC