修复设置tui中出生点保护范围显示不正确的问题
All checks were successful
Java CI-CD with Gradle / build (push) Successful in 31m5s

This commit is contained in:
zhangyuheng 2024-08-09 00:20:34 +08:00
parent 99125fa924
commit c9ea2384a0
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ plugins {
} }
group = "cn.lunadeer" group = "cn.lunadeer"
version = "2.0.2-beta" version = "2.0.3-beta"
java { java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21)) toolchain.languageVersion.set(JavaLanguageVersion.of(21))

View File

@ -31,10 +31,10 @@ public class SysConfig {
Line spawnProtect = Line.create() Line spawnProtect = Line.create()
.append(Component.text(" 出生点保护范围")); .append(Component.text(" 出生点保护范围"));
if (Dominion.config.getLimitSizeX() == -1) { if (Dominion.config.getSpawnProtection() == -1) {
spawnProtect.append(Component.text("无限制")).append(Button.create("设置数值").setExecuteCommand("/dominion set_config spawn_protection 10 " + page).build()); spawnProtect.append(Component.text("无限制")).append(Button.create("设置数值").setExecuteCommand("/dominion set_config spawn_protection 10 " + page).build());
} else { } else {
spawnProtect.append(NumChanger.create(Dominion.config.getLimitSizeX(), "/dominion set_config spawn_protection").setPageNumber(page).build()); spawnProtect.append(NumChanger.create(Dominion.config.getSpawnProtection(), "/dominion set_config spawn_protection").setPageNumber(page).build());
spawnProtect.append(Button.create("设置无限制").setExecuteCommand("/dominion set_config spawn_protection -1 " + page).build()); spawnProtect.append(Button.create("设置无限制").setExecuteCommand("/dominion set_config spawn_protection -1 " + page).build());
} }
view.add(spawnProtect); view.add(spawnProtect);