2022-01-04 03:04:39 +00:00
|
|
|
package dev.plex.command.impl;
|
|
|
|
|
|
|
|
import dev.plex.command.PlexCommand;
|
|
|
|
import dev.plex.command.annotation.CommandParameters;
|
|
|
|
import dev.plex.command.annotation.CommandPermissions;
|
|
|
|
import dev.plex.command.source.RequiredCommandSource;
|
|
|
|
import dev.plex.rank.enums.Rank;
|
2022-01-27 09:00:50 +00:00
|
|
|
import net.kyori.adventure.text.Component;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
2022-01-04 03:04:39 +00:00
|
|
|
|
|
|
|
// TODO: See ranks of other players
|
|
|
|
|
2022-01-30 01:31:10 +00:00
|
|
|
@CommandPermissions(level = Rank.OP, permission = "plex.rank", source = RequiredCommandSource.IN_GAME)
|
2022-01-27 09:00:50 +00:00
|
|
|
@CommandParameters(name = "rank", description = "Displays your rank")
|
2022-01-29 22:35:48 +00:00
|
|
|
public class RankCMD extends PlexCommand
|
|
|
|
{
|
2022-01-04 03:04:39 +00:00
|
|
|
@Override
|
2022-01-29 22:35:48 +00:00
|
|
|
public Component execute(CommandSender sender, String[] args)
|
|
|
|
{
|
|
|
|
return tl("yourRank", getPlexPlayer((Player)sender).getRank());
|
2022-01-04 03:04:39 +00:00
|
|
|
}
|
|
|
|
}
|