Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
cae96cd580
Commit
3a24d27ee4
@ -1132,6 +1132,8 @@ LAUFBAU_STATE_CREATING_OUTER_BLOCKS = Mantel bauen
|
|||||||
LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2}
|
LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2}
|
||||||
LAUFBAU_DONE = §aZuende gebaut
|
LAUFBAU_DONE = §aZuende gebaut
|
||||||
|
|
||||||
|
LAUFBAU_SETTING_GUI_NAME = §eLaufbau
|
||||||
|
|
||||||
LAUFBAU_BLOCK_GRASS_PATH = §eGrass Path
|
LAUFBAU_BLOCK_GRASS_PATH = §eGrass Path
|
||||||
LAUFBAU_BLOCK_SOUL_SAND = §eSoul Sand
|
LAUFBAU_BLOCK_SOUL_SAND = §eSoul Sand
|
||||||
LAUFBAU_BLOCK_COCOA = §eCocoa
|
LAUFBAU_BLOCK_COCOA = §eCocoa
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.slaves.laufbau;
|
package de.steamwar.bausystem.features.slaves.laufbau;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.inventory.SWListInv;
|
import de.steamwar.inventory.SWListInv;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -34,9 +35,9 @@ public class LaufbauSettings {
|
|||||||
List<SWListInv.SWListEntry<BlockBoundingBox>> list = new ArrayList<>();
|
List<SWListInv.SWListEntry<BlockBoundingBox>> list = new ArrayList<>();
|
||||||
for (BlockBoundingBox bb : BlockBoundingBox.elements) {
|
for (BlockBoundingBox bb : BlockBoundingBox.elements) {
|
||||||
if (bb.getSwItem() == null) continue;
|
if (bb.getSwItem() == null) continue;
|
||||||
list.add(new SWListInv.SWListEntry<>(bb.getSwItem(), bb));
|
list.add(new SWListInv.SWListEntry<>(LaufbauUtils.translateItem(bb.getSwItem(), p), bb));
|
||||||
}
|
}
|
||||||
SWListInv<BlockBoundingBox> inv = new SWListInv<>(p, "§6Laufbau", false, list, (clickType, blockBoundingBox) -> {
|
SWListInv<BlockBoundingBox> inv = new SWListInv<>(p, BauSystem.MESSAGE.parse("LAUFBAU_SETTING_GUI_NAME", p), false, list, (clickType, blockBoundingBox) -> {
|
||||||
});
|
});
|
||||||
inv.open();
|
inv.open();
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,9 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
@ -47,7 +49,11 @@ public class LaufbauUtils {
|
|||||||
|
|
||||||
public static SWItem translateItem(SWItem item, Player p) {
|
public static SWItem translateItem(SWItem item, Player p) {
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
ItemMeta itemMeta = item.getItemMeta();
|
||||||
return new SWItem(item.getItemStack().getType(), BauSystem.MESSAGE.parse(itemMeta.getDisplayName(), p), itemMeta.getLore().stream().map(l -> BauSystem.MESSAGE.parse(l, p)).collect(Collectors.toList()), false, clickType -> {
|
List<String> lore = new ArrayList<>();
|
||||||
|
if (itemMeta.getLore() != null) {
|
||||||
|
lore = itemMeta.getLore().stream().map(s -> BauSystem.MESSAGE.parse(s, p)).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return new SWItem(item.getItemStack().getType(), BauSystem.MESSAGE.parse(itemMeta.getDisplayName(), p), lore, false, clickType -> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren