• Type: New Feature
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • Latest / N/A
    • Yes

      There is no easy way to get the server's TPS without calculating it yourself (ew) or using reflection (meh).

      A method such as Server#getTPS() should be implemented, along with Server#getRecentTPS().

      The first would return the current TPS and the latter would return an array of the 3 values shown by the /tps command.

          [SPIGOT-6386] No simple method to get server TPS

          I have opted to create one method—getTPS. It is just the array with the recent TPS values. This is to ensure compatibility downstream with Paper and because it's simpler.

          Joshua Price added a comment - I have opted to create one method—getTPS. It is just the array with the recent TPS values. This is to ensure compatibility downstream with Paper and because it's simpler.

          Joshua Price added a comment -

          Done with the code, ready to PR, but I'm waiting for some assistance in the Discord server.

          Joshua Price added a comment - Done with the code, ready to PR, but I'm waiting for some assistance in the Discord server.

          Joshua Price added a comment -

          I'm working on a PR for this.

          Joshua Price added a comment - I'm working on a PR for this.

            Assignee:
            Unassigned
            Reporter:
            Joshua Price
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: