mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-06-22 21:04:52 +02:00
Translate alternate colors codes for BBundle descriptions
This commit is contained in:
parent
1ab7222ca0
commit
c2f2be61c3
|
@ -7,7 +7,9 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.World;
|
||||
|
@ -224,7 +226,7 @@ public class BlueprintManagementPanel {
|
|||
protected PanelItem getBundleIcon(BlueprintBundle bb) {
|
||||
return new PanelItemBuilder()
|
||||
.name(t("edit-description"))
|
||||
.description(bb.getDescription())
|
||||
.description(bb.getDescription().stream().map(l -> ChatColor.translateAlternateColorCodes('&', l)).collect(Collectors.toList()))
|
||||
.icon(bb.getIcon())
|
||||
.clickHandler((panel, u, clickType, slot) -> {
|
||||
u.closeInventory();
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Comparator;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
|
@ -47,7 +48,9 @@ public class IslandCreationPanel {
|
|||
|| !bb.isRequirePermission()
|
||||
|| user.hasPermission(perm)) {
|
||||
// Add an item
|
||||
PanelItem item = new PanelItemBuilder().name(bb.getDisplayName()).description(bb.getDescription())
|
||||
PanelItem item = new PanelItemBuilder()
|
||||
.name(bb.getDisplayName())
|
||||
.description(bb.getDescription().stream().map(l -> ChatColor.translateAlternateColorCodes('&', l)).collect(Collectors.toList()))
|
||||
.icon(bb.getIcon()).clickHandler((panel, user1, clickType, slot1) -> {
|
||||
user1.closeInventory();
|
||||
command.execute(user1, label, Collections.singletonList(bb.getUniqueId()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user