Advertisement
Guest User

Untitled

a guest
Jan 10th, 2022
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. public class PlayerStatsMenu {
  2. private final ExodusPlayerStats plugin;
  3. public PlayerStatsMenu(final ExodusPlayerStats plugin) {
  4. this.plugin = plugin;
  5. }
  6. public Inventory statsMenu(Player player) {
  7. PlaceholderReplacer loreReplacer = new PlaceholderReplacer();
  8. loreReplacer.addPlaceholder("%player_kills%", Integer.toString(plugin.statManager.getStat(player, Statistic.PLAYER_KILLS)));
  9. loreReplacer.addPlaceholder("%deaths%", Integer.toString(plugin.statManager.getStat(player, Statistic.DEATHS)));
  10. loreReplacer.addPlaceholder("%mob_kills%", Integer.toString(plugin.statManager.getStat(player, Statistic.MOB_KILLS)));
  11. loreReplacer.addPlaceholder("%blocks_broken%", "0");
  12. loreReplacer.addPlaceholder("%sugarcane_mined%","0");
  13. loreReplacer.addPlaceholder("%cactus_mined%", Integer.toString(plugin.statManager.getBlockStat(player, Material.CACTUS, Statistic.MINE_BLOCK)));
  14. loreReplacer.addPlaceholder("%damage_dealt%", Integer.toString(plugin.statManager.getStat(player, Statistic.DAMAGE_DEALT)));
  15. loreReplacer.addPlaceholder("%damage_received%", Integer.toString(plugin.statManager.getStat(player, Statistic.DAMAGE_TAKEN)));
  16. return Commons.getInstance().getUtils().getAM(plugin.getMenuConfig(), "Menus.STATS-MENU", player, loreReplacer);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement