Beispiel #1
0
 @Override
 protected void runWithChip(
     Chip target, CommandSender sender, Command command, String label, String[] args) {
   if (target.isDisabled()) {
     target.enable();
     sender.sendMessage(RCPrefs.getInfoColor() + "Enabled " + target + ".");
   } else sender.sendMessage(RCPrefs.getDebugColor() + "The chip is already enabled.");
 }
Beispiel #2
0
  public static void printCircuitList(CommandSender sender, Iterable<Chip> chips, String title) {
    org.redstonechips.RedstoneChips rc = org.redstonechips.RedstoneChips.inst();

    String lines = "";
    int chipCount = 0;

    for (Chip c : chips) {
      lines += (makeCircuitDescriptionLine(c, RCPrefs.getInfoColor())) + "\n";
      chipCount++;
    }

    if (title == null) title = chipCount + " active chip(s)";

    sender.sendMessage("");

    Pager.beginPaging(sender, title, lines, RCPrefs.getInfoColor(), RCPrefs.getErrorColor());
  }