mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2025-12-28 11:19:24 +00:00
Allow hex colouring of discovered and undiscovered name colours, also allows insertion of resource pack images
This commit is contained in:
@@ -190,9 +190,9 @@ public class DiscoveryGUI extends RPGRegionsGUI {
|
||||
if ((!hasDiscovered && !player.hasPermission("rpgregions.show"))
|
||||
|| configuredRegion.isHidden()) continue;
|
||||
|
||||
ChatColor colour = hasDiscovered
|
||||
? ChatColor.valueOf(plugin.getConfig().getString("settings.server.discoveries.discovered.name-colour"))
|
||||
: ChatColor.valueOf(plugin.getConfig().getString("settings.server.discoveries.undiscovered.name-colour"));
|
||||
final String colour = hasDiscovered
|
||||
? plugin.getConfig().getString("settings.server.discoveries.discovered.name-colour")
|
||||
: plugin.getConfig().getString("settings.server.discoveries.undiscovered.name-colour");
|
||||
List<Component> lore = account.getDiscoveredRegions().containsKey(configuredRegion.getId())
|
||||
? Translations.DISCOVERED_ON.get(player,
|
||||
account.getDiscoveredRegions().get(configuredRegion.getId()).getDate())
|
||||
@@ -253,7 +253,7 @@ public class DiscoveryGUI extends RPGRegionsGUI {
|
||||
double teleportCost = configuredRegion.getTeleportCost(player);
|
||||
List<Component> ecoLore = getEcoOrNull() == null ? List.of() : Translations.TELEPORT_COST.get(player, teleportCost, getEcoOrNull().currencyNamePlural());
|
||||
items.add(new GuiItem(new ItemStackBuilder(item)
|
||||
.withName(colour + configuredRegion.getCustomName())
|
||||
.withName(plugin.miniMessage().deserialize(colour + configuredRegion.getCustomName()))
|
||||
.lore(lore)
|
||||
.lore(coordsLore)
|
||||
.lore(hint)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# This is the config for RPGRegions.
|
||||
# ------ Useful information ------
|
||||
# Documentation can be found at https://fortitude.islandearth.net
|
||||
# Documentation can be found at https://fortitude.islandearth.net/en/rpgregions-2
|
||||
# Sounds can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
|
||||
# Materials can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
|
||||
# ------ Support ------
|
||||
# Found a bug? Create an issue at https://gitlab.com/SamB440/rpgregions-2/issues
|
||||
# Need help? Join our discord at https://discord.gg/fh62mxU
|
||||
# Found a bug or need help? Join our discord at https://discord.gg/fh62mxU
|
||||
# Only paid users are entitled to support. Non-paid users can create issues at https://gitlab.com/SamB440/rpgregions-2/issues.
|
||||
# ------ Setting explanation ------
|
||||
# See wiki for more detailed information.
|
||||
# search-offline-players: Tab complete will list offline players where possible. This can cause lag with lots of offline players due to Bukkit loading all of their data.
|
||||
@@ -21,7 +21,6 @@ settings:
|
||||
dev:
|
||||
debug: false # Enables debug output. Will spam console!
|
||||
disable-slow-storage-warn: false # Should we send a warning if storage response times are slow?
|
||||
always: true
|
||||
integration:
|
||||
name: RPGRegions # Name of the integration: WorldGuard, Residence, GriefPrevention, GriefDefender, UltraRegions, Lands, RPGRegions
|
||||
external:
|
||||
@@ -44,7 +43,7 @@ settings:
|
||||
search-offline-players: true # Show offline players in tab completion results.
|
||||
discoveries:
|
||||
discovered:
|
||||
name-colour: GREEN # The colour of item titles in the discovery GUI
|
||||
name-colour: "#04DB64" # The colour of item titles in the discovery GUI
|
||||
title:
|
||||
fadein: 20
|
||||
stay: 60
|
||||
@@ -57,7 +56,7 @@ settings:
|
||||
name: UI_TOAST_CHALLENGE_COMPLETE
|
||||
pitch: 1
|
||||
undiscovered:
|
||||
name-colour: RED # The colour of undiscovered item titles in the discovery GUI
|
||||
name-colour: "#F43D3D" # The colour of undiscovered item titles in the discovery GUI
|
||||
date:
|
||||
format: dd-MM-yyyy HH:mm:ss # https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/SimpleDateFormat.html
|
||||
gui:
|
||||
|
||||
Reference in New Issue
Block a user