ibravo – Interfaces

The ibravo module holds the interfaces required to implement plugins and hooks.

Interface Bases

These are the base interface classes for Bravo. Plugin developers probably will not inherit from these; they are used purely to express common plugin functionality.

class bravo.ibravo.IBravoPlugin[source]

Bases: zope.interface.Interface

Interface for plugins.

This interface stores common metadata used during plugin discovery.

class bravo.ibravo.ISortedPlugin[source]

Bases: bravo.ibravo.IBravoPlugin

Parent interface for sorted plugins.

Sorted plugins have an innate and automatic ordering inside lists thanks to the ability to advertise their dependencies.

Plugins

class bravo.ibravo.IAutomaton[source]

Bases: bravo.ibravo.IBravoPlugin

An automaton.

Automatons are given blocks from chunks which interest them, and may do processing on those blocks.

class bravo.ibravo.IChatCommand[source]

Bases: bravo.ibravo.ICommand

Interface for chat commands.

Chat commands are invoked from the chat inside clients, so they are always called by a specific client.

This interface is specifically designed to exist comfortably side-by-side with IConsoleCommand.

class bravo.ibravo.IConsoleCommand[source]

Bases: bravo.ibravo.ICommand

Interface for console commands.

Console commands are invoked from a console or some other location with two defining attributes: Access restricted to superusers, and no user issuing the command. As such, no access control list applies to them, but they must be given usernames to operate on explicitly.

class bravo.ibravo.IRecipe[source]

Bases: bravo.ibravo.IBravoPlugin

A description for creating materials from other materials.

class bravo.ibravo.ISeason[source]

Bases: bravo.ibravo.IBravoPlugin

Seasons are transformational stages run during certain days to emulate an environment.

class bravo.ibravo.ISerializer[source]

Bases: bravo.ibravo.IBravoPlugin

Class that understands how to serialize several different kinds of objects to and from disk-friendly formats.

Implementors of this interface are expected to provide a uniform implementation of their serialization technique.

class bravo.ibravo.ITerrainGenerator[source]

Bases: bravo.ibravo.ISortedPlugin

Interface for terrain generators.

class bravo.ibravo.IWorldResource[source]

Bases: bravo.ibravo.IBravoPlugin, twisted.web.resource.IResource

Interface for a world specific web resource.

Hooks

class bravo.ibravo.IPreBuildHook[source]

Bases: bravo.ibravo.ISortedPlugin

Hook for actions to be taken before a block is placed.

class bravo.ibravo.IPostBuildHook[source]

Bases: bravo.ibravo.ISortedPlugin

Hook for actions to be taken after a block is placed.

class bravo.ibravo.IDigHook[source]

Bases: bravo.ibravo.ISortedPlugin

Hook for actions to be taken after a block is dug up.

class bravo.ibravo.ISignHook[source]

Bases: bravo.ibravo.ISortedPlugin

Hook for actions to be taken after a sign is updated.

This hook fires both on sign creation and sign editing.

class bravo.ibravo.IUseHook[source]

Bases: bravo.ibravo.ISortedPlugin

Hook for actions to be taken when a player interacts with an entity.

Each plugin needs to specify a list of entity types it is interested in in advance, and it will only be called for those.