Package uk.co.oliwali.HawkEye.commands

Source Code of uk.co.oliwali.HawkEye.commands.UndoCommand

package uk.co.oliwali.HawkEye.commands;

import uk.co.oliwali.HawkEye.Rollback.RollbackType;
import uk.co.oliwali.HawkEye.Undo;
import uk.co.oliwali.HawkEye.util.Permission;
import uk.co.oliwali.HawkEye.util.Util;

/**
* Reverses the previous {@link RollbackCommand}
* @author oliverw92
*/
public class UndoCommand extends BaseCommand {

  public UndoCommand() {
    name = "undo";
    usage = "<- reverses your previous rollback";
  }

  @Override
  public boolean execute() {
    new Undo(RollbackType.GLOBAL, session);
    return true;
  }

  @Override
  public void moreHelp() {
    Util.sendMessage(sender, "&cReverses your previous rollback if you made a mistake with it");
  }

  @Override
  public boolean permission() {
    return Permission.rollback(sender);
  }

}
TOP

Related Classes of uk.co.oliwali.HawkEye.commands.UndoCommand

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.