Plex/src/main/java/dev/plex/command/impl/RankCMD.java

23 lines
774 B
Java
Raw Normal View History

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;
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
@CommandPermissions(level = Rank.OP, source = RequiredCommandSource.IN_GAME)
@CommandParameters(name = "rank", description = "Displays your rank")
2022-01-04 03:04:39 +00:00
public class RankCMD extends PlexCommand {
@Override
2022-01-27 05:28:30 +00:00
public Component execute(CommandSender sender, String[] args) {
return tl("yourRank", getPlexPlayer((Player) sender).getRank());
2022-01-04 03:04:39 +00:00
}
}