Package ch.njol.skript.log

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


  public static NonNullPair<SkriptEventInfo<?>, SkriptEvent> parseEvent(final String event, final String defaultError) {
    final RetainingLogHandler log = SkriptLogger.startRetainingLog();
    try {
      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 {
View Full Code Here


      v = exprs[0].getConvertedExpression(rt.getC());
      if (v == null) {
        log.printErrors("This function is declared to return " + rt.getName().withIndefiniteArticle() + ", but " + exprs[0].toString(null, false) + " is not of that type.");
        return false;
      }
      log.printLog();
    } finally {
      log.stop();
    }
    if (f.isSingle() && !v.isSingle()) {
      Skript.error("This function is defined to only return a single " + rt.toString() + ", but this return statement can return multiple values.");
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.