diff --git a/.gitignore b/.gitignore index a1c2a23..942d446 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,10 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* + +gradle.properties +*.properties + +build/* +.gradle/* +.idea/* diff --git a/.gradle/7.2/executionHistory/executionHistory.bin b/.gradle/7.2/executionHistory/executionHistory.bin index 7284949..0a5affe 100644 Binary files a/.gradle/7.2/executionHistory/executionHistory.bin and b/.gradle/7.2/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.2/executionHistory/executionHistory.lock b/.gradle/7.2/executionHistory/executionHistory.lock index 63b1f11..4f6734c 100644 Binary files a/.gradle/7.2/executionHistory/executionHistory.lock and b/.gradle/7.2/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.2/fileHashes/fileHashes.bin b/.gradle/7.2/fileHashes/fileHashes.bin index c9a7de0..31ea1af 100644 Binary files a/.gradle/7.2/fileHashes/fileHashes.bin and b/.gradle/7.2/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.2/fileHashes/fileHashes.lock b/.gradle/7.2/fileHashes/fileHashes.lock index b83ae0a..3d698a9 100644 Binary files a/.gradle/7.2/fileHashes/fileHashes.lock and b/.gradle/7.2/fileHashes/fileHashes.lock differ diff --git a/.gradle/7.2/fileHashes/resourceHashesCache.bin b/.gradle/7.2/fileHashes/resourceHashesCache.bin index 7a17eab..2cd64a1 100644 Binary files a/.gradle/7.2/fileHashes/resourceHashesCache.bin and b/.gradle/7.2/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 4e5616a..3e48be8 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index 2d8f3a8..8f81b67 100644 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock index 602018d..71a0e24 100644 Binary files a/.gradle/checksums/checksums.lock and b/.gradle/checksums/checksums.lock differ diff --git a/.gradle/checksums/md5-checksums.bin b/.gradle/checksums/md5-checksums.bin index c951867..3ea52c5 100644 Binary files a/.gradle/checksums/md5-checksums.bin and b/.gradle/checksums/md5-checksums.bin differ diff --git a/.gradle/checksums/sha1-checksums.bin b/.gradle/checksums/sha1-checksums.bin index 9e4e330..9997299 100644 Binary files a/.gradle/checksums/sha1-checksums.bin and b/.gradle/checksums/sha1-checksums.bin differ diff --git a/.idea/kotlinScripting.xml b/.idea/kotlinScripting.xml new file mode 100644 index 0000000..73034c4 --- /dev/null +++ b/.idea/kotlinScripting.xml @@ -0,0 +1,33 @@ + + + + + 0 + true + + + 1 + true + + + 2 + true + + + 3 + true + + + 4 + true + + + 5 + true + + + 6 + true + + + \ No newline at end of file diff --git a/README.md b/README.md index 61e2256..f9d31d5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,24 @@ # SimplexCL +This is an abstracted command system designed to make Paper's default command loading and building cleaner and prettier. There are numerous things you can do, and a Javadoc will be provided soon. Everything inside the plugin is docced and you can find doccing in the source as well. + +To use this in your plugin, simply add the following to your build.gradle: + + +plugins { + id "com.github.johnrengelman.shadow" version "7.1.2" +} + + +repositories { + maven { + name = 'sonatype' + url = 'https://s01.oss.sonatype.org/content/groups/public/' + } +} + + +dependencies { + shadow 'io.github.simplexdevelopment:SimplexCL:1.0.0' +} + \ No newline at end of file diff --git a/build.gradle b/build.gradle index ef5c84c..923e7a8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,48 +1,91 @@ /* - * This file was generated by the Gradle 'init' task. + * This file was generated by the Gradle "init" task. */ plugins { - id 'java' - id 'maven-publish' - id 'com.github.johnrengelman.shadow' version '7.1.2' + id ("java") + id ("maven-publish") + id ("signing") } -apply plugin: 'com.github.johnrengelman.shadow' -apply plugin: 'java' - -tasks { - build { - dependsOn(shadowJar) - } +java { + withSourcesJar() + withJavadocJar() } repositories { mavenLocal() maven { - url = uri('https://papermc.io/repo/repository/maven-public/') + url = uri("https://papermc.io/repo/repository/maven-public/") } maven { - url = uri('https://oss.sonatype.org/content/groups/public/') + url = uri("https://oss.sonatype.org/content/groups/public/") } maven { - url = uri('https://repo.maven.apache.org/maven2/') + url = uri("https://repo.maven.apache.org/maven2/") } mavenCentral() } dependencies { - shadow 'org.reflections:reflections:0.10.2' - compileOnly 'io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT' + compileOnly ("io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT") } -group = 'io.github.simplex' -version = '1.0.0' -description = 'SimplexCL' +group = ("io.github.simplex") +version = ("1.0.0") +description = ("SimplexCL") java.sourceCompatibility = JavaVersion.VERSION_17 -tasks.withType(JavaCompile) { - options.encoding = 'UTF-8' -} +// Because the components are created only during the afterEvaluate phase, you must +// configure your publications using the afterEvaluate() lifecycle method. + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.java + groupId = 'io.github.simplexdevelopment' + artifactId = 'SimplexCL' + version = '1.0.0' + pom { + signing { + sign publishing.publications.release + sign configurations.archives + } + name = 'SimplexCL' + description = 'A better alternative to Paper\'s Command Loader' + url = 'https://simplexdev.app' + licenses { + license { + name = 'MIT License' + url = 'https://opensource.org/licenses/MIT' + } + } + developers { + developer { + id = 'SimplexDevelopment' + name = 'Simplex Development Group' + email = 'reillypaul195@gmail.com' + } + } + scm { + connection = 'scm:git:git://github.com/SimplexDevelopment/SimplexCL.git' + developerConnection = 'scm:git:ssh://github.com/SimplexDevelopment/SimplexCL.git' + url = 'https://github.com/SimplexDevelopment/SimplexCL' + } + } + } + } + repositories { + maven { + url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") + credentials { + username = '' + password = '' + } + } + } + } +} \ No newline at end of file diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index 6e51dbf..8924f47 100644 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/build/tmp/shadowJar/MANIFEST.MF b/build/tmp/shadowJar/MANIFEST.MF deleted file mode 100644 index 972ef8d..0000000 --- a/build/tmp/shadowJar/MANIFEST.MF +++ /dev/null @@ -1,4 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: reflections-0.10.2.jar javassist-3.28.0-GA.jar jsr305-3.0.2. - jar slf4j-api-1.7.32.jar - diff --git a/settings.gradle b/settings.gradle index 9ce20d6..e3d86c8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,4 +2,4 @@ * This file was generated by the Gradle 'init' task. */ -rootProject.name = 'SimplexCL' +rootProject.name = ("SimplexCL") diff --git a/src/main/java/io/github/simplex/cl/CommandBase.java b/src/main/java/io/github/simplexdevelopment/cl/CommandBase.java similarity index 96% rename from src/main/java/io/github/simplex/cl/CommandBase.java rename to src/main/java/io/github/simplexdevelopment/cl/CommandBase.java index 7c66dfd..c383a71 100644 --- a/src/main/java/io/github/simplex/cl/CommandBase.java +++ b/src/main/java/io/github/simplexdevelopment/cl/CommandBase.java @@ -1,9 +1,9 @@ -package io.github.simplex.cl; +package io.github.simplexdevelopment.cl; -import io.github.simplex.cl.api.ICommand; -import io.github.simplex.cl.api.SubCommand; -import io.github.simplex.msgutils.AdvancedColors; -import io.github.simplex.msgutils.BasicColors; +import io.github.simplexdevelopment.cl.api.ICommand; +import io.github.simplexdevelopment.cl.api.SubCommand; +import io.github.simplexdevelopment.msgutils.AdvancedColors; +import io.github.simplexdevelopment.msgutils.BasicColors; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.TextComponent; import org.bukkit.Bukkit; diff --git a/src/main/java/io/github/simplex/cl/CommandLoader.java b/src/main/java/io/github/simplexdevelopment/cl/CommandLoader.java similarity index 96% rename from src/main/java/io/github/simplex/cl/CommandLoader.java rename to src/main/java/io/github/simplexdevelopment/cl/CommandLoader.java index 50062b3..6f0cd0d 100644 --- a/src/main/java/io/github/simplex/cl/CommandLoader.java +++ b/src/main/java/io/github/simplexdevelopment/cl/CommandLoader.java @@ -1,6 +1,6 @@ -package io.github.simplex.cl; +package io.github.simplexdevelopment.cl; -import io.github.simplex.cl.api.annotations.Info; +import io.github.simplexdevelopment.cl.api.annotations.Info; import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; diff --git a/src/main/java/io/github/simplex/cl/DummyCommand.java b/src/main/java/io/github/simplexdevelopment/cl/DummyCommand.java similarity index 97% rename from src/main/java/io/github/simplex/cl/DummyCommand.java rename to src/main/java/io/github/simplexdevelopment/cl/DummyCommand.java index c18b76c..890302a 100644 --- a/src/main/java/io/github/simplex/cl/DummyCommand.java +++ b/src/main/java/io/github/simplexdevelopment/cl/DummyCommand.java @@ -1,4 +1,4 @@ -package io.github.simplex.cl; +package io.github.simplexdevelopment.cl; import net.kyori.adventure.text.Component; import org.bukkit.command.Command; diff --git a/src/main/java/io/github/simplex/cl/Permissible.java b/src/main/java/io/github/simplexdevelopment/cl/Permissible.java similarity index 97% rename from src/main/java/io/github/simplex/cl/Permissible.java rename to src/main/java/io/github/simplexdevelopment/cl/Permissible.java index 946a472..4a814b9 100644 --- a/src/main/java/io/github/simplex/cl/Permissible.java +++ b/src/main/java/io/github/simplexdevelopment/cl/Permissible.java @@ -1,4 +1,4 @@ -package io.github.simplex.cl; +package io.github.simplexdevelopment.cl; import org.bukkit.command.CommandSender; diff --git a/src/main/java/io/github/simplex/cl/api/ICommand.java b/src/main/java/io/github/simplexdevelopment/cl/api/ICommand.java similarity index 93% rename from src/main/java/io/github/simplex/cl/api/ICommand.java rename to src/main/java/io/github/simplexdevelopment/cl/api/ICommand.java index a51db3c..2d06427 100644 --- a/src/main/java/io/github/simplex/cl/api/ICommand.java +++ b/src/main/java/io/github/simplexdevelopment/cl/api/ICommand.java @@ -1,4 +1,4 @@ -package io.github.simplex.cl.api; +package io.github.simplexdevelopment.cl.api; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; diff --git a/src/main/java/io/github/simplex/cl/api/SubCommand.java b/src/main/java/io/github/simplexdevelopment/cl/api/SubCommand.java similarity index 81% rename from src/main/java/io/github/simplex/cl/api/SubCommand.java rename to src/main/java/io/github/simplexdevelopment/cl/api/SubCommand.java index 1bbe3d2..5358495 100644 --- a/src/main/java/io/github/simplex/cl/api/SubCommand.java +++ b/src/main/java/io/github/simplexdevelopment/cl/api/SubCommand.java @@ -1,4 +1,4 @@ -package io.github.simplex.cl.api; +package io.github.simplexdevelopment.cl.api; @FunctionalInterface public interface SubCommand { diff --git a/src/main/java/io/github/simplex/cl/api/annotations/Info.java b/src/main/java/io/github/simplexdevelopment/cl/api/annotations/Info.java similarity index 91% rename from src/main/java/io/github/simplex/cl/api/annotations/Info.java rename to src/main/java/io/github/simplexdevelopment/cl/api/annotations/Info.java index a45285b..7177983 100644 --- a/src/main/java/io/github/simplex/cl/api/annotations/Info.java +++ b/src/main/java/io/github/simplexdevelopment/cl/api/annotations/Info.java @@ -1,4 +1,4 @@ -package io.github.simplex.cl.api.annotations; +package io.github.simplexdevelopment.cl.api.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/io/github/simplex/cl/impl/ExampleCommand.java b/src/main/java/io/github/simplexdevelopment/cl/impl/ExampleCommand.java similarity index 78% rename from src/main/java/io/github/simplex/cl/impl/ExampleCommand.java rename to src/main/java/io/github/simplexdevelopment/cl/impl/ExampleCommand.java index 2f3915f..9a6b2cb 100644 --- a/src/main/java/io/github/simplex/cl/impl/ExampleCommand.java +++ b/src/main/java/io/github/simplexdevelopment/cl/impl/ExampleCommand.java @@ -1,9 +1,9 @@ -package io.github.simplex.cl.impl; +package io.github.simplexdevelopment.cl.impl; -import io.github.simplex.cl.CommandBase; -import io.github.simplex.cl.api.annotations.Info; -import io.github.simplex.msgutils.AdvancedColors; -import io.github.simplex.msgutils.BasicColors; +import io.github.simplexdevelopment.cl.CommandBase; +import io.github.simplexdevelopment.cl.api.annotations.Info; +import io.github.simplexdevelopment.msgutils.AdvancedColors; +import io.github.simplexdevelopment.msgutils.BasicColors; import org.bukkit.command.CommandSender; @Info(name = "example", description = "An example command implementation to see how this works.", usage = "/example [info]", aliases = "ex, impl") diff --git a/src/main/java/io/github/simplex/msgutils/AdvancedColors.java b/src/main/java/io/github/simplexdevelopment/msgutils/AdvancedColors.java similarity index 97% rename from src/main/java/io/github/simplex/msgutils/AdvancedColors.java rename to src/main/java/io/github/simplexdevelopment/msgutils/AdvancedColors.java index f33433b..49a71d7 100644 --- a/src/main/java/io/github/simplex/msgutils/AdvancedColors.java +++ b/src/main/java/io/github/simplexdevelopment/msgutils/AdvancedColors.java @@ -1,4 +1,4 @@ -package io.github.simplex.msgutils; +package io.github.simplexdevelopment.msgutils; import net.kyori.adventure.text.format.TextColor; diff --git a/src/main/java/io/github/simplex/msgutils/BasicColors.java b/src/main/java/io/github/simplexdevelopment/msgutils/BasicColors.java similarity index 95% rename from src/main/java/io/github/simplex/msgutils/BasicColors.java rename to src/main/java/io/github/simplexdevelopment/msgutils/BasicColors.java index d21de3a..6c4a7f6 100644 --- a/src/main/java/io/github/simplex/msgutils/BasicColors.java +++ b/src/main/java/io/github/simplexdevelopment/msgutils/BasicColors.java @@ -1,4 +1,4 @@ -package io.github.simplex.msgutils; +package io.github.simplexdevelopment.msgutils; import net.kyori.adventure.text.format.TextColor; diff --git a/src/main/java/io/github/simplex/msgutils/TextFormatting.java b/src/main/java/io/github/simplexdevelopment/msgutils/TextFormatting.java similarity index 91% rename from src/main/java/io/github/simplex/msgutils/TextFormatting.java rename to src/main/java/io/github/simplexdevelopment/msgutils/TextFormatting.java index 009613a..65e738b 100644 --- a/src/main/java/io/github/simplex/msgutils/TextFormatting.java +++ b/src/main/java/io/github/simplexdevelopment/msgutils/TextFormatting.java @@ -1,4 +1,4 @@ -package io.github.simplex.msgutils; +package io.github.simplexdevelopment.msgutils; import net.kyori.adventure.text.format.TextDecoration; import net.kyori.adventure.text.format.TextFormat;