Package logisticspipes.commands.commands

Source Code of logisticspipes.commands.commands.ChangelogCommand

package logisticspipes.commands.commands;

import logisticspipes.commands.abstracts.ICommandHandler;
import logisticspipes.commands.chathelper.MorePageDisplay;
import logisticspipes.ticks.VersionChecker;
import net.minecraft.command.ICommandSender;

public class ChangelogCommand implements ICommandHandler {
 
  @Override
  public String[] getNames() {
    return new String[]{"changelog"};
  }
 
  @Override
  public boolean isCommandUsableBy(ICommandSender sender) {
    return VersionChecker.hasNewVersion;
  }
 
  @Override
  public String[] getDescription() {
    return new String[]{"Display the changelog between this version", "and the newest one"};
  }
 
  @Override
  public void executeCommand(ICommandSender sender, String[] args) {
    MorePageDisplay display = new MorePageDisplay(new String[] {"(The newest version is #" + VersionChecker.newVersion + ")", "< Changelog Page %/$ >"}, sender);
    for(String msg:VersionChecker.changeLog) {
        display.append(msg);
      }
    display.display(sender);
  }
}
TOP

Related Classes of logisticspipes.commands.commands.ChangelogCommand

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.