SteamWar/BauSystem2.0
Archiviert
12
0

+Add InventoryFillerCommand #135

Zusammengeführt
YoyoNow hat 4 Commits von InventoryFillToggle nach master 2022-09-13 16:05:41 +02:00 zusammengeführt
3 geänderte Dateien mit 9 neuen und 1 gelöschten Zeilen
Nur Änderungen aus Commit 73f7fb2970 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -886,6 +886,8 @@ OTHER_ITEMS_KILLALL_NAME=§eKillAll
OTHER_ITEMS_KILLALL_LORE_1=§eWithout Shift§8:§7 only this region OTHER_ITEMS_KILLALL_LORE_1=§eWithout Shift§8:§7 only this region
OTHER_ITEMS_KILLALL_LORE_2=§eWith Shift§8:§7 global OTHER_ITEMS_KILLALL_LORE_2=§eWith Shift§8:§7 global
OTHER_ITEMS_INVENTORY_FILL_NAME=§eInventoryFill OTHER_ITEMS_INVENTORY_FILL_NAME=§eInventoryFill
OTHER_ITEMS_INVENTORY_FILL_LORE_1=§aActivated
OTHER_ITEMS_INVENTORY_FILL_LORE_2=§aDisabled
OTHER_SLOT_INVALID_SLOT=§cInvalid slot OTHER_SLOT_INVALID_SLOT=§cInvalid slot
OTHER_NOCLIP_SLOT_INFO=§7With /slot you can change the selected slot and take another block in the slot. OTHER_NOCLIP_SLOT_INFO=§7With /slot you can change the selected slot and take another block in the slot.
OTHER_NOCLIP_SLOT_HELP_PICK = §8/§eslot pick §8-§7 Take the faced block into your inventory. OTHER_NOCLIP_SLOT_HELP_PICK = §8/§eslot pick §8-§7 Take the faced block into your inventory.

Datei anzeigen

@ -866,6 +866,8 @@ OTHER_ITEMS_GAMEMODE_LORE_2=§eLinks-Click§8:§7 Umschalten zwischen Survival u
OTHER_ITEMS_KILLALL_NAME=§eKillAll OTHER_ITEMS_KILLALL_NAME=§eKillAll
OTHER_ITEMS_KILLALL_LORE_1=§eOhne Shift§8:§7 nur die Region OTHER_ITEMS_KILLALL_LORE_1=§eOhne Shift§8:§7 nur die Region
OTHER_ITEMS_KILLALL_LORE_2=§eMit Shift§8:§7 Global OTHER_ITEMS_KILLALL_LORE_2=§eMit Shift§8:§7 Global
OTHER_ITEMS_INVENTORY_FILL_LORE_1=§aAktiviert
OTHER_ITEMS_INVENTORY_FILL_LORE_2=§aDeaktiviert
OTHER_SLOT_INVALID_SLOT=§cInvalider Slot OTHER_SLOT_INVALID_SLOT=§cInvalider Slot
OTHER_NOCLIP_SLOT_INFO=§7Mit /slot kannst du den ausgewählten Slot ändern und einen anderen Block in den Slot nehmen. OTHER_NOCLIP_SLOT_INFO=§7Mit /slot kannst du den ausgewählten Slot ändern und einen anderen Block in den Slot nehmen.
OTHER_NOCLIP_SLOT_HELP_PICK = §8/§eslot pick §8-§7 Lege den angeguckten Block ins Inventar OTHER_NOCLIP_SLOT_HELP_PICK = §8/§eslot pick §8-§7 Lege den angeguckten Block ins Inventar

Datei anzeigen

@ -2,6 +2,7 @@ package de.steamwar.bausystem.features.util.items;
import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.configplayer.Config;
import de.steamwar.bausystem.features.inventoryfiller.InventoryFillerCommand; import de.steamwar.bausystem.features.inventoryfiller.InventoryFillerCommand;
import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.LinkageType;
import de.steamwar.bausystem.linkage.Linked; import de.steamwar.bausystem.linkage.Linked;
@ -13,6 +14,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import java.util.Collections;
@Linked(LinkageType.BAU_GUI_ITEM) @Linked(LinkageType.BAU_GUI_ITEM)
public class InventoryFillBauGuiItem extends BauGuiItem { public class InventoryFillBauGuiItem extends BauGuiItem {
public InventoryFillBauGuiItem() { public InventoryFillBauGuiItem() {
@ -29,7 +32,8 @@ public class InventoryFillBauGuiItem extends BauGuiItem {
@Override @Override
public ItemStack getItem(Player player) { public ItemStack getItem(Player player) {
return new SWItem(Material.BARREL, BauSystem.MESSAGE.parse("OTHER_ITEMS_INVENTORY_FILL_NAME", player), null, false, clickType -> {}).getItemStack(); String loreKey = Config.getInstance().get(player).getPlainValueOrDefault("inventoryfill", false) ? "OTHER_ITEMS_INVENTORY_FILL_LORE_1" : "OTHER_ITEMS_INVENTORY_FILL_LORE_2";
return new SWItem(Material.HOPPER, BauSystem.MESSAGE.parse("OTHER_ITEMS_INVENTORY_FILL_NAME", player), Collections.singletonList(BauSystem.MESSAGE.parse(loreKey, player)), false, clickType -> {}).getItemStack();
} }
@Override @Override