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

This commit is contained in:
NotMyFault 2021-07-22 22:11:43 +02:00
parent 6acd8498b2
commit 39a3c83801
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
3 changed files with 36 additions and 1 deletions

View File

@ -1,7 +1,9 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
plugins {
`java-library`
id("net.minecrell.plugin-yml.bukkit") version "0.4.0"
}
project.description = "CLI"
@ -30,7 +32,7 @@ tasks.named<ShadowJar>("shadowJar") {
dependencies {
include { true }
}
archiveFileName.set("${rootProject.name}-${project.description}-${project.version}.${archiveExtension.getOrElse("jar")}")
archiveFileName.set(moduleIdentifier)
minimize {
exclude(dependency("org.apache.logging.log4j:log4j-core"))
}
@ -39,3 +41,22 @@ tasks.named<ShadowJar>("shadowJar") {
tasks.named("assemble").configure {
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
}

View File

@ -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 {
}

View File

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