Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from Crazy-Crew/dev
A few plugin enhancements here & there.
- Loading branch information
Showing
51 changed files
with
1,594 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: "Bug Report" | ||
description: "Create a report to help us improve the plugin." | ||
title: "[Bug Report]: " | ||
labels: ["bug"] | ||
|
||
assignees: | ||
- ryderbelserion | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Note: Search to see if an issue already exists for the bug you are reporting. | ||
What plugin version are you on? Type /version `plugin-name` | ||
Add any gif / imgur links if need be. Markdown is supported! | ||
If you have any large stack traces / errors, Please use https://mclo.gs/ | ||
Spark Profiler > https://spark.lucko.me/download | ||
- type: input | ||
attributes: | ||
label: Spark link | ||
description: We ask that Spark profilings are shared through a link, not a screenshot. Screenshots inhibit our ability to figure out the real cause of the issue. | ||
placeholder: Output of /spark profiler --timeout 300 | ||
validations: | ||
required: false | ||
- type: dropdown | ||
id: version | ||
attributes: | ||
label: Server Version | ||
description: What server version are you on? | ||
options: | ||
- 1.8.8 | ||
- 1.12.2 | ||
- 1.16.5 | ||
- 1.19.3 | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: platform | ||
attributes: | ||
label: Server Platform | ||
description: What server platform are you using? | ||
options: | ||
- Spigot | ||
- Paper | ||
- Purpur | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: bug | ||
attributes: | ||
label: Describe the bug | ||
description: A clear and concise description of what the bug is. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: steps | ||
attributes: | ||
label: Steps to reproduce | ||
description: Steps to reproduce the behavior. | ||
placeholder: | | ||
1. Go to '...' | ||
2. Change value in placeholder.yml '...' | ||
3. Run command '...' | ||
4. See error | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: context | ||
attributes: | ||
label: Additional context | ||
description: Add any other context about the problem here. | ||
validations: | ||
required: false | ||
- type: checkboxes | ||
attributes: | ||
label: Agreements | ||
description: Please agree to the following. | ||
options: | ||
- label: I have searched for and ensured there isn't already an open issue regarding this. | ||
required: true | ||
- label: I ticked all the boxes without actually reading them | ||
required: false | ||
- label: My version of Minecraft is supported by CrazyCrew. | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
.gradle | ||
.idea | ||
build | ||
|
||
server | ||
builds | ||
buildSrc/.gradle | ||
buildSrc/build | ||
|
||
platforms/paper/build | ||
platforms/paper/run/* | ||
|
||
!platforms/paper/run/eula.txt | ||
!platforms/paper/run/bukkit.yml | ||
!platforms/paper/run/spigot.yml | ||
!platforms/paper/run/server.properties | ||
!platforms/paper/run/config | ||
|
||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,136 +1,47 @@ | ||
plugins { | ||
`java-library` | ||
|
||
`maven-publish` | ||
|
||
id("com.modrinth.minotaur") version "2.6.0" | ||
|
||
id("com.github.johnrengelman.shadow") version "7.1.2" | ||
} | ||
|
||
repositories { | ||
/** | ||
* Placeholders | ||
*/ | ||
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") | ||
|
||
/** | ||
* NBT API | ||
*/ | ||
maven("https://repo.codemc.org/repository/maven-public/") | ||
|
||
/** | ||
* Paper Team | ||
*/ | ||
maven("https://repo.papermc.io/repository/maven-public/") | ||
|
||
/** | ||
* Everything else we need. | ||
*/ | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("de.tr7zw", "nbt-data-api", "2.11.0") | ||
|
||
implementation("org.bstats", "bstats-bukkit", "3.0.0") | ||
|
||
compileOnly("io.papermc.paper", "paper-api", "${project.extra["minecraft_version"]}-R0.1-SNAPSHOT") | ||
|
||
compileOnly("me.clip", "placeholderapi", "2.11.2") { | ||
exclude(group = "org.spigotmc") | ||
exclude(group = "org.bukkit") | ||
} | ||
} | ||
|
||
java { | ||
toolchain.languageVersion.set(JavaLanguageVersion.of(project.extra["java_version"].toString())) | ||
} | ||
|
||
val isBeta: Boolean = extra["isBeta"].toString().toBoolean() | ||
import task.WebhookExtension | ||
import java.awt.Color | ||
|
||
fun getPluginVersion(): String { | ||
return if (isBeta) "${project.version}-BETA" else project.version.toString() | ||
} | ||
|
||
fun getPluginVersionType(): String { | ||
return if (isBeta) "beta" else "release" | ||
plugins { | ||
id("crazyvouchers.root-plugin") | ||
} | ||
|
||
tasks { | ||
shadowJar { | ||
archiveFileName.set("${rootProject.name}-${getPluginVersion()}.jar") | ||
|
||
listOf( | ||
"de.tr7zw", | ||
"org.bstats" | ||
).forEach { | ||
relocate(it, "${project.group}.plugin.lib.$it") | ||
} | ||
} | ||
|
||
modrinth { | ||
token.set(System.getenv("MODRINTH_TOKEN")) | ||
projectId.set(rootProject.name.toLowerCase()) | ||
|
||
versionName.set("${rootProject.name} ${getPluginVersion()}") | ||
versionNumber.set(getPluginVersion()) | ||
|
||
versionType.set(getPluginVersionType()) | ||
val releaseUpdate = Color(27, 217, 106) | ||
val betaUpdate = Color(255, 163, 71) | ||
|
||
uploadFile.set(shadowJar.get()) | ||
val beta = settings.versions.beta.get().toBoolean() | ||
val extension = settings.versions.extension.get() | ||
|
||
autoAddDependsOn.set(true) | ||
val color = if (beta) betaUpdate else releaseUpdate | ||
val repo = if (beta) "beta" else "releases" | ||
|
||
gameVersions.addAll(listOf("1.18", "1.18.1", "1.18.2", "1.19", "1.19.1", "1.19.2", "1.19.3")) | ||
loaders.addAll(listOf("paper", "purpur")) | ||
webhook { | ||
this.avatar("https://en.gravatar.com/avatar/${WebhookExtension.Gravatar().md5Hex("no-reply@ryderbelserion.com")}.jpeg") | ||
|
||
//<h3>The first release for CrazyVouchers on Modrinth! 🎉🎉🎉🎉🎉<h3><br> If we want a header. | ||
changelog.set(""" | ||
<h4>Changes:</h4> | ||
<p>Added 1.18.2 support.</p> | ||
<h4>Bug Fixes:</h4> | ||
<p>N/A</p> | ||
""".trimIndent()) | ||
} | ||
this.username("Ryder Belserion") | ||
|
||
compileJava { | ||
options.release.set(project.extra["java_version"].toString().toInt()) | ||
} | ||
this.content("New version of ${rootProject.name} is ready! <@&1029922295210311681>") | ||
|
||
processResources { | ||
filesMatching("plugin.yml") { | ||
expand( | ||
"name" to rootProject.name, | ||
"group" to project.group, | ||
"version" to getPluginVersion(), | ||
"description" to project.description, | ||
"website" to "https://modrinth.com/plugin/${rootProject.name.toLowerCase()}" | ||
) | ||
} | ||
} | ||
} | ||
this.embeds { | ||
this.embed { | ||
this.color(color) | ||
|
||
publishing { | ||
val mavenExt: String = if (isBeta) "beta" else "releases" | ||
this.fields { | ||
this.field( | ||
"Version ${rootProject.version}", | ||
"Download Link: https://modrinth.com/$extension/${rootProject.name.lowercase()}/version/${rootProject.version}" | ||
) | ||
|
||
repositories { | ||
maven("https://repo.crazycrew.us/$mavenExt") { | ||
name = "crazycrew" | ||
//credentials(PasswordCredentials::class) | ||
credentials { | ||
username = System.getenv("REPOSITORY_USERNAME") | ||
password = System.getenv("REPOSITORY_PASSWORD") | ||
this.field( | ||
"API Update", | ||
"Version ${rootProject.version} has been pushed to https://repo.crazycrew.us/#/$repo" | ||
) | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
create<MavenPublication>("maven") { | ||
groupId = "${project.group}" | ||
artifactId = rootProject.name.toLowerCase() | ||
version = getPluginVersion() | ||
from(components["java"]) | ||
this.author( | ||
rootProject.name, | ||
"https://modrinth.com/$extension/${rootProject.name.lowercase()}/versions", | ||
"https://cdn-raw.modrinth.com/data/EMORKQjj/1cf7fffa9bf92d1bc292983dc320984cc764b51e.png" | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10") | ||
implementation("gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1") | ||
implementation("com.github.johnrengelman:shadow:8.1.0") | ||
|
||
// For the webhook tasks, this applies to the buildSrc only | ||
val ktor = "2.2.4" | ||
|
||
implementation("io.ktor:ktor-client-core-jvm:$ktor") | ||
implementation("io.ktor:ktor-client-cio-jvm:$ktor") | ||
implementation("io.ktor:ktor-client-content-negotiation:$ktor") | ||
implementation("io.ktor:ktor-serialization-gson:$ktor") | ||
|
||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dependencyResolutionManagement { | ||
repositories.gradlePluginPortal() | ||
} |
15 changes: 15 additions & 0 deletions
15
buildSrc/src/main/kotlin/crazyvouchers.paper-plugin.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
plugins { | ||
id("crazyvouchers.root-plugin") | ||
} | ||
|
||
repositories { | ||
/** | ||
* Paper Team | ||
*/ | ||
maven("https://repo.papermc.io/repository/maven-public/") | ||
|
||
/** | ||
* NBT API | ||
*/ | ||
maven("https://repo.codemc.io/repository/maven-public/") | ||
} |
Oops, something went wrong.