Compare commits

..

1 Commits

Author SHA1 Message Date
e5a4026a2a feat: add placeholder for plot size
- PlaceholderRegistry and for /plot list entries
 - fixes #4149
2023-09-30 16:39:01 +01:00
3 changed files with 3 additions and 1 deletions

View File

@ -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());
}

View File

@ -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()));
}
/**

View File

@ -14,7 +14,7 @@ log4j = "2.19.0"
# Plugins
worldedit = "7.2.15"
fawe = "2.7.1"
placeholderapi = "2.11.4"
placeholderapi = "2.11.3"
luckperms = "5.4"
essentialsx = "2.20.1"
mvdwapi = "3.1.1"