UltiKits / UltiTools-Reborn

A library for Minecraft server plugin development.
https://dev.ultikits.com
MIT License
9 stars 3 forks source link

UltiTools-Home1.0.3无法加载 #110

Open chessMCman opened 1 month ago

chessMCman commented 1 month ago

你遇到的问题

如题,服务器核心为mohist-1.20.1,无法加载插件,报错Cannot initialize plugin for com.ultikits.plugins.home.PluginMain

插件版本

6.0.1

各个依赖版本(可选,建议填写)

No response

服务器日志(如无报错可不填)

[12:04:46] [Server thread/INFO] [Minecraft]: [UltiTools-API] Found 4 file(s): [12:04:46] [Server thread/INFO] [Minecraft]: [UltiTools-API] 4 UltiTools plugin(s) found. [12:04:46] [Server thread/WARN] [org.springframework.context.annotation.AnnotationConfigApplicationContext]: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pluginMain': Unsatisfied dependency expressed through field 'dataStore': No qualifying bean of type 'com.ultikits.ultitools.interfaces.DataStore' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} [12:04:46] [Server thread/WARN] [Minecraft]: [UltiTools-API] Cannot initialize plugin for com.ultikits.plugins.home.PluginMain [12:04:46] [Server thread/INFO] [Minecraft]: [UltiTools-API] MysqlConnector loaded!Version: 1.0.1。 [12:04:46] [Server thread/INFO] [Minecraft]: [UltiTools-API] Sidebar loaded!Version: 1.0.1。 [12:04:46] [Server thread/INFO] [Minecraft]: [UltiTools-API] BasicFunctions loaded!Version: 1.0.6。 [12:04:46] [Server thread/INFO] [Minecraft]: [UltiTools-API] Plugin Loading completed. [12:04:46] [Server thread/INFO] [Minecraft]: [UltiTools-API] Succeeded loaded 3, Failed 1.

截图

No response

额外信息

No response

wisdommen commented 1 month ago

Home版本有些落后了,所以会有这个报错。不过暂时建议先使用5.x,后续推出正式版的6.0之后再使用6.0

chessMCman commented 1 month ago

Home版本有些落后了,所以会有这个报错。不过暂时建议先使用5.x,后续推出正式版的6.0之后再使用6.0

我的服务端不能用5.x版本的,也会报错

wisdommen commented 1 month ago

麻烦贴一下是什么报错?

chessMCman commented 1 month ago

麻烦贴一下是什么报错?

[13:28:35] [Server thread/ERROR] [Minecraft]: 启用 UltiTools v5.2.1 时发生错误 (它是最新的吗?) java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 at com.ultikits.ultitools.ultitools.UltiTools.onEnable(UltiTools.java:93) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:348) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:338) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:484) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:?] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:547) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:997de31d-ddc9a2dad-d2eba2c8-47.1.106] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:461) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:997de31d-ddc9a2dad-d2eba2c8-47.1.106] at net.minecraft.server.MinecraftServer.m129815(MinecraftServer.java:446) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at net.minecraft.server.MinecraftServer.m130006(MinecraftServer.java:346) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at net.minecraft.server.dedicated.DedicatedServer.m7038(DedicatedServer.java:233) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at net.minecraft.server.MinecraftServer.m130011(MinecraftServer.java:856) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at net.minecraft.server.MinecraftServer.m206580(MinecraftServer.java:286) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at java.lang.Thread.run(Thread.java:840) [?:?] [13:28:35] [Server thread/INFO] [com.ultikits.ultitools.ultitools.UltiTools]: [UltiTools] 小小墨正在与 UltiTools v5.2.1 插件断开连接 [13:28:35] [Server thread/ERROR] [Minecraft]: 禁用 UltiTools v5.2.1 时发生错误 (它是最新的吗?) java.lang.NullPointerException: Cannot invoke "com.ultikits.ultitools.utils.LanguageUtils.getString(String)" because "com.ultikits.ultitools.ultitools.UltiTools.languageUtils" is null at com.ultikits.ultitools.ultitools.UltiTools.onDisable(UltiTools.java:447) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:350) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:?] at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:366) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:?] at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:509) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:484) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:?] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:547) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:997de31d-ddc9a2dad-d2eba2c8-47.1.106] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:461) ~[forge-1.20.1-47.3.11-universal.jar%23363!/:997de31d-ddc9a2dad-d2eba2c8-47.1.106] at net.minecraft.server.MinecraftServer.m129815(MinecraftServer.java:446) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at net.minecraft.server.MinecraftServer.m130006(MinecraftServer.java:346) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at net.minecraft.server.dedicated.DedicatedServer.m7038(DedicatedServer.java:233) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at net.minecraft.server.MinecraftServer.m130011(MinecraftServer.java:856) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at net.minecraft.server.MinecraftServer.m206580(MinecraftServer.java:286) ~[server-1.20.1-20230612.114412-srg.jar%23358!/:?] at java.lang.Thread.run(Thread.java:840) [?:?]

wisdommen commented 1 month ago

你是不是混用了6.0和5.2.1的配置文件?6.x和5.x的数据和配置都不互通,需要全新启动

wisdommen commented 1 month ago

检查一下UltiTools文件夹下的config.yml中的language配置项,是不是zh_cn或者en_us?

wisdommen commented 1 month ago

或者看一下你的config.yml是否和下面贴的结构相同?

config_version: 3.34

'comment0': 'Language: zh_cn(简体中文), en_us(English)'
language: en_us

'comment52': 'if enable PRO version'
enable_pro: false

'comment53': 'PRO version registered username (You cannot change it after registration)'
pro_name: xxxxxxxxxxxxxx

'comment54': 'PRO version registered password'
pro_password: xxxxxxxxxxxxxx

'comment1': 'set true to use mysql database, set false to use YAML store data'
enableDataBase: false

'comment2': 'fill with your Host, default is Localhost'
host: localhost
'comment3': 'fill with your Mysql port, default is 3306'
port: 3306
'comment4': 'fill with your username, default is root'
username: root
'comment5': 'fill with your password'
password: root
'comment6': 'fill with the database you want to connect to'
database: minecraft

'comment25': 'enable sidebar'
enable_scoreboard: true

'comment21': 'if enable auto version check'
enable_version_check: true

'comment56': 'if enable auto upgrade (you must also enable auto version check)'
enable_auto_update: false

'comment22': 'if enable Home function'
enable_home: true

'comment34': 'if enable Chest Lock function'
enable_lock: true

'comment33': 'if enable Email function'
enable_email: true

'comment32': 'if enable Join Welcome function'
enable_onjoin: true

'comment35': 'if enable Remote Bag function'
enable_remote_chest: true

'comment36': 'if enable sidebar display armor durability function(if performs bad please close this function)'
enable_armor_check: true

'comment37': 'if enable multi-worlds manage/teleport'
enable_multiworlds: true

'comment39': 'if enable chat prefix function'
enable_chat: true

'comment40': 'if enable chat color function'
enable_chat_color: true

'comment41': 'if enable chat @ function'
enable_chat_att: true

'comment9': 'enable whitelist'
enable_white_list: false

'comment43': 'enable above-head prefix suffix display '
enable_name_prefix: true

'comment46': 'if enable Login function'
enable_login: true

'comment47': 'if enable Kits function'
enable_kits: true

'comment55': 'if enable Cleaner function'
enable_cleaner: true

'comment12': 'enable PAPI'
enable_PAPI: true

'comment13': 'enable Death Punishment function'
enable_death_punishment: true

'comment14': 'enable social system'
enable_social_system: true

'comment15': 'enable tpa function'
enable_tpa: true

'comment16': 'enable tpa function'
enable_warp: true

'comment17': 'enable back function'
enable_back: true

'comment18': 'enable spawn function'
enable_spawn: true

'comment19': 'enable auto-reply function'
enable_auto-reply: true

'comment20': 'enable random_tp function'
enable_random_tp: true

'comment23': 'enable fly_command function'
enable_fly_command: true

'comment24': 'enable tpback_command function'
enable_tpback_command: true

'comment26': 'enable first_join_broadcast function'
enable_first_join_broadcast: true

'comment27': 'enable lobby&setlobby commands'
enable_lobby_command: true

'comment28': 'enable invsee command'
enable_invsee_command: true

'comment29': 'enable enderChest_see command'
enable_enderChest_see_command: true

'comment30': 'enable armor see command'
enable_armor_see_command: true

'comment42': 'customize above-head display prefix'
name_prefix: '§e[§dLv.%player_level%§e]'

'comment44': 'customize above-head display suffix'
name_suffix: '[%player_health_rounded%/%player_max_health_rounded%]'

'comment45': 'enable trade function'
enable_trade: true

'comment48': 'enable announcement function'
enable_announcement: true

'comment49': 'enable custom MOTD function'
enable_motd_funcion: true

'comment50': 'enable command-alias function'
enable_command-alias_function: true

'comment51': 'enable inventory backup function'
enable_inv_backup_function: true

'comment57': 'enable ban function'
enable_ban_function: true

"comment58": "enable recall command"
enable_recall_command: true

"comment59": "enable custom tab bar"
enable_custom_tab_bar: true

"comment60": "enable custom crafting recipes"
enable_custom_recipe: true

"comment61": "enable hide function"
enable_hide_function: true
chessMCman commented 1 month ago

你是不是混用了6.0和5.2.1的配置文件?6.x和5.x的数据和配置都不互通,需要全新启动

我忘记把6.x的配置文件删掉了,现在能加载了