Package ch.njol.skript.log

Examples of ch.njol.skript.log.ParseLogHandler.printLog()


        if (c == null) {
          h.printError();
          return false;
        }
        containers = c;
        h.printLog();
      } finally {
        h.stop();
      }
    }
    items = exprs[1].getConvertedExpression(Object.class);
View Full Code Here


                o = Classes.parseSimple(((EntryNode) n).getValue(), Object.class, ParseContext.SCRIPT);
                if (o == null) {
                  log.printError("Can't understand the value '" + ((EntryNode) n).getValue() + "'");
                  continue;
                }
                log.printLog();
              } finally {
                log.stop();
              }
              @SuppressWarnings("null")
              final ClassInfo<?> ci = Classes.getSuperClassInfo(o.getClass());
View Full Code Here

        final LogEntry e = log.getError();
        if (e != null)
          sender.sendMessage(ChatColor.DARK_RED + e.getMessage());
        sender.sendMessage(Commands.m_correct_usage + " " + usage);
        log.clear();
        log.printLog();
        return false;
      }
      log.clear();
      log.printLog();
    } finally {
View Full Code Here

        log.clear();
        log.printLog();
        return false;
      }
      log.clear();
      log.printLog();
    } finally {
      log.stop();
    }
   
    if (Skript.log(Verbosity.VERY_HIGH))
View Full Code Here

      final LogEntry err = h.getError();
      lastError = err != null ? err.getMessage() : null;
      return null;
    } finally {
      h.clear();
      h.printLog();
    }
  }
 
  @Override
  public boolean isSingle() {
View Full Code Here

        if (parser == null || !parser.canParse(context) || !c.isAssignableFrom(info.getC()))
          continue;
        log.clear();
        final T t = (T) parser.parse(s, context);
        if (t != null) {
          log.printLog();
          return t;
        }
      }
      log.printError();
    } finally {
View Full Code Here

  public static <T> T parse(final String s, final Class<T> c, final ParseContext context) {
    final ParseLogHandler log = SkriptLogger.startParseLogHandler();
    try {
      T t = parseSimple(s, c, context);
      if (t != null) {
        log.printLog();
        return t;
      }
      for (final ConverterInfo<?, ?> conv : Converters.getConverters()) {
        if (context == ParseContext.COMMAND && (conv.options & Converter.NO_COMMAND_ARGUMENTS) != 0)
          continue;
View Full Code Here

          log.clear();
          final Object o = parseSimple(s, conv.from, context);
          if (o != null) {
            t = (T) ((Converter) conv.converter).convert(o);
            if (t != null) {
              log.printLog();
              return t;
            }
          }
        }
      }
View Full Code Here

    try {
      for (final Class<? extends R> t : to) {
        assert t != null;
        final R r = Classes.parse(data, t, context);
        if (r != null) {
          log.printLog();
          return new SimpleLiteral<R>(r, false);
        }
        log.clear();
      }
      if (error != null) {
View Full Code Here

          return new SimpleLiteral<R>(r, false);
        }
        log.clear();
      }
      if (error != null) {
        log.printLog();
        SkriptLogger.log(error);
      } else {
        log.printError();
      }
      return null;
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.