Package ch.njol.skript.classes

Examples of ch.njol.skript.classes.Arithmetic


          } else {
            final Class<?> c = o.getClass();
            assert c != null;
            ci = Classes.getSuperClassInfo(c);
          }
          Arithmetic a = null;
          final Changer<?> changer;
          final Class<?>[] cs;
          if (o == null || ci == null || (a = ci.getMath()) != null) {
            boolean changed = false;
            for (final Object d : delta) {
              if (o == null || ci == null) {
                final Class<?> c = d.getClass();
                assert c != null;
                ci = Classes.getSuperClassInfo(c);
                if (ci.getMath() != null)
                  o = d;
                changed = true;
                continue;
              }
              final Class<?> r = ci.getMathRelativeType();
              assert a != null && r != null : ci;
              final Object diff = Converters.convert(d, r);
              if (diff != null) {
                if (mode == ChangeMode.ADD)
                  o = a.add(o, diff);
                else
                  o = a.subtract(o, diff);
                changed = true;
              }
            }
            if (changed)
              set(e, o);
View Full Code Here

TOP

Related Classes of ch.njol.skript.classes.Arithmetic

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.