The CLI is not a plugin... but now it technically is?

Dieser Commit ist enthalten in:
NotMyFault 2021-07-22 22:11:43 +02:00
Ursprung 6acd8498b2
Commit 39a3c83801
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 158F5701A6AAD00C
3 geänderte Dateien mit 36 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,9 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
plugins { plugins {
`java-library` `java-library`
id("net.minecrell.plugin-yml.bukkit") version "0.4.0"
} }
project.description = "CLI" project.description = "CLI"
@ -30,7 +32,7 @@ tasks.named<ShadowJar>("shadowJar") {
dependencies { dependencies {
include { true } include { true }
} }
archiveFileName.set("${rootProject.name}-${project.description}-${project.version}.${archiveExtension.getOrElse("jar")}") archiveFileName.set(moduleIdentifier)
minimize { minimize {
exclude(dependency("org.apache.logging.log4j:log4j-core")) exclude(dependency("org.apache.logging.log4j:log4j-core"))
} }
@ -39,3 +41,22 @@ tasks.named<ShadowJar>("shadowJar") {
tasks.named("assemble").configure { tasks.named("assemble").configure {
dependsOn("shadowJar") dependsOn("shadowJar")
} }
val moduleIdentifier = "${rootProject.name}-${project.description}-${project.version}.jar"
val decoration = "\n****************************************"
val websiteURL = "https://www.spigotmc.org/resources/13932/"
bukkit {
name = "FastAsyncWorldEdit-COMMAND_LINE_INTERFACE_NOT_A_PLUGIN"
main = "com.sk89q.worldedit.cli.AccessPoint"
apiVersion = decoration +
"\n* 404 - Plugin Not Found.\n" +
"* You installed the command line interface (CLI) which is not a plugin.\n" +
"* Stop your server, delete `$moduleIdentifier`" +
" and download the proper one from:\n" +
"* $websiteURL\n" +
"* (contains `-Bukkit-` instead of `-CLI-` in the name ;)" +
decoration
version = rootProject.version.toString()
website = websiteURL
}

Datei anzeigen

@ -0,0 +1,8 @@
package com.sk89q.worldedit.cli;
/**
* This is a dummy class doing nothing but being
* annoying, if you try to use the CLI as plugin.
*/
public class AccessPoint {
}

Datei anzeigen

@ -0,0 +1,6 @@
/**
* The following classes are FAWE additions:
*
* @see com.sk89q.worldedit.cli.AccessPoint
*/
package com.sk89q.worldedit.cli;