Skip to content

Commit

Permalink
fix(bot): 👽️ fix minecraft_data_api import issue (fix #221)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Aug 18, 2024
1 parent e6cef18 commit 9f198dc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/bot/bot/plugin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import minecraft_data_api
from mcdreforged.api.types import PluginServerInterface

from bot.constants import CONFIG_FILE_NAME, DIMENSION
Expand All @@ -21,9 +22,6 @@
class Plugin:
def __init__(self, server: PluginServerInterface, prev_module):
self.__server = server
self.__minecraft_data_api = self.__server.get_plugin_instance(
'minecraft_data_api'
)
self.__config = self.__server.load_config_simple(
CONFIG_FILE_NAME,
target_class=Config
Expand Down Expand Up @@ -68,7 +66,7 @@ def server(self):

@property
def minecraft_data_api(self):
return self.__minecraft_data_api
return minecraft_data_api

@property
def config(self):
Expand Down

0 comments on commit 9f198dc

Please sign in to comment.