mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 12:25:46 +01:00
feat: add placeholder for plot size (#4181)
This commit is contained in:
parent
ee68bc3d9e
commit
26c55a318f
@ -517,6 +517,7 @@ public class ListCmd extends SubCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
finalResolver.tag("players", Tag.inserting(builder.asComponent()));
|
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.set(TranslatableCaption.of("info.plot_list_item"));
|
||||||
caption.setTagResolvers(finalResolver.build());
|
caption.setTagResolvers(finalResolver.build());
|
||||||
}
|
}
|
||||||
|
@ -187,6 +187,7 @@ public final class PlaceholderRegistry {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.createPlaceholder("currentplot_biome", (player, plot) -> plot.getBiomeSynchronous().toString());
|
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