Repository navigation
API Errors
| Import | from proleak import errors |
Exceptions raised by the ProLeak API.
| Exception | |
|---|---|
ProLeakError |
Base class of ProLeak API errors. |
ReadOnlyField |
The field cannot be written (not editable, or a post handler). |
NotCancellable |
The event cannot be cancelled (not cancellable, or a post handler). |
FieldTypeError |
The value has the wrong type or range for the field. |
EventExpired |
The event was used after its dispatch ended. |
NotAllowedHere |
The current server kind does not allow this capability. |
UnknownEvent |
No event has this name. |
EventUnavailable |
The event exists but its game hook did not resolve on this game version. |
FeatureUnavailable |
A ProLeak feature is off on this game version: what it uses changed in the game. |
ActionUnavailable |
The player action's game calls changed on this game version. |
AdvancedUnavailable |
The game type an advanced call names changed on this game version. |
PostOnlyEvent |
The event is raised after the game acts only; it has no pre=True phase. |
WrongThread |
This API must be called from the game's main thread. |
BlockingCallOnMainThread |
A blocking call was made from a main-thread handler. |
PluginTimeout |
Raised into a handler that ran past its budget. |
ModeError |
A game mode cannot start; the message says why. |
UnitGone |
The unit died, or its id now belongs to another unit. |
PluginUnloaded |
Raised into a plugin's worker threads when the plugin unloads. |
| Returns | Function | |
|---|---|---|
Iterator[None] |
mapped() |
A with block in which an exception from the game's .NET side becomes the matching ProLeak one. |
mapped() -> Iterator[None]
A with block in which an exception from the game's .NET side becomes the matching ProLeak one.
Wrap direct calls into game classes from type in it.
Base class of ProLeak API errors.
Inherits Exception.
The field cannot be written (not editable, or a post handler).
Inherits ProLeakError, AttributeError.
The event cannot be cancelled (not cancellable, or a post handler).
Inherits ProLeakError.
The value has the wrong type or range for the field.
Inherits ProLeakError, TypeError.
The event was used after its dispatch ended. Keep values, not events.
Inherits ProLeakError.
The current server kind does not allow this capability.
Inherits ProLeakError, PermissionError.
No event has this name.
Inherits ProLeakError, LookupError.
The event exists but its game hook did not resolve on this game version.
Inherits ProLeakError.
A ProLeak feature is off on this game version: what it uses changed in the game.
Inherits ProLeakError.
The player can run it anyway from Mods > Advanced > Game version.
The player action's game calls changed on this game version.
Inherits FeatureUnavailable.
The game type an advanced call names changed on this game version.
Inherits FeatureUnavailable.
The event is raised after the game acts only; it has no pre=True phase.
Inherits ProLeakError, ValueError.
This API must be called from the game's main thread.
Inherits ProLeakError, RuntimeError.
A blocking call was made from a main-thread handler. Use proleak.tasks.
Inherits ProLeakError, RuntimeError.
Raised into a handler that ran past its budget.
Inherits BaseException.
Derives from BaseException so except Exception cannot swallow it.
A game mode cannot start; the message says why.
Inherits ProLeakError.
The unit died, or its id now belongs to another unit. Ask world.unit(id) again.
Inherits ProLeakError.
Raised into a plugin's worker threads when the plugin unloads.
Inherits BaseException.
Using ProLeak
Features
Tutorial
- Your first plugin
- Plugin basics
- Handling events
- Plugin settings
- User interface
- Players, units and game data
- Purchases, signals and pings
- Chat, camera, input and more
- Cosmetics
- Game modes
- Game updates
- Publishing plugins
Reference