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(name, bases=(), attrs=None, __doc__=None, __module__=None)[source]

Bases: twisted.plugin.IPlugin

Interface for plugins.

This interface stores common metadata used during plugin discovery.

class bravo.ibravo.ISortedPlugin(name, bases=(), attrs=None, __doc__=None, __module__=None)[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.IAuthenticator(name, bases=(), attrs=None, __doc__=None, __module__=None)[source]

Bases: bravo.ibravo.IBravoPlugin

Interface for authenticators.

Authenticators participate in a two-step login process with a handshake.

class bravo.ibravo.IAutomaton(name, bases=(), attrs=None, __doc__=None, __module__=None)[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(name, bases=(), attrs=None, __doc__=None, __module__=None)[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(name, bases=(), attrs=None, __doc__=None, __module__=None)[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(name, bases=(), attrs=None, __doc__=None, __module__=None)[source]

Bases: bravo.ibravo.IBravoPlugin

Recipe for crafting materials from other materials.

class bravo.ibravo.ISeason(name, bases=(), attrs=None, __doc__=None, __module__=None)[source]

Bases: bravo.ibravo.IBravoPlugin

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

class bravo.ibravo.ISerializer(name, bases=(), attrs=None, __doc__=None, __module__=None)[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(name, bases=(), attrs=None, __doc__=None, __module__=None)[source]

Bases: bravo.ibravo.ISortedPlugin

Interface for terrain generators.

class bravo.ibravo.IWorldResource(name, bases=(), attrs=None, __doc__=None, __module__=None)[source]

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

Interface for a world specific web resource.

Hooks

class bravo.ibravo.IPreBuildHook(name, bases=(), attrs=None, __doc__=None, __module__=None)[source]

Bases: bravo.ibravo.ISortedPlugin

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

class bravo.ibravo.IPostBuildHook(name, bases=(), attrs=None, __doc__=None, __module__=None)[source]

Bases: bravo.ibravo.ISortedPlugin

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

class bravo.ibravo.IDigHook(name, bases=(), attrs=None, __doc__=None, __module__=None)[source]

Bases: bravo.ibravo.ISortedPlugin

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

class bravo.ibravo.ISignHook(name, bases=(), attrs=None, __doc__=None, __module__=None)[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(name, bases=(), attrs=None, __doc__=None, __module__=None)[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.

Project Versions

Table Of Contents

Previous topic

factories – Twisted factories

Next topic

location – Locations

This Page