@@ -77,30 +77,30 @@ private static void sendWildernessHUD(Player p, TownyWorld world, Translator tra
7777 Component mobspawn = getTranslatedOnOrOff (world .hasWildernessMobs (), translator );
7878
7979 LinkedList <Component > sbComponents = new LinkedList <>();
80- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("unclaimed_zone_name" )));
80+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("unclaimed_zone_name" )));
8181 sbComponents .add (Component .empty ());
82- sbComponents .add (TownyComponents . miniMessage (YELLOW + UNDERLINED + translator .of ("msg_perm_hud_title" ) + RESET ));
82+ sbComponents .add (miniMessage (YELLOW + UNDERLINED + translator .of ("msg_perm_hud_title" ) + RESET ));
8383
84- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_build" ) + " " ).append (build ));
85- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_destroy" ) + " " ).append (destroy ));
86- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_switch" ) + " " ).append (switching ));
87- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_item_use" ) + " " ).append (item ));
84+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_build" ) + " " ).append (build ));
85+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_destroy" ) + " " ).append (destroy ));
86+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_switch" ) + " " ).append (switching ));
87+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_item_use" ) + " " ).append (item ));
8888
89- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_pvp" ) + " " ).append (pvp ));
90- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_explosions" ) + " " ).append (explosions ));
91- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_firespread" ) + " " ).append (firespread ));
92- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_mobspawns" ) + " " ).append (mobspawn ));
89+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_pvp" ) + " " ).append (pvp ));
90+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_explosions" ) + " " ).append (explosions ));
91+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_firespread" ) + " " ).append (firespread ));
92+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_mobspawns" ) + " " ).append (mobspawn ));
9393
9494 UUID uuid = p .getUniqueId ();
95- hud .setTitle (uuid , TownyComponents . miniMessage (HUDManager .check (getFormattedWildernessName (p .getWorld ()))));
95+ hud .setTitle (uuid , miniMessage (HUDManager .check (getFormattedWildernessName (p .getWorld ()))));
9696 hud .setLines (uuid , sbComponents );
9797 }
9898
9999 public static void sendTownHUD (Player p , WorldCoord worldCoord , Translator translator , ServerHUD hud ) {
100100
101101 TownBlock townBlock = worldCoord .getTownBlockOrNull ();
102102 TownBlockOwner owner = townBlock .getTownBlockOwner ();
103- String type = townBlock .getType ().equals (TownBlockType .RESIDENTIAL ) ? " " : townBlock .getType ().getName ();
103+ String type = WHITE + ( townBlock .getType ().equals (TownBlockType .RESIDENTIAL ) ? " " : townBlock .getType ().getName () );
104104 Component forSale = getPlotPrice (translator , townBlock , townBlock .hasPlotObjectGroup ());
105105 TownyPermission tp = townBlock .getPermissions ();
106106 boolean residentOwned = owner instanceof Resident ;
@@ -115,30 +115,30 @@ public static void sendTownHUD(Player p, WorldCoord worldCoord, Translator trans
115115 Component mobspawn = getTranslatedOnOrOff (world .isForceTownMobs () || tp .mobs || townBlock .getTownOrNull ().isAdminEnabledMobs (), translator );
116116
117117 LinkedList <Component > sbComponents = new LinkedList <>();
118- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_plot_type" ) + type ));
119- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_plot_for_sale" )).append (forSale ));
120- sbComponents .add (TownyComponents . miniMessage (YELLOW + UNDERLINED + translator .of ("msg_perm_hud_title" ) + RESET ));
121-
122- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_build" )).append (build ));
123- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_destroy" )).append (destroy ));
124- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_switch" )).append (switching ));
125- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_item_use" )).append (item ));
126-
127- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_pvp" ) + " " ).append (pvp ));
128- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_explosions" ) + " " ).append (explosions ));
129- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_firespread" ) + " " ).append (firespread ));
130- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_mobspawns" ) + " " ).append (mobspawn ));
131-
132- sbComponents .add (TownyComponents . miniMessage (YELLOW + UNDERLINED + translator .of ("msg_perm_hud_key" )));
133- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + BOLD + "f " + RESET + WHITE + " - " + GRAY + translator .of ("msg_perm_hud_friend" ) + " "
118+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_plot_type" ) + type ));
119+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_plot_for_sale" )).append (forSale ));
120+ sbComponents .add (miniMessage (YELLOW + UNDERLINED + translator .of ("msg_perm_hud_title" ) + RESET ));
121+
122+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_build" )).append (build ));
123+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_destroy" )).append (destroy ));
124+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_switch" )).append (switching ));
125+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_item_use" )).append (item ));
126+
127+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_pvp" ) + " " ).append (pvp ));
128+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_explosions" ) + " " ).append (explosions ));
129+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_firespread" ) + " " ).append (firespread ));
130+ sbComponents .add (miniMessage (DARK_GREEN + translator .of ("msg_perm_hud_mobspawns" ) + " " ).append (mobspawn ));
131+
132+ sbComponents .add (miniMessage (YELLOW + UNDERLINED + translator .of ("msg_perm_hud_key" )));
133+ sbComponents .add (miniMessage (DARK_GREEN + BOLD + "f " + RESET + WHITE + " - " + GRAY + translator .of ("msg_perm_hud_friend" ) + " "
134134 +DARK_GREEN + BOLD + "r " + RESET + WHITE + " - " + GRAY + translator .of ("msg_perm_hud_resident" )));
135- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + BOLD + "t " + RESET + WHITE + " - " + GRAY + translator .of ("msg_perm_hud_town" ) + " "
135+ sbComponents .add (miniMessage (DARK_GREEN + BOLD + "t " + RESET + WHITE + " - " + GRAY + translator .of ("msg_perm_hud_town" ) + " "
136136 +DARK_GREEN + BOLD + "n " + RESET + WHITE + " - " + GRAY + translator .of ("msg_perm_hud_nation" )));
137- sbComponents .add (TownyComponents . miniMessage (DARK_GREEN + BOLD + "a " + RESET + WHITE + " - " + GRAY + translator .of ("msg_perm_hud_ally" ) + " "
137+ sbComponents .add (miniMessage (DARK_GREEN + BOLD + "a " + RESET + WHITE + " - " + GRAY + translator .of ("msg_perm_hud_ally" ) + " "
138138 +DARK_GREEN + BOLD + "o " + RESET + WHITE + " - " + GRAY + translator .of ("msg_perm_hud_outsider" )));
139139
140140 UUID uuid = p .getUniqueId ();
141- hud .setTitle (uuid , TownyComponents . miniMessage (GOLD + owner .getName () + (townBlock .hasResident () ? " (" + townBlock .getTownOrNull ().getName () + ")" : "" )));
141+ hud .setTitle (uuid , miniMessage (GOLD + owner .getName () + (townBlock .hasResident () ? " (" + townBlock .getTownOrNull ().getName () + ")" : "" )));
142142 hud .setLines (uuid , sbComponents );
143143 }
144144
@@ -153,18 +153,18 @@ private static Component getPlotPrice(Translator translator, TownBlock townBlock
153153 forSale = (plotGroup && townBlock .getPlotObjectGroup ().getPrice () > -1 ) || (!plotGroup && townBlock .isForSale ())
154154 ? translator .of ("msg_perm_hud_yes" ) : forSale ;
155155 }
156- return TownyComponents . miniMessage (GRAY + forSale );
156+ return miniMessage (WHITE + forSale );
157157 }
158158
159159 private static Component getPermLine (TownyPermission tp , ActionType actionType , boolean residentOwned ) {
160160 String v = residentOwned ? "f" : "r" ;
161161 String u = residentOwned ? "t" : "n" ;
162- return TownyComponents . miniMessage (GRAY + (tp .getResidentPerm (actionType ) ? v : "-" ) + (tp .getNationPerm (actionType ) ? u : "-" ) +
162+ return miniMessage (WHITE + (tp .getResidentPerm (actionType ) ? v : "-" ) + (tp .getNationPerm (actionType ) ? u : "-" ) +
163163 (tp .getAllyPerm (actionType ) ? "a" : "-" ) + (tp .getOutsiderPerm (actionType ) ? "o" : "-" ));
164164 }
165165
166166 private static Component getTranslatedOnOrOff (boolean test , Translator translator ) {
167- return TownyComponents . miniMessage (test ? translator .of ("status_on" ) : translator .of ("status_off" ));
167+ return miniMessage (test ? translator .of ("status_on" ) : translator .of ("status_off" ));
168168 }
169169
170170 private static String getFormattedWildernessName (World w ) {
@@ -177,6 +177,10 @@ private static String getFormattedWildernessName(World w) {
177177 return wildernessName .toString ();
178178 }
179179
180+ private static Component miniMessage (String string ) {
181+ return TownyComponents .miniMessage (string );
182+ }
183+
180184 private static String prettyMoney (double price ) {
181185 return TownyEconomyHandler .getFormattedBalance (price );
182186 }
0 commit comments