mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-18 01:46:11 +00:00
Merge branch 'main' of github.com:IntellectualSites/FastAsyncWorldEdit
This commit is contained in:
commit
485781f711
4
.github/ISSUE_TEMPLATE/bug-report.md
vendored
4
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@ -24,7 +24,7 @@ assignees: ''
|
|||||||
**Required Information**
|
**Required Information**
|
||||||
- FAWE Version Number (`/version FastAsyncWorldEdit`):
|
- FAWE Version Number (`/version FastAsyncWorldEdit`):
|
||||||
- Spigot/Paper Version Number (`/version`):
|
- Spigot/Paper Version Number (`/version`):
|
||||||
- Minecraft Version: [e.g. 1.16.4]
|
- Minecraft Version: [e.g. 1.16.5]
|
||||||
|
|
||||||
**Describe the bug**
|
**Describe the bug**
|
||||||
A clear and concise description of what the bug is.
|
A clear and concise description of what the bug is.
|
||||||
@ -43,5 +43,5 @@ Steps to reproduce the behavior:
|
|||||||
<!--- Make sure you've completed the following steps (put an "X" between of brackets): -->
|
<!--- Make sure you've completed the following steps (put an "X" between of brackets): -->
|
||||||
- [] I included all information required in the sections above
|
- [] I included all information required in the sections above
|
||||||
- [] I made sure there are no duplicates of this report [(Use Search)](https://github.com/IntellectualSites/FastAsyncWorldEdit/issues?q=is%3Aissue)
|
- [] I made sure there are no duplicates of this report [(Use Search)](https://github.com/IntellectualSites/FastAsyncWorldEdit/issues?q=is%3Aissue)
|
||||||
- [] I made sure I am using an up-to-date version of [FastAsyncWorldEdit for 1.16.4](https://ci.athion.net/job/FastAsyncWorldEdit-1.16/)
|
- [] I made sure I am using an up-to-date version of [FastAsyncWorldEdit for 1.16.5](https://ci.athion.net/job/FastAsyncWorldEdit-1.16/)
|
||||||
- [] I made sure the bug/error is not caused by any other plugin
|
- [] I made sure the bug/error is not caused by any other plugin
|
||||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -44,7 +44,7 @@ jobs:
|
|||||||
- name: "Download BuildTools"
|
- name: "Download BuildTools"
|
||||||
run: "wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
|
run: "wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
|
||||||
- name: "Run BuildTools"
|
- name: "Run BuildTools"
|
||||||
run: "java -jar BuildTools.jar --rev 1.16.4"
|
run: "java -jar BuildTools.jar --rev 1.16.5"
|
||||||
- name: "Clean Build"
|
- name: "Clean Build"
|
||||||
run: "./gradlew clean build sourcesJar javadocJar"
|
run: "./gradlew clean build sourcesJar javadocJar"
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ plugins {
|
|||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
|
/*
|
||||||
maven {
|
maven {
|
||||||
name = "Forge Maven"
|
name = "Forge Maven"
|
||||||
url = uri("https://files.minecraftforge.net/maven")
|
url = uri("https://files.minecraftforge.net/maven")
|
||||||
@ -20,15 +21,16 @@ repositories {
|
|||||||
name = "sponge"
|
name = "sponge"
|
||||||
url = uri("https://repo.spongepowered.org/maven")
|
url = uri("https://repo.spongepowered.org/maven")
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
maven {
|
maven {
|
||||||
name = "EngineHub Repository"
|
name = "EngineHub"
|
||||||
url = uri("https://maven.enginehub.org/repo/")
|
url = uri("https://maven.enginehub.org/repo/")
|
||||||
content {
|
content {
|
||||||
excludeGroup("net.milkbowl.vault")
|
includeGroupByRegex("com.sk89q.*")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
configurations.all {
|
configurations.all {
|
||||||
resolutionStrategy {
|
resolutionStrategy {
|
||||||
// Fabric needs this.
|
// Fabric needs this.
|
||||||
@ -39,27 +41,32 @@ configurations.all {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
val properties = Properties().also { props ->
|
val properties = Properties().also { props ->
|
||||||
project.projectDir.resolveSibling("gradle.properties").bufferedReader().use {
|
project.projectDir.resolveSibling("gradle.properties").bufferedReader().use {
|
||||||
props.load(it)
|
props.load(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
val loomVersion: String = properties.getProperty("loom.version")
|
val loomVersion: String = properties.getProperty("loom.version")
|
||||||
val mixinVersion: String = properties.getProperty("mixin.version")
|
val mixinVersion: String = properties.getProperty("mixin.version")
|
||||||
|
*/
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(gradleApi())
|
implementation(gradleApi())
|
||||||
implementation("gradle.plugin.net.minecrell:licenser:0.4.1")
|
implementation("gradle.plugin.org.cadixdev.gradle:licenser:0.5.0")
|
||||||
implementation("org.ajoberstar.grgit:grgit-gradle:4.0.2")
|
implementation("org.ajoberstar.grgit:grgit-gradle:4.1.0")
|
||||||
implementation("com.github.jengelman.gradle.plugins:shadow:5.2.0")
|
implementation("com.github.jengelman.gradle.plugins:shadow:6.1.0")
|
||||||
implementation("net.ltgt.apt-eclipse:net.ltgt.apt-eclipse.gradle.plugin:0.21")
|
implementation("net.ltgt.apt-eclipse:net.ltgt.apt-eclipse.gradle.plugin:0.21")
|
||||||
implementation("net.ltgt.apt-idea:net.ltgt.apt-idea.gradle.plugin:0.21")
|
implementation("net.ltgt.apt-idea:net.ltgt.apt-idea.gradle.plugin:0.21")
|
||||||
//implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.16.0")
|
/*
|
||||||
//implementation("gradle.plugin.org.spongepowered:spongegradle:0.9.0")
|
|
||||||
//implementation("net.minecraftforge.gradle:ForgeGradle:3.0.181")
|
|
||||||
//implementation("net.fabricmc:fabric-loom:$loomVersion")
|
|
||||||
//implementation("net.fabricmc:sponge-mixin:$mixinVersion")
|
|
||||||
implementation("gradle.plugin.com.mendhak.gradlecrowdin:plugin:0.1.0")
|
implementation("gradle.plugin.com.mendhak.gradlecrowdin:plugin:0.1.0")
|
||||||
implementation("org.enginehub.gradle:gradle-codecov-plugin:0.1.0")
|
implementation("org.enginehub.gradle:gradle-codecov-plugin:0.1.0")
|
||||||
|
implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.16.0")
|
||||||
|
implementation("gradle.plugin.org.spongepowered:spongegradle:0.9.0")
|
||||||
|
implementation("net.minecraftforge.gradle:ForgeGradle:3.0.181")
|
||||||
|
implementation("net.fabricmc:fabric-loom:$loomVersion")
|
||||||
|
implementation("net.fabricmc:sponge-mixin:$mixinVersion")
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
@ -6,22 +6,43 @@ fun Project.applyCommonConfiguration() {
|
|||||||
version = rootProject.version
|
version = rootProject.version
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
maven { url = uri("https://mvn.intellectualsites.com/content/groups/public/") }
|
maven {
|
||||||
maven { url = uri("https://plotsquared.com/mvn/") }
|
name = "IntellectualSites"
|
||||||
maven { url = uri("https://maven.enginehub.org/repo/")
|
url = uri("https://mvn.intellectualsites.com/content/groups/public/")
|
||||||
content {
|
content {
|
||||||
excludeGroup("net.milkbowl.vault")
|
includeGroup("com.plotsquared")
|
||||||
|
includeGroup("com.intellectualsites.paster")
|
||||||
|
includeGroup("com.github.intellectualsites.plotsquared")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "EngineHub"
|
||||||
|
url = uri("https://maven.enginehub.org/repo/")
|
||||||
|
content {
|
||||||
|
includeGroupByRegex("org.enginehub.*")
|
||||||
|
includeGroupByRegex("com.sk89q.*")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "OSS Sonatype Snapshots"
|
||||||
|
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "OSS Sonatype Releases"
|
||||||
|
url = uri("https://oss.sonatype.org/content/repositories/releases/")
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "Athion"
|
||||||
|
url = uri("https://ci.athion.net/plugin/repository/tools/")
|
||||||
|
content {
|
||||||
|
includeGroup("com.massivecraft")
|
||||||
|
includeGroup("com.thevoxelbox.voxelsniper")
|
||||||
|
includeGroup("com.palmergames.bukkit")
|
||||||
|
includeGroup("net.fabiozumbi12")
|
||||||
|
includeGroupByRegex("com.destroystokyo.*")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
|
|
||||||
maven { url = uri("https://ci.athion.net/plugin/repository/tools/") }
|
|
||||||
maven { url = uri("https://repo.destroystokyo.com/repository/maven-public") }
|
|
||||||
ivy { url = uri("https://ci.athion.net/job")
|
|
||||||
patternLayout {
|
|
||||||
artifact("/[organisation]/[revision]/artifact/[module].[ext]")
|
|
||||||
}}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
|
@ -15,7 +15,7 @@ import org.gradle.kotlin.dsl.register
|
|||||||
fun Project.applyLibrariesConfiguration() {
|
fun Project.applyLibrariesConfiguration() {
|
||||||
applyCommonConfiguration()
|
applyCommonConfiguration()
|
||||||
apply(plugin = "java-base")
|
apply(plugin = "java-base")
|
||||||
apply(plugin = "maven")
|
apply(plugin = "maven-publish")
|
||||||
apply(plugin = "com.github.johnrengelman.shadow")
|
apply(plugin = "com.github.johnrengelman.shadow")
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
|
@ -21,7 +21,7 @@ fun Project.applyPlatformAndCoreConfiguration() {
|
|||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
apply(plugin = "eclipse")
|
apply(plugin = "eclipse")
|
||||||
apply(plugin = "idea")
|
apply(plugin = "idea")
|
||||||
apply(plugin = "maven")
|
apply(plugin = "maven-publish")
|
||||||
// apply(plugin = "checkstyle")
|
// apply(plugin = "checkstyle")
|
||||||
apply(plugin = "com.github.johnrengelman.shadow")
|
apply(plugin = "com.github.johnrengelman.shadow")
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ fun Project.applyPlatformAndCoreConfiguration() {
|
|||||||
|
|
||||||
configure<JavaPluginConvention> {
|
configure<JavaPluginConvention> {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = sourceCompatibility
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks
|
tasks
|
||||||
@ -55,11 +55,11 @@ fun Project.applyPlatformAndCoreConfiguration() {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"compileOnly"("org.jetbrains:annotations:20.1.0")
|
"compileOnly"("org.jetbrains:annotations:20.1.0")
|
||||||
"testImplementation"("org.junit.jupiter:junit-jupiter-api:${Versions.JUNIT}")
|
"testImplementation"("org.junit.jupiter:junit-jupiter-api:5.6.1")
|
||||||
"testImplementation"("org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT}")
|
"testImplementation"("org.junit.jupiter:junit-jupiter-params:5.6.1")
|
||||||
"testImplementation"("org.mockito:mockito-core:${Versions.MOCKITO}")
|
"testImplementation"("org.mockito:mockito-core:3.3.3")
|
||||||
"testImplementation"("org.mockito:mockito-junit-jupiter:${Versions.MOCKITO}")
|
"testImplementation"("org.mockito:mockito-junit-jupiter:3.3.3")
|
||||||
"testRuntime"("org.junit.jupiter:junit-jupiter-engine:${Versions.JUNIT}")
|
"testRuntime"("org.junit.jupiter:junit-jupiter-engine:5.6.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Java 8 turns on doclint which we fail
|
// Java 8 turns on doclint which we fail
|
||||||
@ -112,7 +112,6 @@ fun Project.applyPlatformAndCoreConfiguration() {
|
|||||||
|
|
||||||
fun Project.applyShadowConfiguration() {
|
fun Project.applyShadowConfiguration() {
|
||||||
tasks.named<ShadowJar>("shadowJar") {
|
tasks.named<ShadowJar>("shadowJar") {
|
||||||
// archiveClassifier.set("dist")
|
|
||||||
dependencies {
|
dependencies {
|
||||||
include(project(":worldedit-libs:core"))
|
include(project(":worldedit-libs:core"))
|
||||||
include(project(":worldedit-libs:${project.name.replace("worldedit-", "")}"))
|
include(project(":worldedit-libs:${project.name.replace("worldedit-", "")}"))
|
||||||
|
@ -1,18 +1,6 @@
|
|||||||
|
/*
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
|
|
||||||
object Versions {
|
|
||||||
const val TEXT = "3.0.4"
|
|
||||||
const val TEXT_EXTRAS = "3.0.6"
|
|
||||||
const val PISTON = "0.5.6"
|
|
||||||
const val AUTO_VALUE = "1.7"
|
|
||||||
const val JUNIT = "5.6.1"
|
|
||||||
const val MOCKITO = "3.3.3"
|
|
||||||
const val LOGBACK = "1.2.3"
|
|
||||||
const val FAST_UTIL = "8.2.1"
|
|
||||||
const val GUAVA = "21.0"
|
|
||||||
const val GSON = "2.8.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Properties that need a project reference to resolve:
|
// Properties that need a project reference to resolve:
|
||||||
class ProjectVersions(project: Project) {
|
class ProjectVersions(project: Project) {
|
||||||
val loom = project.rootProject.property("loom.version")
|
val loom = project.rootProject.property("loom.version")
|
||||||
@ -21,3 +9,5 @@ class ProjectVersions(project: Project) {
|
|||||||
|
|
||||||
val Project.versions
|
val Project.versions
|
||||||
get() = ProjectVersions(this)
|
get() = ProjectVersions(this)
|
||||||
|
|
||||||
|
*/
|
||||||
|
@ -6,6 +6,7 @@ org.gradle.daemon=true
|
|||||||
org.gradle.configureondemand=true
|
org.gradle.configureondemand=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
|
org.gradle.vfs.watch=true
|
||||||
|
|
||||||
loom.version=0.2.6-20200124.104118-60
|
loom.version=0.2.6-20200124.104118-60
|
||||||
mixin.version=0.8+build.17
|
mixin.version=0.8+build.17
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
@ -7,3 +7,16 @@ listOf("bukkit", "core").forEach {
|
|||||||
include("worldedit-$it")
|
include("worldedit-$it")
|
||||||
}
|
}
|
||||||
include("worldedit-libs:core:ap")
|
include("worldedit-libs:core:ap")
|
||||||
|
|
||||||
|
dependencyResolutionManagement {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
name = "EngineHub"
|
||||||
|
url = uri("https://maven.enginehub.org/repo/")
|
||||||
|
content {
|
||||||
|
includeGroupByRegex("com.sk89q.*")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,37 +1,70 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
id("java-library")
|
||||||
}
|
}
|
||||||
|
|
||||||
applyPlatformAndCoreConfiguration()
|
applyPlatformAndCoreConfiguration()
|
||||||
applyShadowConfiguration()
|
applyShadowConfiguration()
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven { url = uri("https://hub.spigotmc.org/nexus/content/groups/public") }
|
maven {
|
||||||
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
|
name = "SpigotMC"
|
||||||
maven { url = uri("https://papermc.io/repo/repository/maven-public/") }
|
url = uri("https://hub.spigotmc.org/nexus/content/groups/public")
|
||||||
maven { url = uri("https://maven.enginehub.org/repo/")
|
|
||||||
content {
|
content {
|
||||||
excludeGroup("net.milkbowl.vault")
|
includeGroup("org.bukkit")
|
||||||
|
includeGroup("org.spigotmc")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven { url = uri("https://ci.emc.gs/nexus/content/groups/aikar/") }
|
|
||||||
maven { url = uri("https://ci.athion.net/plugin/repository/tools/") }
|
|
||||||
maven {
|
maven {
|
||||||
this.name = "JitPack"
|
name = "PaperMC"
|
||||||
this.url = uri("https://jitpack.io")
|
url = uri("https://papermc.io/repo/repository/maven-public/")
|
||||||
|
content {
|
||||||
|
includeGroup("io.papermc")
|
||||||
|
includeGroup("com.destroystokyo.paper")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
maven { url = uri("https://repo.destroystokyo.com/repository/maven-public/") }
|
|
||||||
maven {
|
maven {
|
||||||
name = "ProtocolLib Repo"
|
name = "EngineHub"
|
||||||
|
url = uri("https://maven.enginehub.org/repo/")
|
||||||
|
content {
|
||||||
|
includeGroupByRegex("com.sk89q.*")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "Athion"
|
||||||
|
url = uri("https://ci.athion.net/plugin/repository/tools/")
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "JitPack"
|
||||||
|
url = uri("https://jitpack.io")
|
||||||
|
content {
|
||||||
|
includeGroup("com.github.MilkBowl")
|
||||||
|
includeGroup("com.github.TechFortress")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "ProtocolLib"
|
||||||
url = uri("https://repo.dmulloy2.net/nexus/repository/public/")
|
url = uri("https://repo.dmulloy2.net/nexus/repository/public/")
|
||||||
content {
|
content {
|
||||||
includeGroup("com.comphenix.protocol")
|
includeGroup("com.comphenix.protocol")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven { url = uri("https://repo.inventivetalent.org/content/groups/public/") }
|
maven {
|
||||||
flatDir {dir(File("src/main/resources"))}
|
name = "Inventivetalent"
|
||||||
|
url = uri("https://repo.inventivetalent.org/content/groups/public/")
|
||||||
|
content {
|
||||||
|
includeGroupByRegex("org.inventivetalent.*")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "IntellectualSites 3rd Party"
|
||||||
|
url = uri("https://mvn.intellectualsites.com/content/repositories/thirdparty")
|
||||||
|
content {
|
||||||
|
includeGroup("de.notmyfault")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
flatDir { dir(File("src/main/resources")) }
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
@ -41,51 +74,51 @@ configurations.all {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("com.github.MilkBowl:VaultAPI:1.7") {
|
compileOnly("com.github.MilkBowl:VaultAPI:1.7") { isTransitive = false }
|
||||||
isTransitive = false
|
api(project(":worldedit-core"))
|
||||||
}
|
api(project(":worldedit-libs:bukkit"))
|
||||||
"api"(project(":worldedit-core"))
|
compile(":worldedit-adapters:")
|
||||||
"api"(project(":worldedit-libs:bukkit"))
|
|
||||||
"compile"(":worldedit-adapters:")
|
|
||||||
// Paper-patched NMS jars
|
// Paper-patched NMS jars
|
||||||
"compile"("com.destroystokyo.paperv1_15_r1:paperv1_15_r1:1_15_r1")
|
compileOnly("com.destroystokyo.paperv1_15_r1:paperv1_15_r1:1_15_r1")
|
||||||
"compile"("com.destroystokyo.paperv1_16_r1:paperv1_16_r1:1_16_r1")
|
compileOnly("com.destroystokyo.paperv1_16_r1:paperv1_16_r1:1_16_r1")
|
||||||
"compile"("com.destroystokyo.paperv1_16_r2:paperv1_16_r2:1_16_r2")
|
compileOnly("com.destroystokyo.paperv1_16_r2:paperv1_16_r2:1_16_r2")
|
||||||
"compile"("com.destroystokyo.paperv1_16_r3:paperv1_16_r3:1_16_r3")
|
compileOnly("com.destroystokyo.paperv1_16_r3:paperv1_16_r3:1_16_r3")
|
||||||
"compile"("org.spigotmcv1_15_r1:spigotmcv1_15_r1:1_15_r1")
|
compileOnly("org.spigotmcv1_15_r1:spigotmcv1_15_r1:1_15_r1")
|
||||||
"compile"("org.spigotmcv1_16_r1:spigotmcv1_16_r1:1_16_r1")
|
compileOnly("org.spigotmcv1_16_r1:spigotmcv1_16_r1:1_16_r1")
|
||||||
"compile"("org.spigotmcv1_16_r2:spigotmcv1_16_r2:1_16_r2")
|
compileOnly("org.spigotmcv1_16_r2:spigotmcv1_16_r2:1_16_r2")
|
||||||
"compile"("org.spigotmcv1_16_r3:spigotmcv1_16_r3:1_16_r3")
|
compileOnly("org.spigotmcv1_16_r3:spigotmcv1_16_r3:1_16_r3")
|
||||||
"implementation"("it.unimi.dsi:fastutil:${Versions.FAST_UTIL}")
|
implementation("it.unimi.dsi:fastutil:8.4.4")
|
||||||
"api"("com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT") {
|
api("com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT") {
|
||||||
exclude("junit", "junit")
|
exclude("junit", "junit")
|
||||||
isTransitive = false
|
isTransitive = false
|
||||||
}
|
}
|
||||||
"compileOnly"("org.jetbrains:annotations:20.1.0")
|
compileOnly("org.spigotmc:spigot:1.16.5-R0.1-SNAPSHOT")
|
||||||
"testCompileOnly"("org.jetbrains:annotations:20.1.0")
|
compileOnly("org.jetbrains:annotations:20.1.0")
|
||||||
"compileOnly"("org.spigotmc:spigot:1.16.5-R0.1-SNAPSHOT")
|
testCompileOnly("org.jetbrains:annotations:20.1.0")
|
||||||
"implementation"("io.papermc:paperlib:1.0.6")
|
implementation("io.papermc:paperlib:1.0.6")
|
||||||
"compileOnly"("com.sk89q:dummypermscompat:1.10") {
|
compileOnly("com.sk89q:dummypermscompat:1.10") {
|
||||||
exclude("com.github.MilkBowl", "VaultAPI")
|
exclude("com.github.MilkBowl", "VaultAPI")
|
||||||
}
|
}
|
||||||
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
||||||
"testImplementation"("org.mockito:mockito-core:1.9.0-rc1")
|
testImplementation("org.mockito:mockito-core:1.9.0-rc1")
|
||||||
"compileOnly"("com.sk89q.worldguard:worldguard-bukkit:7.+") {
|
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.4") {
|
||||||
exclude("com.sk89q.worldedit", "worldedit-bukkit")
|
exclude("com.sk89q.worldedit", "worldedit-bukkit")
|
||||||
exclude("com.sk89q.worldedit", "worldedit-core")
|
exclude("com.sk89q.worldedit", "worldedit-core")
|
||||||
exclude("com.sk89q.worldedit.worldedit-libs", "bukkit")
|
exclude("com.sk89q.worldedit.worldedit-libs", "bukkit")
|
||||||
exclude("com.sk89q.worldedit.worldedit-libs", "core")
|
exclude("com.sk89q.worldedit.worldedit-libs", "core")
|
||||||
}
|
}
|
||||||
"compile"("org.bstats:bstats-bukkit:1.8")
|
api("com.intellectualsites.paster:Paster:1.0.1-SNAPSHOT")
|
||||||
"compile"("com.intellectualsites.paster:Paster:1.0.1-SNAPSHOT")
|
|
||||||
// Third party
|
// Third party
|
||||||
|
implementation("org.bstats:bstats-bukkit:2.1.0")
|
||||||
|
implementation("org.bstats:bstats-base:2.1.0")
|
||||||
compileOnlyApi("org.inventivetalent:mapmanager:1.7.+") { isTransitive = false }
|
compileOnlyApi("org.inventivetalent:mapmanager:1.7.+") { isTransitive = false }
|
||||||
"implementation"("com.github.TechFortress:GriefPrevention:16.+") { isTransitive = false }
|
implementation("com.github.TechFortress:GriefPrevention:16.+") { isTransitive = false }
|
||||||
"implementation"("com.massivecraft:mcore:7.0.1") { isTransitive = false }
|
implementation("com.massivecraft:mcore:7.0.1") { isTransitive = false }
|
||||||
"implementation"("com.bekvon.bukkit.residence:Residence:4.5._13.1") { isTransitive = false }
|
implementation("com.bekvon.bukkit.residence:Residence:4.5._13.1") { isTransitive = false }
|
||||||
"implementation"("com.palmergames.bukkit:towny:0.84.0.9") { isTransitive = false }
|
implementation("com.palmergames.bukkit:towny:0.84.0.9") { isTransitive = false }
|
||||||
"implementation"("com.thevoxelbox.voxelsniper:voxelsniper:5.171.0") { isTransitive = false }
|
implementation("com.thevoxelbox.voxelsniper:voxelsniper:5.171.0") { isTransitive = false }
|
||||||
"implementation"("com.comphenix.protocol:ProtocolLib:4.5.1") { isTransitive = false }
|
implementation("com.comphenix.protocol:ProtocolLib:4.5.1") { isTransitive = false }
|
||||||
|
implementation("de.notmyfault:serverlib:1.0.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Copy>("processResources") {
|
tasks.named<Copy>("processResources") {
|
||||||
@ -116,6 +149,7 @@ tasks.named<ShadowJar>("shadowJar") {
|
|||||||
include(dependency("org.slf4j:slf4j-api"))
|
include(dependency("org.slf4j:slf4j-api"))
|
||||||
include(dependency("org.apache.logging.log4j:log4j-slf4j-impl"))
|
include(dependency("org.apache.logging.log4j:log4j-slf4j-impl"))
|
||||||
include(dependency("org.antlr:antlr4-runtime"))
|
include(dependency("org.antlr:antlr4-runtime"))
|
||||||
|
include(dependency("de.notmyfault:serverlib"))
|
||||||
relocate("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib") {
|
relocate("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib") {
|
||||||
include(dependency("io.papermc:paperlib:1.0.6"))
|
include(dependency("io.papermc:paperlib:1.0.6"))
|
||||||
}
|
}
|
||||||
@ -123,7 +157,10 @@ tasks.named<ShadowJar>("shadowJar") {
|
|||||||
include(dependency("it.unimi.dsi:fastutil"))
|
include(dependency("it.unimi.dsi:fastutil"))
|
||||||
}
|
}
|
||||||
relocate("org.bstats", "com.boydti.metrics") {
|
relocate("org.bstats", "com.boydti.metrics") {
|
||||||
include(dependency("org.bstats:bstats-bukkit:1.8"))
|
include(dependency("org.bstats:bstats-bukkit:2.1.0"))
|
||||||
|
}
|
||||||
|
relocate("org.bstats", "com.boydti.metrics") {
|
||||||
|
include(dependency("org.bstats:bstats-base:2.1.0"))
|
||||||
}
|
}
|
||||||
relocate("com.intellectualsites.paster", "com.boydti.fawe.paster") {
|
relocate("com.intellectualsites.paster", "com.boydti.fawe.paster") {
|
||||||
include(dependency("com.intellectualsites.paster:Paster:1.0.1-SNAPSHOT"))
|
include(dependency("com.intellectualsites.paster:Paster:1.0.1-SNAPSHOT"))
|
||||||
|
@ -49,6 +49,7 @@ import com.sk89q.worldedit.world.entity.EntityType;
|
|||||||
import com.sk89q.worldedit.world.gamemode.GameModes;
|
import com.sk89q.worldedit.world.gamemode.GameModes;
|
||||||
import com.sk89q.worldedit.world.item.ItemCategory;
|
import com.sk89q.worldedit.world.item.ItemCategory;
|
||||||
import com.sk89q.worldedit.world.weather.WeatherTypes;
|
import com.sk89q.worldedit.world.weather.WeatherTypes;
|
||||||
|
import de.notmyfault.serverlib.ServerLib;
|
||||||
import io.papermc.lib.PaperLib;
|
import io.papermc.lib.PaperLib;
|
||||||
import org.bstats.bukkit.Metrics;
|
import org.bstats.bukkit.Metrics;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -95,7 +96,6 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
|||||||
private static final Logger log = LoggerFactory.getLogger(WorldEditPlugin.class);
|
private static final Logger log = LoggerFactory.getLogger(WorldEditPlugin.class);
|
||||||
public static final String CUI_PLUGIN_CHANNEL = "worldedit:cui";
|
public static final String CUI_PLUGIN_CHANNEL = "worldedit:cui";
|
||||||
private static WorldEditPlugin INSTANCE;
|
private static WorldEditPlugin INSTANCE;
|
||||||
private static final int BSTATS_PLUGIN_ID = 1403;
|
|
||||||
|
|
||||||
private BukkitImplAdapter bukkitAdapter;
|
private BukkitImplAdapter bukkitAdapter;
|
||||||
private BukkitServerInterface server;
|
private BukkitServerInterface server;
|
||||||
@ -162,7 +162,8 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
|||||||
// register this so we can load world-dependent data right as the first world is loading
|
// register this so we can load world-dependent data right as the first world is loading
|
||||||
getServer().getPluginManager().registerEvents(new WorldInitListener(), this);
|
getServer().getPluginManager().registerEvents(new WorldInitListener(), this);
|
||||||
} else {
|
} else {
|
||||||
getLogger().warning("Server reload detected. This may cause various issues with WorldEdit and dependent plugins.");
|
getLogger().warning("Server reload detected. This may cause various issues with FastAsyncWorldEdit and dependent plugins.");
|
||||||
|
getLogger().warning("For more information, see https://matthewmiller.dev/blog/problem-with-reload/");
|
||||||
try {
|
try {
|
||||||
setupPreWorldData();
|
setupPreWorldData();
|
||||||
// since worlds are loaded already, we can do this now
|
// since worlds are loaded already, we can do this now
|
||||||
@ -172,10 +173,12 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Setup metrics
|
// Setup metrics
|
||||||
new Metrics(this, BSTATS_PLUGIN_ID);
|
new Metrics(this, 1403);
|
||||||
|
|
||||||
// Check whether the server runs on 11 or greater
|
// Check whether the server runs on 11 or greater
|
||||||
checkJvm();
|
checkJvm();
|
||||||
|
// Check if we are in a safe environment
|
||||||
|
ServerLib.checkUnsafeForks();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupPreWorldData() {
|
private void setupPreWorldData() {
|
||||||
|
@ -49,11 +49,11 @@ public class BukkitImplLoader {
|
|||||||
private static final String LOAD_ERROR_MESSAGE =
|
private static final String LOAD_ERROR_MESSAGE =
|
||||||
"\n**********************************************\n"
|
"\n**********************************************\n"
|
||||||
+ "** This FastAsyncWorldEdit version does not fully support your version of Bukkit.\n"
|
+ "** This FastAsyncWorldEdit version does not fully support your version of Bukkit.\n"
|
||||||
|
+ "** You can fix this by:\n"
|
||||||
|
+ "** - Updating your server version\n** - Updating FAWE\n"
|
||||||
+ "**\n" + "** When working with blocks or undoing, chests will be empty, signs\n"
|
+ "**\n" + "** When working with blocks or undoing, chests will be empty, signs\n"
|
||||||
+ "** will be blank, and so on. There will be no support for entity\n"
|
+ "** will be blank, and so on. There will be no support for entity\n"
|
||||||
+ "** and block property-related functions.\n"
|
+ "** and block property-related functions.\n"
|
||||||
+ "**\n"
|
|
||||||
+ "** Please see https://worldedit.enginehub.org/en/latest/faq/#bukkit-adapters\n"
|
|
||||||
+ "**********************************************\n";
|
+ "**********************************************\n";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Binary file not shown.
@ -12,8 +12,8 @@ dependencies {
|
|||||||
"implementation"("org.apache.logging.log4j:log4j-core:2.8.1")
|
"implementation"("org.apache.logging.log4j:log4j-core:2.8.1")
|
||||||
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
||||||
"implementation"("commons-cli:commons-cli:1.4")
|
"implementation"("commons-cli:commons-cli:1.4")
|
||||||
"implementation"("com.google.guava:guava:${Versions.GUAVA}")
|
"implementation"("com.google.guava:guava:21.0")
|
||||||
"implementation"("com.google.code.gson:gson:${Versions.GSON}")
|
"implementation"("com.google.code.gson:gson:2.8.6")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Jar>("jar") {
|
tasks.named<Jar>("jar") {
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
import com.mendhak.gradlecrowdin.DownloadTranslationsTask
|
|
||||||
import com.mendhak.gradlecrowdin.UploadSourceFileTask
|
|
||||||
import org.gradle.plugins.ide.idea.model.IdeaModel
|
import org.gradle.plugins.ide.idea.model.IdeaModel
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@ -8,14 +6,18 @@ plugins {
|
|||||||
id("net.ltgt.apt-eclipse")
|
id("net.ltgt.apt-eclipse")
|
||||||
id("net.ltgt.apt-idea")
|
id("net.ltgt.apt-idea")
|
||||||
id("antlr")
|
id("antlr")
|
||||||
id("com.mendhak.gradlecrowdin")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven { url = uri("https://plotsquared.com/mvn") }
|
maven {
|
||||||
maven { url = uri("https://mvn.intellectualsites.com/content/groups/public/") }
|
name = "IntellectualSites"
|
||||||
mavenCentral()
|
url = uri("https://mvn.intellectualsites.com/content/groups/public/")
|
||||||
|
content {
|
||||||
|
includeGroup("com.plotsquared")
|
||||||
|
includeGroup("com.intellectualsites.paster")
|
||||||
|
includeGroup("com.github.intellectualsites.plotsquared")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
applyPlatformAndCoreConfiguration()
|
applyPlatformAndCoreConfiguration()
|
||||||
@ -27,39 +29,34 @@ configurations.all {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"api"(project(":worldedit-libs:core"))
|
api(project(":worldedit-libs:core"))
|
||||||
"implementation"("de.schlichtherle:truezip:6.8.4")
|
implementation("de.schlichtherle:truezip:6.8.4")
|
||||||
"implementation"("net.java.truevfs:truevfs-profile-default_2.13:0.12.2")
|
implementation("net.java.truevfs:truevfs-profile-default_2.13:0.12.2")
|
||||||
"implementation"("org.mozilla:rhino-runtime:1.7.12")
|
implementation("org.mozilla:rhino-runtime:1.7.12")
|
||||||
"implementation"("org.yaml:snakeyaml:1.27")
|
implementation("org.yaml:snakeyaml:1.27")
|
||||||
"implementation"("com.google.guava:guava:${Versions.GUAVA}")
|
implementation("com.google.guava:guava:21.0")
|
||||||
"implementation"("com.google.code.findbugs:jsr305:3.0.2")
|
implementation("com.google.code.findbugs:jsr305:3.0.2")
|
||||||
"implementation"("com.google.code.gson:gson:${Versions.GSON}")
|
implementation("com.google.code.gson:gson:2.8.6")
|
||||||
"implementation"("org.slf4j:slf4j-api:1.7.26")
|
implementation("org.slf4j:slf4j-api:1.7.26")
|
||||||
"implementation"("it.unimi.dsi:fastutil:${Versions.FAST_UTIL}")
|
implementation("it.unimi.dsi:fastutil:8.4.4")
|
||||||
|
|
||||||
val antlrVersion = "4.7.2"
|
antlr("org.antlr:antlr4:4.7.2")
|
||||||
"antlr"("org.antlr:antlr4:$antlrVersion")
|
implementation("org.antlr:antlr4-runtime:4.7.2")
|
||||||
"implementation"("org.antlr:antlr4-runtime:$antlrVersion")
|
|
||||||
|
|
||||||
"implementation"("com.googlecode.json-simple:json-simple:1.1.1") { isTransitive = false }
|
implementation("com.googlecode.json-simple:json-simple:1.1.1") { isTransitive = false }
|
||||||
"compileOnly"(project(":worldedit-libs:core:ap"))
|
compileOnly(project(":worldedit-libs:core:ap"))
|
||||||
"annotationProcessor"(project(":worldedit-libs:core:ap"))
|
annotationProcessor(project(":worldedit-libs:core:ap"))
|
||||||
// ensure this is on the classpath for the AP
|
// ensure this is on the classpath for the AP
|
||||||
"annotationProcessor"("com.google.guava:guava:21.0")
|
annotationProcessor("com.google.guava:guava:21.0")
|
||||||
"compileOnly"("com.google.auto.value:auto-value-annotations:${Versions.AUTO_VALUE}")
|
compileOnly("com.google.auto.value:auto-value-annotations:1.7")
|
||||||
"annotationProcessor"("com.google.auto.value:auto-value:${Versions.AUTO_VALUE}")
|
annotationProcessor("com.google.auto.value:auto-value:1.7")
|
||||||
"testImplementation"("ch.qos.logback:logback-core:${Versions.LOGBACK}")
|
testImplementation("ch.qos.logback:logback-core:1.2.3")
|
||||||
"testImplementation"("ch.qos.logback:logback-classic:${Versions.LOGBACK}")
|
testImplementation("ch.qos.logback:logback-classic:1.2.3")
|
||||||
"compile"("com.github.luben:zstd-jni:1.4.8-1")
|
implementation("com.github.luben:zstd-jni:1.4.8-1")
|
||||||
"compileOnly"("net.fabiozumbi12:redprotect:1.9.6")
|
compileOnly("net.fabiozumbi12:redprotect:1.9.6")
|
||||||
"compile"("com.github.intellectualsites.plotsquared:PlotSquared-API:latest") {
|
api("com.github.intellectualsites.plotsquared:PlotSquared-API:4.514") { isTransitive = false }
|
||||||
isTransitive = false
|
api("com.plotsquared:PlotSquared-Core:5.13.3") { isTransitive = false }
|
||||||
}
|
api("com.intellectualsites.paster:Paster:1.0.1-SNAPSHOT")
|
||||||
"compile"("com.plotsquared:PlotSquared-Core:5.13.3") {
|
|
||||||
isTransitive = false
|
|
||||||
}
|
|
||||||
"api"("com.intellectualsites.paster:Paster:1.0.1-SNAPSHOT")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Test>("test") {
|
tasks.named<Test>("test") {
|
||||||
@ -75,8 +72,8 @@ tasks.named<AntlrTask>("generateGrammarSource").configure {
|
|||||||
val pkg = "com.sk89q.worldedit.antlr"
|
val pkg = "com.sk89q.worldedit.antlr"
|
||||||
outputDirectory = file("build/generated-src/antlr/main/${pkg.replace('.', '/')}")
|
outputDirectory = file("build/generated-src/antlr/main/${pkg.replace('.', '/')}")
|
||||||
arguments = listOf(
|
arguments = listOf(
|
||||||
"-visitor", "-package", pkg,
|
"-visitor", "-package", pkg,
|
||||||
"-Xexact-output-dir"
|
"-Xexact-output-dir"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +111,7 @@ tasks.named<ShadowJar>("shadowJar") {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
val crowdinApiKey = "crowdin_apikey"
|
val crowdinApiKey = "crowdin_apikey"
|
||||||
|
|
||||||
if (project.hasProperty(crowdinApiKey) && !gradle.startParameter.isOffline) {
|
if (project.hasProperty(crowdinApiKey) && !gradle.startParameter.isOffline) {
|
||||||
@ -146,3 +143,5 @@ if (project.hasProperty(crowdinApiKey) && !gradle.startParameter.isOffline) {
|
|||||||
dependsOn("crowdinDownload")
|
dependsOn("crowdinDownload")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
@ -21,5 +21,5 @@ dependencies {
|
|||||||
"implementation"(project(":worldedit-core"))
|
"implementation"(project(":worldedit-core"))
|
||||||
"implementation"(kotlin("stdlib-jdk8"))
|
"implementation"(kotlin("stdlib-jdk8"))
|
||||||
"implementation"(kotlin("reflect"))
|
"implementation"(kotlin("reflect"))
|
||||||
"implementation"("com.google.guava:guava:${Versions.GUAVA}")
|
"implementation"("com.google.guava:guava:21.0")
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,8 @@ import com.google.gson.stream.JsonReader;
|
|||||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||||
import com.sk89q.worldedit.function.mask.Mask;
|
import com.sk89q.worldedit.function.mask.Mask;
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
|
import com.sk89q.worldedit.util.PropertiesConfiguration;
|
||||||
|
import com.sk89q.worldedit.util.report.Unreported;
|
||||||
import com.sk89q.worldedit.world.block.BlockType;
|
import com.sk89q.worldedit.world.block.BlockType;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypesCache;
|
import com.sk89q.worldedit.world.block.BlockTypesCache;
|
||||||
@ -18,14 +20,19 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
|||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||||
import it.unimi.dsi.fastutil.ints.IntArraySet;
|
import it.unimi.dsi.fastutil.ints.IntArraySet;
|
||||||
import it.unimi.dsi.fastutil.longs.LongArrayList;
|
import it.unimi.dsi.fastutil.longs.LongArrayList;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.BufferedInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@ -48,6 +55,8 @@ import static org.slf4j.LoggerFactory.getLogger;
|
|||||||
// TODO FIXME
|
// TODO FIXME
|
||||||
public class TextureUtil implements TextureHolder {
|
public class TextureUtil implements TextureHolder {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(TextureUtil.class);
|
||||||
|
|
||||||
private static final int[] FACTORS = new int[766];
|
private static final int[] FACTORS = new int[766];
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@ -344,8 +353,20 @@ public class TextureUtil implements TextureHolder {
|
|||||||
public TextureUtil(File folder) throws FileNotFoundException {
|
public TextureUtil(File folder) throws FileNotFoundException {
|
||||||
this.folder = folder;
|
this.folder = folder;
|
||||||
if (!folder.exists()) {
|
if (!folder.exists()) {
|
||||||
throw new FileNotFoundException(
|
log.info("Downloading asset jar from Mojang, please wait...");
|
||||||
"Please create a `FastAsyncWorldEdit/textures` folder with `.minecraft/versions` jar or mods in it.");
|
new File(Fawe.imp().getDirectory() + "/" + Settings.IMP.PATHS.TEXTURES + "/" + "/.minecraft/versions/").mkdirs();
|
||||||
|
try (BufferedInputStream in = new BufferedInputStream(new URL("https://launcher.mojang.com/v1/objects/37fd3c903861eeff3bc24b71eed48f828b5269c8/client.jar").openStream());
|
||||||
|
FileOutputStream fileOutputStream = new FileOutputStream(Fawe.imp().getDirectory() + "/" + Settings.IMP.PATHS.TEXTURES + "/" + "/.minecraft/versions/1.16.5.jar")) {
|
||||||
|
byte[] dataBuffer = new byte[1024];
|
||||||
|
int bytesRead;
|
||||||
|
while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) {
|
||||||
|
fileOutputStream.write(dataBuffer, 0, bytesRead);
|
||||||
|
}
|
||||||
|
log.info("Asset jar down has been downloaded successfully.");
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("Could not download version jar. Please do so manually by creating a `FastAsyncWorldEdit/textures` folder with `.minecraft/versions` jar or mods in it.");
|
||||||
|
log.error("If the file exists, please make sure the server has read access to the directory.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -606,8 +627,18 @@ public class TextureUtil implements TextureHolder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (files.length == 0) {
|
if (files.length == 0) {
|
||||||
getLogger(TextureUtil.class).debug(
|
new File(Fawe.imp().getDirectory() + "/" + Settings.IMP.PATHS.TEXTURES + "/" + "/.minecraft/versions/").mkdirs();
|
||||||
"Please create a `FastAsyncWorldEdit/textures` folder with `.minecraft/versions/1.15.jar` jar or mods in it. If the file exists, please make sure the server has read access to the directory");
|
try (BufferedInputStream in = new BufferedInputStream(new URL("https://launcher.mojang.com/v1/objects/37fd3c903861eeff3bc24b71eed48f828b5269c8/client.jar").openStream());
|
||||||
|
FileOutputStream fileOutputStream = new FileOutputStream(Fawe.imp().getDirectory() + "/" + Settings.IMP.PATHS.TEXTURES + "/" + "/.minecraft/versions/1.16.5.jar")) {
|
||||||
|
byte[] dataBuffer = new byte[1024];
|
||||||
|
int bytesRead;
|
||||||
|
while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) {
|
||||||
|
fileOutputStream.write(dataBuffer, 0, bytesRead);
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("Could not download version jar. Please do so manually by creating a `FastAsyncWorldEdit/textures` folder with `.minecraft/versions` jar or mods in it.");
|
||||||
|
log.error("If the file exists, please make sure the server has read access to the directory.");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
ZipFile zipFile = new ZipFile(file);
|
ZipFile zipFile = new ZipFile(file);
|
||||||
|
@ -125,7 +125,7 @@ public class UtilityCommands {
|
|||||||
@Command(
|
@Command(
|
||||||
name = "/heightmapinterface",
|
name = "/heightmapinterface",
|
||||||
aliases = { "/hmi", "hmi" },
|
aliases = { "/hmi", "hmi" },
|
||||||
desc = "Generate the heightmap interface: https://github.com/boy0001/HeightMap"
|
desc = "Generate the heightmap interface: https://github.com/IntellectualSites/HeightMap"
|
||||||
)
|
)
|
||||||
@CommandPermissions("fawe.admin")
|
@CommandPermissions("fawe.admin")
|
||||||
public void heightmapInterface(Player player, @Arg(name = "min", desc = "int", def = "100") int min, @Arg(name = "max", desc = "int", def = "200") int max) throws IOException {
|
public void heightmapInterface(Player player, @Arg(name = "min", desc = "int", def = "100") int min, @Arg(name = "max", desc = "int", def = "200") int max) throws IOException {
|
||||||
|
@ -471,7 +471,7 @@ public final class PlatformCommandManager {
|
|||||||
registerSubCommands(
|
registerSubCommands(
|
||||||
"/anvil",
|
"/anvil",
|
||||||
ImmutableList.of(),
|
ImmutableList.of(),
|
||||||
"Manipulate billions of blocks https://github.com/boy0001/FastAsyncWorldedit/wiki/Anvil-API",
|
"Manipulate billions of blocks",
|
||||||
AnvilCommandsRegistration.builder(),
|
AnvilCommandsRegistration.builder(),
|
||||||
new AnvilCommands(worldEdit)
|
new AnvilCommands(worldEdit)
|
||||||
);
|
);
|
||||||
|
@ -5,9 +5,13 @@ repositories {
|
|||||||
maven {
|
maven {
|
||||||
name = "SpigotMC"
|
name = "SpigotMC"
|
||||||
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||||
|
content {
|
||||||
|
includeGroup("org.bukkit")
|
||||||
|
includeGroup("org.spigotmc")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shade"("net.kyori:text-adapter-bukkit:${Versions.TEXT_EXTRAS}")
|
"shade"("net.kyori:text-adapter-bukkit:3.0.6")
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
applyLibrariesConfiguration()
|
applyLibrariesConfiguration()
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shade"("org.enginehub.piston.core-ap:annotations:${Versions.PISTON}")
|
"shade"("org.enginehub.piston.core-ap:annotations:0.5.6")
|
||||||
"shade"("org.enginehub.piston.core-ap:processor:${Versions.PISTON}")
|
"shade"("org.enginehub.piston.core-ap:processor:0.5.6")
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
applyLibrariesConfiguration()
|
applyLibrariesConfiguration()
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shade"("net.kyori:text-api:${Versions.TEXT}")
|
"shade"("net.kyori:text-api:3.0.4")
|
||||||
"shade"("net.kyori:text-serializer-gson:${Versions.TEXT}")
|
"shade"("net.kyori:text-serializer-gson:3.0.4")
|
||||||
"shade"("net.kyori:text-serializer-legacy:${Versions.TEXT}")
|
"shade"("net.kyori:text-serializer-legacy:3.0.4")
|
||||||
"shade"("net.kyori:text-serializer-plain:${Versions.TEXT}")
|
"shade"("net.kyori:text-serializer-plain:3.0.4")
|
||||||
"shade"("com.sk89q:jchronic:0.2.4a") {
|
"shade"("com.sk89q:jchronic:0.2.4a") {
|
||||||
exclude(group = "junit", module = "junit")
|
exclude(group = "junit", module = "junit")
|
||||||
}
|
}
|
||||||
"shade"("com.thoughtworks.paranamer:paranamer:2.6")
|
"shade"("com.thoughtworks.paranamer:paranamer:2.6")
|
||||||
"shade"("com.github.luben:zstd-jni:1.4.8-1")
|
"shade"("com.github.luben:zstd-jni:1.4.8-1")
|
||||||
"shade"("com.sk89q.lib:jlibnoise:1.0.0")
|
"shade"("com.sk89q.lib:jlibnoise:1.0.0")
|
||||||
"shade"("org.enginehub.piston:core:${Versions.PISTON}")
|
"shade"("org.enginehub.piston:core:0.5.6")
|
||||||
"shade"("org.enginehub.piston.core-ap:runtime:${Versions.PISTON}")
|
"shade"("org.enginehub.piston.core-ap:runtime:0.5.6")
|
||||||
"shade"("org.enginehub.piston:default-impl:${Versions.PISTON}")
|
"shade"("org.enginehub.piston:default-impl:0.5.6")
|
||||||
}
|
}
|
||||||
|
@ -8,5 +8,5 @@ repositories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
"shade"("net.kyori:text-adapter-spongeapi:${Versions.TEXT_EXTRAS}")
|
"shade"("net.kyori:text-adapter-spongeapi:3.0.6")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user