Minimessage and HEX colour code previously missing for lore

This commit is contained in:
rockyhawk64 2025-04-20 16:37:11 +10:00
parent ae8cbe5d6f
commit 252daadf67
3 changed files with 3 additions and 11 deletions

View File

@ -163,7 +163,7 @@
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.3</version>
<version>2.11.6</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -1,11 +1,8 @@
package me.rockyhawk.commandpanels;
import me.rockyhawk.commandpanels.api.Panel;
import me.rockyhawk.commandpanels.commandtags.PaywallEvent;
import me.rockyhawk.commandpanels.commandtags.PaywallOutput;
import me.rockyhawk.commandpanels.interactives.input.PlayerInput;
import me.rockyhawk.commandpanels.openpanelsmanager.PanelPosition;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

View File

@ -75,8 +75,7 @@ public class CreateText {
for(String temp : setpapi){
try {
setpapi.set(tempInt,
plugin.hex.translateHexColorCodes(
ChatColor.translateAlternateColorCodes('&', temp)));
colour(temp));
}catch(NullPointerException ignore){}
tempInt += 1;
}
@ -111,11 +110,7 @@ public class CreateText {
public String placeholders(Panel panel, PanelPosition position, Player p, String setpapi) {
try {
setpapi = attachPlaceholders(panel,position, p,setpapi);
if(plugin.miniMessage != null){
setpapi = plugin.miniMessage.doMiniMessageLegacy(setpapi);
}
setpapi = ChatColor.translateAlternateColorCodes('&', setpapi);
setpapi = plugin.hex.translateHexColorCodes(setpapi);
setpapi = colour(setpapi);
return setpapi;
}catch(NullPointerException e){
return setpapi;