diff --git a/SpigotCore_Main/src/SpigotCore.properties b/SpigotCore_Main/src/SpigotCore.properties
index acb3749..498a2c6 100644
--- a/SpigotCore_Main/src/SpigotCore.properties
+++ b/SpigotCore_Main/src/SpigotCore.properties
@@ -17,6 +17,11 @@
# along with this program. If not, see .
#
+SWLISINV_NEXT_PAGE_ACTIVE = §eSeite vor
+SWLISINV_NEXT_PAGE_INACTIVE = §7Seite vor
+SWLISINV_PREVIOUS_PAGE_ACTIVE = §eSeite zurück
+SWLISINV_PREVIOUS_PAGE_INACTIVE = §7Seite zurück
+
SCHEM_SELECTOR_TITLE={0} auswählen: {1}
SCHEM_SELECTOR_BACK=§eZurück
SCHEM_SELECTOR_DIR=§9Ordner
diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SWListInv.java b/SpigotCore_Main/src/de/steamwar/inventory/SWListInv.java
index a9671ab..9116443 100644
--- a/SpigotCore_Main/src/de/steamwar/inventory/SWListInv.java
+++ b/SpigotCore_Main/src/de/steamwar/inventory/SWListInv.java
@@ -19,6 +19,7 @@
package de.steamwar.inventory;
+import de.steamwar.core.Core;
import de.steamwar.sql.SchematicNode;
import de.steamwar.sql.SchematicType;
import org.bukkit.Bukkit;
@@ -57,29 +58,33 @@ public class SWListInv extends SWInventory {
callbacks.clear();
setCallback(-999, (ClickType click) -> player.closeInventory());
- if(sizeBiggerMax()){
- if(page != 0)
- setItem(45, SWItem.getDye(10), (byte)10, "§eSeite zurück", (ClickType click) -> {
+ if (sizeBiggerMax()) {
+ if (page != 0) {
+ setItem(45, SWItem.getDye(10), (byte) 10, Core.MESSAGE.parse("SWLISINV_PREVIOUS_PAGE_ACTIVE", player), (ClickType click) -> {
page--;
open();
});
- else
- setItem(45, SWItem.getDye(8), (byte)8, "§7Seite zurück", (ClickType click) -> {});
- if(page < elements.size()/45)
- setItem(53, SWItem.getDye(10), (byte)10, "§eSeite vor", (ClickType click) -> {
+ } else {
+ setItem(45, SWItem.getDye(8), (byte) 8, Core.MESSAGE.parse("SWLISINV_PREVIOUS_PAGE_INACTIVE", player), (ClickType click) -> {
+ });
+ }
+ if (page < elements.size() / 45 - (elements.size() % 45 == 0 ? 1 : 0)) {
+ setItem(53, SWItem.getDye(10), (byte) 10, Core.MESSAGE.parse("SWLISINV_NEXT_PAGE_ACTIVE", player), (ClickType click) -> {
page++;
open();
});
- else
- setItem(53, SWItem.getDye(8), (byte)8, "§7Seite vor", (ClickType click) -> {});
+ } else {
+ setItem(53, SWItem.getDye(8), (byte) 8, Core.MESSAGE.parse("SWLISINV_NEXT_PAGE_INACTIVE", player), (ClickType click) -> {
+ });
+ }
}
- int ipageLimit = elements.size() - page*45;
- if(ipageLimit > 45 && sizeBiggerMax()){
+ int ipageLimit = elements.size() - page * 45;
+ if (ipageLimit > 45 && sizeBiggerMax()) {
ipageLimit = 45;
}
- int i = page*45;
- for(int ipage=0; ipage < ipageLimit; ipage++ ){
+ int i = page * 45;
+ for (int ipage = 0; ipage < ipageLimit; ipage++) {
SWItem e = elements.get(i).getItem();
final int pos = i;
@@ -88,8 +93,9 @@ public class SWListInv extends SWInventory {
i++;
}
- for(Map.Entry customItem : customItems.entrySet())
+ for (Map.Entry customItem : customItems.entrySet()) {
setItem(customItem.getKey(), customItem.getValue());
+ }
super.open();
}