mcMMO/src/main/java/com/gmail/nossr50/runnables/commands/McrankCommandAsyncTask.java
2013-06-07 15:46:57 -04:00

27 lines
706 B
Java

package com.gmail.nossr50.runnables.commands;
import java.util.Map;
import org.bukkit.command.CommandSender;
import org.bukkit.scheduler.BukkitRunnable;
import com.gmail.nossr50.mcMMO;
public class McrankCommandAsyncTask extends BukkitRunnable {
private final String playerName;
private final CommandSender sender;
public McrankCommandAsyncTask(String playerName, CommandSender sender) {
this.playerName = playerName;
this.sender = sender;
}
@Override
public void run() {
Map<String, Integer> skills = mcMMO.getDatabaseManager().readRank(playerName);
new McrankCommandDisplayTask(skills, sender, playerName).runTaskLater(mcMMO.p, 1);
}
}