mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-01 12:05:27 +02:00
get mmopower working
This commit is contained in:
@@ -7,12 +7,14 @@ import co.aikar.commands.annotation.CommandPermission;
|
||||
import co.aikar.commands.annotation.Conditions;
|
||||
import co.aikar.commands.annotation.Default;
|
||||
import com.gmail.nossr50.commands.CommandManager;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@CommandPermission("mcmmo.commands.mmopower")
|
||||
@CommandAlias("mmopowerlevel|powerlevel") //Kept for historical reasons
|
||||
@CommandAlias("mmopower|mmopowerlevel|powerlevel")
|
||||
public class PowerLevelCommand extends BaseCommand {
|
||||
private final @NotNull mcMMO pluginRef;
|
||||
|
||||
@@ -25,7 +27,9 @@ public class PowerLevelCommand extends BaseCommand {
|
||||
public void processCommand(String[] args) {
|
||||
BukkitCommandIssuer bukkitCommandIssuer = (BukkitCommandIssuer) getCurrentCommandIssuer();
|
||||
Player player = bukkitCommandIssuer.getPlayer();
|
||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(player); //Should never be null at this point because its caught in an ACF validation
|
||||
|
||||
//TODO: impl
|
||||
mmoPlayer.getPlayer().sendMessage("Your power level is: "+mmoPlayer.getPowerLevel()); //This is not gonna stay, just to show that the command executes in debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user