Package ch.njol.skript.log

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


        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

        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

          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

            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

          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

        } 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

      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

              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

      final NonNullPair<SkriptEventInfo<?>, SkriptEvent> e = new SkriptParser(event, PARSE_LITERALS, ParseContext.EVENT).parseEvent();
      if (e != null) {
        log.printLog();
        return e;
      }
      log.printErrors(defaultError);
      return null;
    } 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.