use of me.itsmas.network.server.rank.UpdateRankTask in project Network-depr by Mas281.
the class UserCommands method onSetRankCommand.
@Command("setrank")
@Usage("<player> <rank> [prefix]")
@RequiredRank(Rank.ADMIN)
public void onSetRankCommand(User user, User target, Rank rank, @Optional String prefix) {
if (prefix == null) {
prefix = rank.getName();
}
target.setRank(rank, prefix);
String formatted = target.getFormattedRank();
core.getTaskManager().scheduleTask(new UpdateRankTask(target, rank, prefix, user.getName(), user.getUniqueId()));
user.sendMessage("command.rank.executed", target.getName(), formatted);
user.addLog("Updated rank of %s [%s] to %s [%s]", target.getName(), target.getUniqueId(), rank.getName(), prefix);
}
Aggregations