@@ -230,7 +230,7 @@ private void updatePlots() {
230230 }
231231 final String [] trusted_list = new String [plot .getTrusted ().size ()];
232232 i = 0 ;
233- for (UUID trusted : plot .getTrusted ()) {
233+ for (final UUID trusted : plot .getTrusted ()) {
234234 trusted_list [i ] = MainUtil .getName (trusted );
235235 i ++;
236236 }
@@ -239,15 +239,26 @@ private void updatePlots() {
239239 trusted = StringUtils .join (trusted_list , "," );
240240 }
241241
242- String alias = plot .toString ();
243- String flags = "" ;
244- final Collection <Flag <?>> plotFlags =
242+ final String alias = plot .toString ();
243+ /*final Collection<Flag<?>> plotFlags =
245244 FlagManager.getPlotFlags(plot).keySet();
246245 if (plotFlags.size() > 0) {
247246 flags = StringUtils.join(plotFlags, ",");
247+ }*/
248+ final StringBuilder flagBuilder = new StringBuilder ();
249+ final Iterator <Map .Entry <Flag <?>, Object >> iterator =
250+ FlagManager .getPlotFlags (plot ).entrySet ().iterator ();
251+ while (iterator .hasNext ()) {
252+ final Map .Entry <Flag <?>, Object > entry = iterator .next ();
253+ flagBuilder .append (String .format ("%s = %s" , entry .getKey ().getName (),
254+ entry .getValue ().toString ()));
255+ if (iterator .hasNext ()) {
256+ flagBuilder .append (", " );
257+ }
248258 }
259+
249260 final PlotWrapper plotWrapper =
250- new PlotWrapper (owner , helpers , trusted , plot .getId (), alias , flags ,
261+ new PlotWrapper (owner , helpers , trusted , plot .getId (), alias , flagBuilder . toString () ,
251262 plot .getArea ());
252263 handlePlot (w , plotWrapper , newMap );
253264 }
0 commit comments