package org.black_ixx.bossshop.command;

import java.util.ArrayList;

import org.bukkit.command.CommandSender;


public class CommandClear extends ACommandBase{

    public CommandClear(CommandExc exector){
        super(exector);
    }

    @Override
    public boolean execute(CommandSender pSender,String[] pArgs){
        if(pArgs.length!=1) return false;
        if(!pSender.hasPermission(this.mPluginName+".status.clear")) return false;
        int count=this.mExector.getPlugin().clearMemoryRecord();
        return send(pSender,C("Cmd.ClearedModelStatus").replace("%numb%",count+""));
    }

    @Override
    public ArrayList<String> getHelp(CommandSender pSender,boolean pAll){
        ArrayList<String> tList=new ArrayList<>();
        if(pSender.hasPermission(this.mPluginName+".status.clear")){
            tList.add(this.mMainCmdLabel+" clear");
            tList.add(C("Help.ClearModelStatus"));
        }
        return tList;
    }

}
