Package org.bukkit.event

Examples of org.bukkit.event.Cancellable


    if (!clazz.isAssignableFrom(event.getClass())){
      // Strange but true.
      return;
    }
    // TODO: profiling option !
    final Cancellable cancellable = isCancellable ? (Cancellable) event : null;

    final MethodEntry[] entries = this.entries;
    for (int i = 0; i < entries.length ; i++){
      final MethodEntry entry = entries[i];
      try {
        if (!isCancellable || !entry.ignoreCancelled || !cancellable.isCancelled()) entry.method.invoke(entry.listener, event);
      } catch (Throwable t) {
        // IllegalArgumentException IllegalAccessException InvocationTargetException
        onError(entry, event, t);
      }
    }
View Full Code Here

TOP

Related Classes of org.bukkit.event.Cancellable

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.