From 9f198dccf0a80804436e094fabbb9922919bcd1e Mon Sep 17 00:00:00 2001 From: Andy Zhang <37402126+AnzhiZhang@users.noreply.github.com> Date: Sun, 18 Aug 2024 18:06:37 +0100 Subject: [PATCH] =?UTF-8?q?fix(bot):=20=F0=9F=91=BD=EF=B8=8F=20fix=20minec?= =?UTF-8?q?raft=5Fdata=5Fapi=20import=20issue=20(fix=20#221)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bot/bot/plugin.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bot/bot/plugin.py b/src/bot/bot/plugin.py index 710c1b6..7386a76 100644 --- a/src/bot/bot/plugin.py +++ b/src/bot/bot/plugin.py @@ -1,3 +1,4 @@ +import minecraft_data_api from mcdreforged.api.types import PluginServerInterface from bot.constants import CONFIG_FILE_NAME, DIMENSION @@ -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 @@ -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):