Skip to content
This repository was archived by the owner on Apr 27, 2019. It is now read-only.

Commit 934972e

Browse files
committed
[142] Fixed problem with mapping overridden packet
1 parent 60845cd commit 934972e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

plugin_manager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ def load_plugins(self, plugins_to_load):
208208
def activate_plugins(self, plugins, dependencies):
209209
for plugin in (self.plugins_waiting_to_load[x] for x in plugins):
210210
try:
211-
self.plugins[plugin.name] = plugin()
211+
instance = plugin()
212+
self.plugins[plugin.name] = instance
212213
self.logger.debug('Instantiated plugin "%s"', plugin.name)
213214
if len(plugin.depends) > 0:
214215
plugin_deps = (
@@ -217,7 +218,7 @@ def activate_plugins(self, plugins, dependencies):
217218
for p in plugin_deps:
218219
self.plugin_classes[plugin.name].plugins[p.name] = p
219220
self.plugins[plugin.name].activate()
220-
self.map_plugin_packets(plugin)
221+
self.map_plugin_packets(instance)
221222
except FatalPluginError as e:
222223
self.logger.critical(
223224
'A plugin reported a fatal error. Error: %s', str(e)

plugins/backups_plugin/backups_plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class BackupsPlugin(SimpleCommandPlugin):
2020
commands = ['backup']
2121

2222
def __init__(self):
23+
super(BackupsPlugin, self).__init__()
2324
self._prep_path('backups')
2425
self.subcommands = {
2526
'help': self.backup_help,

plugins/teleport_plugin/teleport_plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class TeleportPlugin(SimpleCommandPlugin):
1919
commands = ['teleport', 'tp']
2020

2121
def __init__(self):
22+
super(TeleportPlugin, self).__init__()
2223
self.subcommands = {
2324
'help': self.teleport_help,
2425
'player': self.teleport_to_player,

0 commit comments

Comments
 (0)