mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 13:15:28 +01:00
Add color translation for Panel and PanelItem names (#660)
This commit is contained in:
parent
60231d58ab
commit
18755f6377
@ -1,5 +1,6 @@
|
||||
package world.bentobox.bentobox.api.panels.builders;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import world.bentobox.bentobox.api.panels.Panel;
|
||||
@ -15,7 +16,7 @@ public class PanelBuilder {
|
||||
private PanelListener listener;
|
||||
|
||||
public PanelBuilder name(String name) {
|
||||
this.name = name;
|
||||
this.name = ChatColor.translateAlternateColorCodes('&', name);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@ -44,7 +45,7 @@ public class PanelItemBuilder {
|
||||
|
||||
|
||||
public PanelItemBuilder name(String name) {
|
||||
this.name = name;
|
||||
this.name = ChatColor.translateAlternateColorCodes('&', name);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user