if(!location.getWorld().isChunkLoaded(location.getBlockX() >> 4, location.getBlockZ() >> 4)) {
unregisterSelfTrigger(location, UnregisterReason.UNLOAD);
continue;
}
try {
SelfTriggerThinkEvent event = new SelfTriggerThinkEvent(location.getBlock());
Bukkit.getServer().getPluginManager().callEvent(event);
if(!event.isHandled()) {
unregisterSelfTrigger(location, UnregisterReason.NOT_HANDLED);
}
} catch (Throwable t) { // Mechanic failed to think for some reason
CraftBookPlugin.logger().log(Level.WARNING, "CraftBook mechanic: Failed to think for " + location.toString());
BukkitUtil.printStacktrace(t);