EssentialsX

EssentialsX

2M Downloads

Exclude Baltop if player doesnt meet minimum balance // baltop-min-balance

Mddwg opened this issue ยท 1 comments

commented

Feature description

A way to exclude players from /baltop if they dont meet a specific requirement

A few ways to do this could be:

  • If they dont meet a minimum value
    • baltop-requirement: 10000 *or baltop-requirement: $10000
    • (If their balance isnt more than 10,000, they wouldnt show up in /baltop)
  • A playtime based requirement
    • baltop-requirement: playtime *or baltop-requirement: 3600s
      • playtime: 3600 (1 hour in seconds)
    • (If they havent played for more than an hour, they wouldnt show up in /baltop)
  • Balance isnt more than the starting balance set in the config.yml
    • baltop-requirement: starting-balance
    • (If their balance value isnt more than "starting-balance: 10,000", they wouldnt show up)
  • Don't exclude
    • baltop-requirement: none
    • (Wouldnt exclude any players)

*Another way to do the minimum value &/ playtime is to just have the baltop-requirement: need either a $ or s, so money requirement would be baltop-requirement: $10000 and time requirement would be baltop-requirement: 3600s

Like mdcfe#1970 mentioned on the essx-discussion on Discord (message link: https://discord.com/channels/390942438061113344/390943808948535297/1095297860674785431 )

Food for thought:
There should be another setting under "baltop-requirement" (show-negative: true/false) where devs could make it so that negative balances show up or not, (If their balance is negative, it most likely means they're playing on the server)

How the feature is useful

It would allow server developers to hide players who joined, got the starting balance or any kind of money, and then never joined the server. It would make /baltop to be less cramped and show players who actually play.

commented

I posted a few ideas about this on Discord - just bringing them here so they don't get lost:

  1. We could add a config option to hide players below a certain balance:

    # Don't hide people based on their balance
    baltop-min-balance: none
    # Hide people whose balance is below/equal to the starting balance
    baltop-min-balance: starting-balance
    # Hide people whose balance is below/equal to a custom amount
    baltop-min-balance: 13000
  2. We could track whether or not players' balances have ever changed in their userdata, and then hide players who have never had changes made to their balance.

  3. We could add a more advanced set of filters, which can be enabled/disabled individually:

    # These allow you to limit which players will show in /balancetop.
    baltop-filters:
      # Enable to hide NPCs.
      hide-npcs: true # or false
      # Enable to hide players whose balance is below a set level
      min-balance: none # none, starting-balance, 13000
      # Enable to hide players whose playtime is below a set level
      min-playtime: 2h30m # none, 2h30m
      # Enable to hide players whose balance hasn't changed since they started playing
      hide-no-changes: true