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;
|
package world.bentobox.bentobox.api.panels.builders;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import world.bentobox.bentobox.api.panels.Panel;
|
import world.bentobox.bentobox.api.panels.Panel;
|
||||||
@ -15,7 +16,7 @@ public class PanelBuilder {
|
|||||||
private PanelListener listener;
|
private PanelListener listener;
|
||||||
|
|
||||||
public PanelBuilder name(String name) {
|
public PanelBuilder name(String name) {
|
||||||
this.name = name;
|
this.name = ChatColor.translateAlternateColorCodes('&', name);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import java.util.Arrays;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
@ -44,7 +45,7 @@ public class PanelItemBuilder {
|
|||||||
|
|
||||||
|
|
||||||
public PanelItemBuilder name(String name) {
|
public PanelItemBuilder name(String name) {
|
||||||
this.name = name;
|
this.name = ChatColor.translateAlternateColorCodes('&', name);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user