Skip to content

Commit df3d877

Browse files
committed
feat: add sell and experience collection buttons to GUI localization
1 parent 4bff939 commit df3d877

7 files changed

Lines changed: 23 additions & 16 deletions

File tree

core/src/main/java/github/nighter/smartspawner/spawner/gui/main/SpawnerMenuFormUI.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ public class SpawnerMenuFormUI {
2525
static {
2626
ACTION_BUTTON_CONFIG.put("open_storage", new ActionButtonInfo(
2727
"bedrock.main_gui.button_names.storage",
28-
"https://minecraft.wiki/images/thumb/Chest.gif/150px-Chest.gif"
28+
"https://i.pinimg.com/736x/7a/28/50/7a28504d8446ab0ad670757cfa32fe59.jpg"
2929
));
3030

3131
ACTION_BUTTON_CONFIG.put("open_stacker", new ActionButtonInfo(
3232
"bedrock.main_gui.button_names.stacker",
33-
"https://minecraft.wiki/images/thumb/Spawner_with_fire.png/150px-Spawner_with_fire.png"
33+
"https://cdn.modrinth.com/data/9tQwxSFr/f0f1cc267f587a39acd2c820cfe6b29d0f2ccae3.png"
3434
));
3535

3636
ACTION_BUTTON_CONFIG.put("sell_and_exp", new ActionButtonInfo(
3737
"bedrock.main_gui.button_names.sell_and_exp",
38-
"https://img.icons8.com/?size=100&id=12815&format=png&color=FFD700"
38+
"https://static.wikia.nocookie.net/minecraft_gamepedia/images/8/8a/Gold_Ingot_JE4_BE2.png/revision/latest?cb=20200224211607"
3939
));
4040

4141
ACTION_BUTTON_CONFIG.put("sell_all", new ActionButtonInfo(
4242
"bedrock.main_gui.button_names.sell_all",
43-
"https://img.icons8.com/?size=100&id=12815&format=png&color=FFA500"
43+
"https://static.wikia.nocookie.net/minecraft_gamepedia/images/8/8a/Gold_Ingot_JE4_BE2.png/revision/latest?cb=20200224211607"
4444
));
4545

4646
ACTION_BUTTON_CONFIG.put("collect_exp", new ActionButtonInfo(

core/src/main/java/github/nighter/smartspawner/spawner/gui/main/SpawnerMenuUI.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ public ItemStack createSpawnerInfoItem(Player player, SpawnerData spawner) {
285285
// Get layout configuration first for cache key calculation
286286
GuiLayout layout = plugin.getGuiLayoutConfig().getCurrentMainLayout();
287287
GuiButton spawnerInfoButton = layout.getButton("spawner_info");
288-
String materialType = spawnerInfoButton != null ? spawnerInfoButton.getMaterial().toString() : "MOB_HEAD";
289288

290289
// Get important data upfront
291290
EntityType entityType = spawner.getEntityType();

core/src/main/java/github/nighter/smartspawner/spawner/interactions/click/SpawnerClickManager.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,13 @@ private void handleInactiveSpawnerInteraction(Player player, Block block, Spawne
215215

216216
private void openSpawnerMenu(Player player, SpawnerData spawner) {
217217
// Check if the player is a Bedrock player and use FormUI
218-
// if (isBedrockPlayer(player)) {
219-
// spawnerMenuFormUI.openSpawnerForm(player, spawner);
220-
// } else {
221-
// // Open the regular GUI menu for Java players
222-
// spawnerMenuUI.openSpawnerMenu(player, spawner, false);
223-
// }
224-
spawnerMenuUI.openSpawnerMenu(player, spawner, false);
218+
if (isBedrockPlayer(player)) {
219+
spawnerMenuFormUI.openSpawnerForm(player, spawner);
220+
} else {
221+
// Open the regular GUI menu for Java players
222+
spawnerMenuUI.openSpawnerMenu(player, spawner, false);
223+
}
224+
// spawnerMenuUI.openSpawnerMenu(player, spawner, false);
225225
}
226226

227227
private boolean isSpawnEgg(Material material) {

core/src/main/resources/language/DonutSMP/gui.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,4 +335,6 @@ bedrock:
335335
button_names:
336336
storage: Open Storage
337337
exp: Collect EXP
338-
stacker: Manage Stack
338+
stacker: Manage Stack
339+
sell_and_exp: Sell Items & Collect EXP
340+
sell: Sell Items

core/src/main/resources/language/de_DE/gui.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,4 +417,6 @@ bedrock:
417417
button_names:
418418
storage: Lager öffnen
419419
exp: EXP einsammeln
420-
stacker: Stack verwalten
420+
stacker: Stack verwalten
421+
sell_and_exp: Verkaufen & EXP einsammeln
422+
sell: Verkaufen

core/src/main/resources/language/en_US/gui.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,4 +417,6 @@ bedrock:
417417
button_names:
418418
storage: Open Storage
419419
exp: Collect EXP
420-
stacker: Manage Stack
420+
stacker: Manage Stack
421+
sell_and_exp: Sell Items & Collect EXP
422+
sell: Sell Items

core/src/main/resources/language/vi_VN/gui.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,5 +383,7 @@ bedrock:
383383

384384
button_names:
385385
storage: Mở Kho Spawner
386-
exp: Thu Thập Kinh Nghiệm
386+
exp: Nhận Kinh Nghiệm
387387
stacker: Stack Spawner
388+
sell_and_exp: Bán Vật Phẩm & Nhận Kinh Nghiệm
389+
sell: Bán Vật Phẩm

0 commit comments

Comments
 (0)