Beispiel #1
0
 private boolean callHooks(final Entity entity, final List<EntityHookDefinition> hooksToCall) {
   for (EntityHookDefinition hook : hooksToCall) {
     if (hook.isEnabled() && !hook.call(entity)) {
       return false;
     }
   }
   return true;
 }
Beispiel #2
0
 public void addHook(final HooksTag tag, final EntityHookDefinition hook) {
   hook.initialize(this);
   hooksByMethodPath.put(tag.toString() + "." + hook.getName(), hook);
   entityHooks.put(tag, hook);
 }