mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-31 09:33:43 +01:00 
			
		
		
		
	feat: add placeholder for plot size
- PlaceholderRegistry and for /plot list entries - fixes #4149
This commit is contained in:
		| @@ -517,6 +517,7 @@ public class ListCmd extends SubCommand { | ||||
|                     } | ||||
|                 } | ||||
|                 finalResolver.tag("players", Tag.inserting(builder.asComponent())); | ||||
|                 finalResolver.tag("size", Tag.inserting(Component.text(plot.getConnectedPlots().size()))); | ||||
|                 caption.set(TranslatableCaption.of("info.plot_list_item")); | ||||
|                 caption.setTagResolvers(finalResolver.build()); | ||||
|             } | ||||
|   | ||||
| @@ -187,6 +187,7 @@ public final class PlaceholderRegistry { | ||||
|             } | ||||
|         }); | ||||
|         this.createPlaceholder("currentplot_biome", (player, plot) -> plot.getBiomeSynchronous().toString()); | ||||
|         this.createPlaceholder("currentplot_size", (player, plot) -> String.valueOf(plot.getConnectedPlots().size())); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 dordsor21
					dordsor21