mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 12:46:46 +01:00
feat: add placeholder for plot size
- PlaceholderRegistry and for /plot list entries - fixes #4149
This commit is contained in:
parent
e138dc0267
commit
e5a4026a2a
@ -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()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user