Причина: 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
89 lines
2.3 KiB
Kotlin
89 lines
2.3 KiB
Kotlin
plugins {
|
|
java
|
|
id("com.gradleup.shadow") version "9.2.2"
|
|
checkstyle
|
|
}
|
|
|
|
group = "dev.loki"
|
|
version = "1.1.0"
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(25))
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://repo.papermc.io/repository/maven-public/")
|
|
}
|
|
|
|
dependencies {
|
|
// 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")
|
|
implementation("com.zaxxer:HikariCP:6.2.1")
|
|
implementation("org.postgresql:postgresql:42.7.4")
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
|
|
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: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")
|
|
}
|
|
|
|
tasks {
|
|
shadowJar {
|
|
archiveClassifier.set("")
|
|
archiveBaseName.set("Loreport")
|
|
relocate("okhttp3", "dev.loki.lorep.libs.okhttp3")
|
|
relocate("okio", "dev.loki.lorep.libs.okio")
|
|
relocate("com.zaxxer.hikari", "dev.loki.lorep.libs.hikari")
|
|
// Don't relocate PostgreSQL to avoid driver loading issues
|
|
}
|
|
|
|
build {
|
|
dependsOn(shadowJar)
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
processResources {
|
|
filesMatching("plugin.yml") {
|
|
expand("version" to version)
|
|
}
|
|
}
|
|
|
|
compileJava {
|
|
options.encoding = "UTF-8"
|
|
options.release.set(25)
|
|
}
|
|
|
|
compileTestJava {
|
|
options.encoding = "UTF-8"
|
|
options.release.set(25)
|
|
}
|
|
}
|
|
|
|
checkstyle {
|
|
toolVersion = "10.21.4"
|
|
configFile = file("config/checkstyle/checkstyle.xml")
|
|
isIgnoreFailures = false
|
|
maxErrors = 0
|
|
maxWarnings = 0
|
|
}
|
|
|
|
tasks.withType<Checkstyle>().configureEach {
|
|
reports {
|
|
xml.required.set(true)
|
|
html.required.set(true)
|
|
}
|
|
}
|