KitsuneLab-Development / K4-System

K4-Systems is a plugin that enhances the server with features such as a playtime tracker, statistical records, and player ranks. Additionally, it includes VIP functions and admin commands for added functionality.
GNU General Public License v3.0
104 stars 35 forks source link

[ENHANCEMENT] Add `TopPlacement` field to SharedApi #179

Closed ivenuss closed 4 months ago

ivenuss commented 4 months ago

Describe the enhancement

Add new field TopPlacement to SharedApi. It should return given player placement.

Concept structure

K4-SharedApi.cs

int TopPlacement { get; }

PluginAPI.cs

public int TopPlacement
{
    get
    {
        if (_player is null || !_player.IsValid || !_player.IsPlayer || _player.rankData is null)
            throw new Exception("K4-SharedAPI > TopPlacement (get) > Player is not valid or is not a player.");

        return _player.rankData.TopPlacement;
    }
}
K4ryuu commented 4 months ago

The feature has been added to the upcoming release. It is going to be uploaded when I have finished with the rest