init 27
This commit is contained in:
@@ -23,10 +23,10 @@ class Minehunt : JavaPlugin() {
|
||||
instance = this
|
||||
val console = Console()
|
||||
|
||||
// 注册命令
|
||||
// 注册事件
|
||||
Bukkit.getPluginManager().registerEvents(PlayerListener(console), this)
|
||||
|
||||
// 注册事件
|
||||
// 注册命令
|
||||
Bukkit.getPluginCommand("test")!!.setExecutor(TestCommand())
|
||||
Bukkit.getPluginCommand("minehunt")!!.setExecutor(MinehuntCommand(console))
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ class MinehuntCommand(
|
||||
*/
|
||||
private fun onStart(sender: CommandSender, flag: Boolean): List<String>? {
|
||||
if (flag) {
|
||||
if (console.stage == Console.GameStage.PREPARING) {
|
||||
if (console.stage == Console.GameStage.PREPARING && console.beginningCountdown == null) {
|
||||
val result = console.tryStart()
|
||||
if (result.isNotEmpty()) {
|
||||
sender.sendMessage(Component.text("游戏开始失败,原因:${result}", NamedTextColor.RED))
|
||||
|
||||
Reference in New Issue
Block a user