Package ch.njol.skript.log

Examples of ch.njol.skript.log.BlockingLogHandler


    final String lc = s.toLowerCase();
    final String of = Language.getSpaced("enchantments.of").toLowerCase();
    int c = -1;
    outer: while ((c = lc.indexOf(of, c + 1)) != -1) {
      final ItemType t2 = t.clone();
      final BlockingLogHandler log = SkriptLogger.startLogHandler(new BlockingLogHandler());
      try {
        if (parseType("" + s.substring(0, c), t2, false) == null)
          continue;
      } finally {
        log.stop();
      }
      if (t2.numTypes() == 0)
        continue;
      final Map<Enchantment, Integer> enchantments = new HashMap<Enchantment, Integer>();
      final String[] enchs = lc.substring(c + of.length(), lc.length()).split("\\s*(,|" + Pattern.quote(Language.get("and")) + ")\\s*");
 
View Full Code Here


    if (matchedPattern < 2) {
      worlds = (Expression<World>) exprs[exprs.length - 1];
    } else {
      radius = (Expression<Number>) exprs[exprs.length - 2];
      center = (Expression<Location>) exprs[exprs.length - 1];
      final BlockingLogHandler log = SkriptLogger.startLogHandler(new BlockingLogHandler());
      try {
        centerEntity = center.getSource().getConvertedExpression(Entity.class);
      } finally {
        log.stop();
      }
    }
    if (types instanceof Literal && ((Literal<EntityData<?>>) types).getAll().length == 1) {
      returnType = ((Literal<EntityData<?>>) types).getSingle().getType();
    }
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public boolean isLoopOf(final String s) {
    if (!(types instanceof Literal<?>))
      return false;
    final LogHandler h = SkriptLogger.startLogHandler(new BlockingLogHandler());
    try {
      final EntityData<?> d = EntityData.parseWithoutIndefiniteArticle(s);
      if (d != null) {
        for (final EntityData<?> t : ((Literal<EntityData<?>>) types).getAll()) {
          assert t != null;
View Full Code Here

  }
 
  public VariableString setMode(final StringMode mode) {
    if (this.mode == mode || isSimple)
      return this;
    final BlockingLogHandler h = SkriptLogger.startLogHandler(new BlockingLogHandler());
    try {
      final VariableString vs = newInstance(orig, mode);
      if (vs == null) {
        assert false : this + "; " + mode;
        return this;
      }
      return vs;
    } finally {
      h.stop();
    }
  }
View Full Code Here

TOP

Related Classes of ch.njol.skript.log.BlockingLogHandler

Copyright © 2018 www.massapicom. 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.