Skip to content

Commit 0155011

Browse files
authored
Merge branch 'master' into synchronized-region-save
2 parents 5763f53 + 86a1fa6 commit 0155011

89 files changed

Lines changed: 1538 additions & 961 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,47 @@
11
# Changelog
22

3+
## 7.0.14
4+
5+
* Update to 1.21.5
6+
* Fix hopper minecarts not being able to take items from containers in protected regions.
7+
* Fix hopper minecarts not being able to take items from other hopper minecarts in protected regions.
8+
* Fix non-members being able to leash boats in protected regions.
9+
* Use new knockback event on Paper servers to better handle mace knockback in pvp and some other knockback situations.
10+
11+
## 7.0.13
12+
13+
* Update to 1.21.4
14+
* Remove max-stack-size bypass in stack command
15+
* Fix a falling block metadata leak. (May still be problematic on Spigot, use Paper.)
16+
* Fix flame enchant being blocked as entity damage on the arrow itself.
17+
* More Paper-specific performance enhancements for hoppers.
18+
* Fix block-windcharge-explosions config option not doing anything.
19+
* Improvements to fishing rod protection.
20+
* More aggressive vehicle protection (vehicle-destroy now needs to be allowed for various non-destructive damage).
21+
* Move decorated pot usage from interact to chest-access.
22+
23+
## 7.0.12
24+
25+
* Fix a change in the default behavior of explosion flag handling.
26+
27+
## 7.0.11
28+
29+
* Add support for MC 1.21.
30+
* Add wind-charge-burst flag which is checked along with `use` (for the interaction) or `pvp` (for the knockback).
31+
* Add breeze-charge-explosion flag for breeze charges (i.e. from the mob, not player wind charges).
32+
* Add moisture-change flag and config options.
33+
* Fix an error if a player logged in to an unloaded world.
34+
* Fix chest boat usage always being counted as ride.
35+
* Consider potions thrown by mobs as mob-damage.
36+
* Workaround spigot no longer sending block change events when a book is placed on a lectern.
37+
* Improve accuracy of target blocks in blacklist/build-perms events.
38+
39+
## 7.0.10
40+
41+
* Add support for MC 1.20.5 and 1.20.6, drop support for other 1.20 versions
42+
343
## 7.0.9
4-
* Add support for MC 1.20
44+
* Add support for MC 1.20, drop support for MC 1.19
545
* Made entities spawned via the `/summon` command get treated as plugin-spawned entities
646
* Add sniffer egg trample protection options
747

COMPILING.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
Compiling
22
=========
33

4-
You can compile WorldGuard as long as you have some version of Java greater than or equal to 17 installed. Gradle will download JDK 17 specifically if needed,
5-
but it needs some version of Java to bootstrap from.
6-
7-
Note that if you have JRE 17 installed, Gradle will currently attempt to use that to compile, which will not work. It is easiest to uninstall JRE 16 and
8-
replace it with JDK 17.
4+
You can compile WorldGuard as long as you have some version of Java greater than or equal to 21 installed.
5+
Gradle will download JDK 21 specifically if needed, but it needs some version of Java to bootstrap from.
96

107
The build process uses Gradle, which you do *not* need to download. WorldGuard is a multi-module project with three modules:
118

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ A Bukkit server implementation (such as [Paper](https://papermc.io)) and the [Wo
2323
Compiling
2424
---------
2525

26-
The project is written for Java 17 and our build process makes use of
27-
[Gradle](http://gradle.org).
28-
29-
Dependencies are automatically handled by Gradle.
26+
See [COMPILING.md](COMPILING.md).
3027

3128
Contributing
3229
------------

build-logic/build.gradle.kts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
plugins {
2+
`kotlin-dsl`
3+
}
4+
5+
repositories {
6+
gradlePluginPortal()
7+
maven {
8+
name = "EngineHub Repository"
9+
url = uri("https://maven.enginehub.org/repo/")
10+
}
11+
}
12+
13+
dependencies {
14+
implementation(gradleApi())
15+
implementation(libs.licenser)
16+
implementation(libs.grgit)
17+
implementation(libs.shadow)
18+
implementation(libs.jfrog.buildinfo)
19+
implementation(libs.gson)
20+
21+
constraints {
22+
val asmVersion = "[${libs.versions.minimumAsm.get()},)"
23+
implementation("org.ow2.asm:asm:$asmVersion") {
24+
because("Need Java 21 support in shadow")
25+
}
26+
implementation("org.ow2.asm:asm-commons:$asmVersion") {
27+
because("Need Java 21 support in shadow")
28+
}
29+
implementation("org.vafer:jdependency:[${libs.versions.minimumJdependency.get()},)") {
30+
because("Need Java 21 support in shadow")
31+
}
32+
}
33+
}

build-logic/settings.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dependencyResolutionManagement {
2+
versionCatalogs {
3+
create("libs") {
4+
from(files("../gradle/libs.versions.toml"))
5+
}
6+
}
7+
}
8+
9+
rootProject.name = "build-logic"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention
2+
import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask
3+
4+
plugins {
5+
id("com.jfrog.artifactory")
6+
}
7+
8+
val ARTIFACTORY_CONTEXT_URL = "artifactory_contextUrl"
9+
val ARTIFACTORY_USER = "artifactory_user"
10+
val ARTIFACTORY_PASSWORD = "artifactory_password"
11+
12+
if (!project.hasProperty(ARTIFACTORY_CONTEXT_URL)) ext[ARTIFACTORY_CONTEXT_URL] = "http://localhost"
13+
if (!project.hasProperty(ARTIFACTORY_USER)) ext[ARTIFACTORY_USER] = "guest"
14+
if (!project.hasProperty(ARTIFACTORY_PASSWORD)) ext[ARTIFACTORY_PASSWORD] = ""
15+
16+
configure<ArtifactoryPluginConvention> {
17+
setContextUrl("${project.property(ARTIFACTORY_CONTEXT_URL)}")
18+
clientConfig.publisher.run {
19+
repoKey = when {
20+
"${project.version}".contains("SNAPSHOT") -> "libs-snapshot-local"
21+
else -> "libs-release-local"
22+
}
23+
username = "${project.property(ARTIFACTORY_USER)}"
24+
password = "${project.property(ARTIFACTORY_PASSWORD)}"
25+
isMaven = true
26+
isIvy = false
27+
}
28+
}
29+
30+
tasks.named<ArtifactoryTask>("artifactoryPublish") {
31+
isSkip = true
32+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugins {
2+
id("com.jfrog.artifactory")
3+
}
4+
5+
// Artifactory eagerly evaluates publications, so this must run after all changes to artifacts are done
6+
afterEvaluate {
7+
tasks.named<org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask>("artifactoryPublish") {
8+
publications("maven")
9+
}
10+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import buildlogic.getLibrary
2+
import buildlogic.stringyLibs
3+
4+
plugins {
5+
id("eclipse")
6+
id("idea")
7+
id("checkstyle")
8+
id("buildlogic.common")
9+
}
10+
11+
tasks
12+
.withType<JavaCompile>()
13+
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
14+
.configureEach {
15+
val disabledLint = listOf(
16+
"processing", "path", "fallthrough", "serial", "overloads",
17+
)
18+
options.release.set(21)
19+
options.compilerArgs.addAll(listOf("-Xlint:all") + disabledLint.map { "-Xlint:-$it" })
20+
options.isDeprecation = true
21+
options.encoding = "UTF-8"
22+
options.compilerArgs.add("-parameters")
23+
//options.compilerArgs.add("-Werror")
24+
}
25+
26+
configure<CheckstyleExtension> {
27+
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
28+
toolVersion = "10.16.0"
29+
}
30+
31+
tasks.withType<Test>().configureEach {
32+
useJUnitPlatform()
33+
}
34+
35+
dependencies {
36+
"compileOnly"(stringyLibs.getLibrary("jsr305"))
37+
"testImplementation"(platform(stringyLibs.getLibrary("junit-bom")))
38+
"testImplementation"(stringyLibs.getLibrary("junit-jupiter-api"))
39+
"testImplementation"(stringyLibs.getLibrary("junit-jupiter-params"))
40+
"testRuntimeOnly"(stringyLibs.getLibrary("junit-jupiter-engine"))
41+
}
42+
43+
// Java 8 turns on doclint which we fail
44+
tasks.withType<Javadoc>().configureEach {
45+
options.encoding = "UTF-8"
46+
(options as StandardJavadocDocletOptions).apply {
47+
//addBooleanOption("Werror", true)
48+
addBooleanOption("Xdoclint:all", true)
49+
addBooleanOption("Xdoclint:-missing", true)
50+
tags(
51+
"apiNote:a:API Note:",
52+
"implSpec:a:Implementation Requirements:",
53+
"implNote:a:Implementation Note:"
54+
)
55+
}
56+
}
57+
58+
configure<JavaPluginExtension> {
59+
withJavadocJar()
60+
withSourcesJar()
61+
}
62+
63+
tasks.named("check").configure {
64+
dependsOn("checkstyleMain", "checkstyleTest")
65+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import buildlogic.getLibrary
2+
import buildlogic.stringyLibs
3+
import org.gradle.plugins.ide.idea.model.IdeaModel
4+
5+
plugins {
6+
id("org.cadixdev.licenser")
7+
}
8+
9+
group = rootProject.group
10+
version = rootProject.version
11+
12+
repositories {
13+
maven {
14+
name = "EngineHub"
15+
url = uri("https://maven.enginehub.org/repo/")
16+
}
17+
mavenCentral()
18+
afterEvaluate {
19+
killNonEngineHubRepositories()
20+
}
21+
}
22+
23+
configurations.all {
24+
resolutionStrategy {
25+
cacheChangingModulesFor(1, TimeUnit.DAYS)
26+
}
27+
}
28+
29+
plugins.withId("java") {
30+
the<JavaPluginExtension>().toolchain {
31+
languageVersion.set(JavaLanguageVersion.of(21))
32+
}
33+
}
34+
35+
dependencies {
36+
for (conf in listOf("implementation", "api")) {
37+
if (!configurations.names.contains(conf)) {
38+
continue
39+
}
40+
add(conf, platform(stringyLibs.getLibrary("log4j-bom")).map {
41+
val dep = create(it)
42+
dep.because("Mojang provides Log4j")
43+
dep
44+
})
45+
constraints {
46+
add(conf, stringyLibs.getLibrary("guava")) {
47+
because("Mojang provides Guava")
48+
}
49+
add(conf, stringyLibs.getLibrary("gson")) {
50+
because("Mojang provides Gson")
51+
}
52+
add(conf, stringyLibs.getLibrary("fastutil")) {
53+
because("Mojang provides FastUtil")
54+
}
55+
}
56+
}
57+
}
58+
59+
license {
60+
header(rootProject.file("HEADER.txt"))
61+
include("**/*.java")
62+
include("**/*.kt")
63+
}
64+
65+
plugins.withId("idea") {
66+
configure<IdeaModel> {
67+
module {
68+
isDownloadSources = true
69+
isDownloadJavadoc = true
70+
}
71+
}
72+
}

0 commit comments

Comments
 (0)