feat: update chat to 1.19.2

Signed-off-by: MiaoWoo <admin@yumc.pw>
backup
MiaoWoo 2022-11-21 23:17:14 +08:00
parent 3b822c613a
commit e563e1b507
3 changed files with 11 additions and 3 deletions

View File

@ -171,7 +171,7 @@ class BukkitChatInvoke_1_19 extends BukkitChatInvoke_1_18_2 {
return base.getClass('net.minecraft.network.protocol.game.ClientboundSystemChatPacket')
}
getPacketPlayOutChat(sender: any, json: any, type: number) {
return new this.PacketPlayOutChat(this.ChatSerializer[this.nmsChatSerializerMethodName](json), type == 0 ? 1 : type)
return new this.PacketPlayOutChat(this.ChatSerializer[this.nmsChatSerializerMethodName](json), type)
}
}

View File

@ -110,7 +110,7 @@ function loadCoreScript(name) {
try {
let scriptname = name + (global.debug ? '-debug' : '')
engineLoad({
script: http.get(`https://ms.yumc.pw/api/plugin/download/name/${scriptname}`),
script: http.get(`https://mscript.yumc.pw/api/plugin/download/name/${scriptname}`),
name: `core/${scriptname}.js`
})
} catch (error: any) {

View File

@ -226,8 +226,16 @@ export class PluginManagerImpl implements plugin.PluginManager {
})
}
has(name: string) {
return this.instanceMap.has(name)
}
get(name: string) {
return this.instanceMap.get(name) || null
}
getPlugin(name: string) {
return this.instanceMap.get(name)
return this.instanceMap.get(name) || null
}
getPlugins() {