Package ch.njol.skript.log

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


        }
        this.third = third = e;
      }
      log.printLog();
    } finally {
      log.stop();
    }
   
    final Class<?> f = first.getReturnType(), s = third == null ? second.getReturnType() : Utils.getSuperType(second.getReturnType(), third.getReturnType());
    if (f == Object.class || s == Object.class)
      return true;
View Full Code Here


              h.printErrors("Can't understand this loop: '" + name + "'");
              continue;
            }
            h.printLog();
          } finally {
            h.stop();
          }
          if (loopedExpr.isSingle()) {
            Skript.error("Can't loop " + loopedExpr + " because it's only a single value");
            continue;
          }
View Full Code Here

          log.printErrors("'" + def + "' is not " + type.getName().withIndefiniteArticle());
          return null;
        }
        log.printLog();
      } finally {
        log.stop();
      }
//      }
    }
    return new Parameter<T>(name, type, single, d);
  }
View Full Code Here

                string.add(i);
              }
            }
            log.printLog();
          } finally {
            log.stop();
          }
        }
        c = s.indexOf('%', c2 + 1);
        if (c == -1)
          c = s.length();
View Full Code Here

          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;
    } catch (final Exception e) {
      Skript.exception(e, "Unexpected error while executing effect command '" + command + "' by '" + sender.getName() + "'");
      sender.sendMessage(ChatColor.RED + "An internal error occurred while executing this effect. Please refer to the server log for details.");
View Full Code Here

            log.printErrors("Can't understand this expression: " + def + "");
            return null;
          }
          log.printLog();
        } finally {
          log.stop();
        }
      } else {
        final RetainingLogHandler log = SkriptLogger.startRetainingLog();
        try {
          if (type.getC() == String.class) {
View Full Code Here

            log.printErrors("Can't understand this expression: '" + def + "'");
            return null;
          }
          log.printLog();
        } finally {
          log.stop();
        }
      }
    }
    return new Argument<T>(name, d, type, single, index, def != null || forceOptional);
  }
View Full Code Here

      log.printLog();
      if (type == null || type.isPlural().isTrue())
        return false;
      this.type = type;
    } finally {
      log.stop();
    }
    entity = new EventValueExpression<Entity>(type.getType());
    return entity.init();
  }
 
View Full Code Here

        return e;
      }
      log.printErrors(defaultError);
      return null;
    } finally {
      log.stop();
    }
  }
 
  @Nullable
  private NonNullPair<SkriptEventInfo<?>, SkriptEvent> parseEvent() {
View Full Code Here

        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.");
      return false;
    }
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.