-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d6ed43
commit fc747ce
Showing
37 changed files
with
118 additions
and
1,213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
41 changes: 1 addition & 40 deletions
41
plugin/platform-bukkit/src/main/kotlin/cn/fd/utilities/bukkit/FDUtilities.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,17 @@ | ||
package cn.fd.utilities.bukkit | ||
|
||
import cn.fd.utilities.bukkit.config.ConfigYaml | ||
import cn.fd.utilities.bukkit.util.FileListener | ||
import cn.fd.utilities.bukkit.util.Loader | ||
import cn.fd.utilities.env.BukkitEnv | ||
import cn.fd.utilities.env.CommonEnv | ||
import org.bukkit.Bukkit | ||
import taboolib.common.env.RuntimeEnv | ||
import taboolib.common.platform.Awake | ||
import taboolib.common.platform.Platform | ||
import taboolib.common.platform.PlatformSide | ||
import taboolib.common.platform.Plugin | ||
import taboolib.common.platform.function.console | ||
import taboolib.common.platform.function.pluginVersion | ||
import taboolib.module.lang.Language | ||
import taboolib.module.lang.sendLang | ||
import taboolib.platform.BukkitPlugin | ||
|
||
@PlatformSide([Platform.BUKKIT]) | ||
object FDUtilities : Plugin() { | ||
|
||
val plugin by lazy { BukkitPlugin.getInstance() } | ||
|
||
/** | ||
* 加载依赖项 | ||
*/ | ||
@Awake | ||
fun loadDependency() { | ||
RuntimeEnv.ENV.loadDependency(CommonEnv::class.java, true) | ||
RuntimeEnv.ENV.loadDependency(BukkitEnv::class.java, true) | ||
} | ||
|
||
override fun onLoad() { | ||
//BungeeChannel.init() | ||
//插件语言设置 | ||
Language.default = ConfigYaml.LANGUAGE | ||
//加载模块配置文件 | ||
Loader.reloadAll() | ||
console().sendLang("Plugin-Loading", Bukkit.getBukkitVersion()) | ||
} | ||
|
||
override fun onEnable() { | ||
// //开启并创建 BukkitAudiences | ||
// Adventure.enable() | ||
|
||
//Extension.printInfo() | ||
console().sendLang("Plugin-Enabled", pluginVersion) | ||
} | ||
|
||
override fun onDisable() { | ||
//关闭配置文件监听器 | ||
FileListener.uninstall() | ||
println("Hello World!") | ||
} | ||
|
||
} |
61 changes: 0 additions & 61 deletions
61
plugin/platform-bukkit/src/main/kotlin/cn/fd/utilities/bukkit/channel/BungeeChannel.kt
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
plugin/platform-bukkit/src/main/kotlin/cn/fd/utilities/bukkit/channel/ChannelManager.kt
This file was deleted.
Oops, something went wrong.
91 changes: 0 additions & 91 deletions
91
plugin/platform-bukkit/src/main/kotlin/cn/fd/utilities/bukkit/command/MainCommand.kt
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
plugin/platform-bukkit/src/main/kotlin/cn/fd/utilities/bukkit/config/ConfigYaml.kt
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
plugin/platform-bukkit/src/main/kotlin/cn/fd/utilities/bukkit/loader/DependenciesLoader.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cn.fd.utilities.bukkit.loader | ||
|
||
import cn.fd.utilities.env.BukkitEnv | ||
import cn.fd.utilities.env.CommonEnv | ||
import taboolib.common.env.RuntimeEnv | ||
import taboolib.common.platform.Awake | ||
|
||
//感觉有点小题大做 | ||
object DependenciesLoader { | ||
|
||
/** | ||
* 加载依赖项 | ||
*/ | ||
@Awake | ||
fun loadDependency() { | ||
RuntimeEnv.ENV.loadDependency(CommonEnv::class.java, true) | ||
RuntimeEnv.ENV.loadDependency(BukkitEnv::class.java, true) | ||
} | ||
|
||
} |
Oops, something went wrong.