fix: предметы GUI античита — головы игроков вместо камней
Причина: ConfigManager.getGuiItem() читал material через Material.getMaterial() и при любом нераспознанном имени (minecraft:player_head, опечатка, отсутствующий ключ) молча подставлял Material.STONE — предмет вкладки античита рисовался обычным блоком без единой записи в лог. - ConfigManager: материал через Material.matchMaterial (принимаются minecraft:player_head и любой регистр), неизвестный/пустой материал больше не превращается в STONE — пишется предупреждение в консоль и берётся осмысленный материал по умолчанию; предупреждение о ненастроенном gui.items выдаётся один раз за сессию - новый пакет gui/item: AnticheatItems, ReportItems, PlayerHeads, EntrySlots — голова всегда получает профиль игрока (без профиля клиент рисует блок), записи раскладываются по свободным строкам, нижний ряд 45-53 зарезервирован под кнопки, пересечений слотов больше нет - тексты фолбэка GUI перенесены из кода в config.yml/messages.yml - цвета переведены на Adventure (TextFormat), org.bukkit.ChatColor убран - PostgreSQL: player_uuid передаётся как UUID — детальный вид античита и сводка в причине репорта падали с "operator does not exist: uuid = character varying" - бинарь собирается под Paper 26.1.2 / Java 25 (paper-api 26.1.2; константы Enchantment.DURABILITY и ARROW_DAMAGE в этой версии больше не существуют) - в списке репортов появилась кнопка вкладки античита (anticheat_open) - тесты: MaterialParsingTest, EntrySlotsTest, TextFormatTest
This commit is contained in:
parent
78c03a7264
commit
574fcf8eea
20 changed files with 1330 additions and 502 deletions
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
java
|
||||
id("com.gradleup.shadow") version "9.0.0-beta4"
|
||||
id("com.gradleup.shadow") version "9.2.2"
|
||||
checkstyle
|
||||
}
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ version = "1.1.0"
|
|||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(21))
|
||||
languageVersion.set(JavaLanguageVersion.of(25))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -19,8 +19,10 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
// Paper API для 1.19.4+
|
||||
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
|
||||
// Paper API of the server version the plugin runs on (Paper 26.1.2).
|
||||
// Compiling against the exact API keeps removed or renamed Bukkit members
|
||||
// (for example the enchantment constants) from breaking at runtime.
|
||||
compileOnly("io.papermc.paper:paper-api:26.1.2.build.74-stable")
|
||||
|
||||
implementation("com.google.code.gson:gson:2.11.0")
|
||||
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
||||
|
|
@ -31,7 +33,8 @@ dependencies {
|
|||
testImplementation("net.jqwik:jqwik:1.9.2")
|
||||
testImplementation("org.yaml:snakeyaml:2.3")
|
||||
testImplementation("org.xerial:sqlite-jdbc:3.47.2.0")
|
||||
testCompileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
|
||||
testCompileOnly("io.papermc.paper:paper-api:26.1.2.build.74-stable")
|
||||
testRuntimeOnly("io.papermc.paper:paper-api:26.1.2.build.74-stable")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
}
|
||||
|
||||
|
|
@ -61,12 +64,12 @@ tasks {
|
|||
|
||||
compileJava {
|
||||
options.encoding = "UTF-8"
|
||||
options.release.set(21)
|
||||
options.release.set(25)
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
options.encoding = "UTF-8"
|
||||
options.release.set(21)
|
||||
options.release.set(25)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue