diff --git a/Plugin/pom.xml b/Plugin/pom.xml
index 18dd15f..f17a6ca 100644
--- a/Plugin/pom.xml
+++ b/Plugin/pom.xml
@@ -7,7 +7,7 @@
de.Linus122.TimeIsMoney
parent
- 1.9.6.20
+ 1.9.6.22
../pom.xml
diff --git a/Plugin/src/main/java/de/Linus122/TimeIsMoney/ATM.java b/Plugin/src/main/java/de/Linus122/TimeIsMoney/ATM.java
index 68cc4b2..80f3a4d 100644
--- a/Plugin/src/main/java/de/Linus122/TimeIsMoney/ATM.java
+++ b/Plugin/src/main/java/de/Linus122/TimeIsMoney/ATM.java
@@ -43,6 +43,7 @@
import net.milkbowl.vault.economy.EconomyResponse;
import net.milkbowl.vault.economy.EconomyResponse.ResponseType;
import xyz.spaceio.spacegui.SpaceGUI;
+import xyz.spaceio.spacegui.helpers.StackBuilder;
import xyz.spaceio.spaceitem.DecorationMaterial;
import xyz.spaceio.spaceitem.SpaceItem;
@@ -87,7 +88,7 @@ public ATM(Main plugin) {
worths = Doubles.toArray(Main.finalconfig.getDoubleList("atm_worth_gradation"));
- gui = new SpaceGUI().title("§cATM").size(9*3).fillBackground(new SpaceItem().setStack(DecorationMaterial.BACKGROUND_GRAY));
+ gui = new SpaceGUI().title("§cATM").size(9*3).fillBackground(new SpaceItem().setStack(DecorationMaterial.GRAY_STAINED_GLASS_PANE.get()));
FileConfiguration fileConfig = new YamlConfiguration();
@@ -102,7 +103,8 @@ public ATM(Main plugin) {
}
// balance item
- SpaceItem balanceItem = gui.getOrCreateItem(new SpaceItem().setStack(Material.GOLD_NUGGET, 1, CC("&cBalance &a%s")).setLabel("balance"), 4 + 9)
+
+ SpaceItem balanceItem = gui.getOrCreateItem(new SpaceItem().setStack(new StackBuilder(Material.GOLD_NUGGET).setDisplayname(CC("&cBalance &a%s"))).setLabel("balance"), 4 + 9)
.setFormat((p) ->
Main.economy.format(ATM.getBankBalance(p))
);
@@ -110,8 +112,8 @@ public ATM(Main plugin) {
Material[] mats = new Material[] {Material.getMaterial("CLAY_BRICK") == null ? Material.getMaterial("BRICK") : Material.getMaterial("CLAY_BRICK"), Material.IRON_INGOT, Material.GOLD_INGOT, Material.DIAMOND};
for(int i = 0; i < 4; i++) {
final int index = i;
+ gui.getOrCreateItem(new SpaceItem().setStack(new StackBuilder(mats[i]).setDisplayname(CC("&cWithdraw &a%s"))).setLabel("witdraw-" + i), 3 - i + 9)
- gui.getOrCreateItem(new SpaceItem().setStack(mats[i], 1, CC("&cWithdraw &a%s")).setLabel("witdraw-" + i), 3 - i + 9)
.addAction((p, action) -> {
ATM.interactWithdraw(p, worths[index]);
action.getView().update(balanceItem);
@@ -120,8 +122,8 @@ public ATM(Main plugin) {
}
for(int i = 0; i < 4; i++) {
final int index = i;
-
- gui.getOrCreateItem(new SpaceItem().setStack(mats[i], 1, CC("&cDeposit &a%s")).setLabel("deposit-" + i), 5 + i + 9)
+ gui.getOrCreateItem(new SpaceItem().setStack(new StackBuilder(mats[i]).setDisplayname(CC("&cDeposit &a%s"))).setLabel("deposit-" + i), 5 + i + 9)
+
.addAction((p, action) -> {
ATM.interactDeposit(p, worths[index]);
action.getView().update(balanceItem);
diff --git a/Tools/pom.xml b/Tools/pom.xml
index dd2ab3b..89252bd 100644
--- a/Tools/pom.xml
+++ b/Tools/pom.xml
@@ -7,7 +7,7 @@
de.Linus122.TimeIsMoney
parent
- 1.9.6.20
+ 1.9.6.22
../pom.xml
diff --git a/pom.xml b/pom.xml
index 4ea7c3f..c9e298f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
de.Linus122.TimeIsMoney
parent
- 1.9.6.20
+ 1.9.6.22
TimeIsMoney
https://www.spigotmc.org/resources/time-is-money.12409/
pom