Examples of printErrors()


Examples of ch.njol.skript.SkriptLogger.SubLog.printErrors()

    log.stop();
    if (eff != null) {
      eff.run(e);
    } else {
      final CommandSender sender = Skript.getEventValue(e, CommandSender.class, 0);
      log.printErrors(sender == null ? Bukkit.getConsoleSender() : sender, null);
    }
  }
 
  @Override
  public String toString(final Event e, final boolean debug) {
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printErrors()

    Expression<?> third = this.third;
    try {
      if (first.getReturnType() == Object.class) {
        final Expression<?> e = first.getConvertedExpression(Object.class);
        if (e == null) {
          log.printErrors();
          return false;
        }
        first = e;
      }
      if (second.getReturnType() == Object.class) {
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printErrors()

        first = e;
      }
      if (second.getReturnType() == Object.class) {
        final Expression<?> e = second.getConvertedExpression(Object.class);
        if (e == null) {
          log.printErrors();
          return false;
        }
        second = e;
      }
      if (third != null && third.getReturnType() == Object.class) {
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printErrors()

        second = e;
      }
      if (third != null && third.getReturnType() == Object.class) {
        final Expression<?> e = third.getConvertedExpression(Object.class);
        if (e == null) {
          log.printErrors();
          return false;
        }
        this.third = third = e;
      }
      log.printLog();
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printErrors()

          try {
            loopedExpr = new SkriptParser(l).parseExpression(Object.class);
            if (loopedExpr != null)
              loopedExpr = loopedExpr.getConvertedExpression(Object.class);
            if (loopedExpr == null) {
              h.printErrors("Can't understand this loop: '" + name + "'");
              continue;
            }
            h.printLog();
          } finally {
            h.stop();
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printErrors()

            d = (Expression<? extends T>) new SimpleLiteral<String>(def, false);
        } else {
          d = new SkriptParser(def, SkriptParser.PARSE_LITERALS, ParseContext.DEFAULT).parseExpression(type.getC());
        }
        if (d == null) {
          log.printErrors("'" + def + "' is not " + type.getName().withIndefiniteArticle());
          return null;
        }
        log.printLog();
      } finally {
        log.stop();
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printErrors()

          final RetainingLogHandler log = SkriptLogger.startRetainingLog();
          try {
            @SuppressWarnings("unchecked")
            final Expression<?> expr = new SkriptParser("" + s.substring(c + 1, c2), SkriptParser.PARSE_EXPRESSIONS, ParseContext.DEFAULT).parseExpression(Object.class);
            if (expr == null) {
              log.printErrors("Can't understand this expression: " + s.substring(c + 1, c2));
              return null;
            } else {
              if (mode != StringMode.MESSAGE) {
                string.add(expr);
              } else {
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printErrors()

        } else {
          if (sender == Bukkit.getConsoleSender()) // log as SEVERE instead of INFO like printErrors below
            SkriptLogger.LOGGER.severe("Error in: " + ChatColor.stripColor(command));
          else
            sender.sendMessage(ChatColor.RED + "Error in: " + ChatColor.GRAY + ChatColor.stripColor(command));
          log.printErrors(sender, "(No specific information is available)");
        }
      } finally {
        log.stop();
      }
      return true;
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printErrors()

      if (def.startsWith("%") && def.endsWith("%")) {
        final RetainingLogHandler log = SkriptLogger.startRetainingLog();
        try {
          d = new SkriptParser("" + def.substring(1, def.length() - 1), SkriptParser.PARSE_EXPRESSIONS, ParseContext.COMMAND).parseExpression(type.getC());
          if (d == null) {
            log.printErrors("Can't understand this expression: " + def + "");
            return null;
          }
          log.printLog();
        } finally {
          log.stop();
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printErrors()

              d = (Expression<? extends T>) new SimpleLiteral<String>(def, false);
          } else {
            d = new SkriptParser(def, SkriptParser.PARSE_LITERALS, ParseContext.DEFAULT).parseExpression(type.getC());
          }
          if (d == null) {
            log.printErrors("Can't understand this expression: '" + def + "'");
            return null;
          }
          log.printLog();
        } finally {
          log.stop();
View Full Code Here
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.