mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
Initialize FancyDialogs plugin
This commit is contained in:
7
plugins/fancydialogs/CHANGELOG-SNAPSHOT.md
Normal file
7
plugins/fancydialogs/CHANGELOG-SNAPSHOT.md
Normal file
@@ -0,0 +1,7 @@
|
||||
Commit hash: %COMMIT_HASH%
|
||||
|
||||
Commit message: %COMMIT_MESSAGE%
|
||||
|
||||
*(The last commit message does not always directly reflect the changes related to this version.)*
|
||||
|
||||
Keep in mind that this is a snapshot version. Snapshot versions are **not** meant to be used in production. They are for **testing purposes only** and may contain bugs or incomplete features. Use at your own risk.
|
||||
3
plugins/fancydialogs/CHANGELOG.md
Normal file
3
plugins/fancydialogs/CHANGELOG.md
Normal file
@@ -0,0 +1,3 @@
|
||||
- Added support for Minecraft 1.21.5
|
||||
- Refactored config structure
|
||||
- Added `update_visibility_interval` config option
|
||||
1
plugins/fancydialogs/VERSION
Normal file
1
plugins/fancydialogs/VERSION
Normal file
@@ -0,0 +1 @@
|
||||
0.0.0
|
||||
184
plugins/fancydialogs/build.gradle.kts
Normal file
184
plugins/fancydialogs/build.gradle.kts
Normal file
@@ -0,0 +1,184 @@
|
||||
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
||||
import net.minecrell.pluginyml.paper.PaperPluginDescription
|
||||
|
||||
plugins {
|
||||
id("java-library")
|
||||
id("maven-publish")
|
||||
|
||||
id("xyz.jpenilla.run-paper")
|
||||
id("com.gradleup.shadow")
|
||||
id("net.minecrell.plugin-yml.paper")
|
||||
id("io.papermc.hangar-publish-plugin")
|
||||
id("com.modrinth.minotaur")
|
||||
}
|
||||
|
||||
runPaper.folia.registerTask()
|
||||
|
||||
val supportedVersions =
|
||||
listOf(
|
||||
"1.21.5",
|
||||
)
|
||||
|
||||
//allprojects {
|
||||
// group = "de.oliver"
|
||||
// version = getFDVersion()
|
||||
// description = "Simple, lightweight and fast dialog plugin using the new dialog feature"
|
||||
//
|
||||
// repositories {
|
||||
// mavenLocal()
|
||||
// mavenCentral()
|
||||
//
|
||||
// maven(url = "https://repo.papermc.io/repository/maven-public/")
|
||||
// maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
||||
//
|
||||
// maven(url = "https://repo.fancyinnovations.com/snapshots")
|
||||
// maven(url = "https://repo.fancyinnovations.com/releases")
|
||||
// maven(url = "https://repo.lushplugins.org/releases")
|
||||
// maven(url = "https://repo.viaversion.com/")
|
||||
// maven(url = "https://repo.opencollab.dev/main/")
|
||||
// }
|
||||
//}
|
||||
|
||||
dependencies {
|
||||
compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
|
||||
|
||||
rootProject.subprojects
|
||||
.filter { it.path.startsWith(":libraries:packets:implementations") }
|
||||
.forEach { implementation(project(it.path)) }
|
||||
implementation(project(":libraries:packets:packets-api"))
|
||||
implementation(project(":libraries:packets:factories"))
|
||||
implementation(project(":libraries:common"))
|
||||
implementation(project(":libraries:jdb"))
|
||||
implementation("de.oliver.FancyAnalytics:api:0.1.6")
|
||||
implementation("de.oliver.FancyAnalytics:logger:0.0.6")
|
||||
|
||||
compileOnly("org.lushplugins:ChatColorHandler:5.1.3")
|
||||
}
|
||||
|
||||
paper {
|
||||
name = "FancyDialogs"
|
||||
main = "com.fancyinnovations.fancydialogs.FancyDialogsPlugin"
|
||||
bootstrapper = "com.fancyinnovations.fancydialogs.loaders.FancyDialogsBootstrapper"
|
||||
loader = "com.fancyinnovations.fancydialogs.loaders.FancyDialogsLoader"
|
||||
foliaSupported = true
|
||||
version = getFDVersion()
|
||||
description = "Simple, lightweight and fast dialog plugin using the new dialog feature"
|
||||
apiVersion = "1.21"
|
||||
load = BukkitPluginDescription.PluginLoadOrder.POSTWORLD
|
||||
serverDependencies {
|
||||
register("MiniPlaceholders") {
|
||||
required = false
|
||||
load = PaperPluginDescription.RelativeLoadOrder.BEFORE
|
||||
}
|
||||
register("PlaceholderAPI") {
|
||||
required = false
|
||||
load = PaperPluginDescription.RelativeLoadOrder.BEFORE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
runServer {
|
||||
minecraftVersion("1.21.5")
|
||||
|
||||
downloadPlugins {
|
||||
modrinth("fancynpcs", "2.5.0")
|
||||
hangar("ViaVersion", "5.3.2")
|
||||
hangar("ViaBackwards", "5.3.2")
|
||||
// modrinth("multiverse-core", "4.3.11")
|
||||
hangar("PlaceholderAPI", "2.11.6")
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveClassifier.set("")
|
||||
archiveBaseName.set("FancyDialogs")
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
|
||||
options.release = 21
|
||||
// For cloud-annotations, see https://cloud.incendo.org/annotations/#command-components
|
||||
options.compilerArgs.add("-parameters")
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
|
||||
}
|
||||
|
||||
processResources {
|
||||
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
|
||||
|
||||
val props = mapOf(
|
||||
"description" to project.description,
|
||||
"version" to getFDVersion(),
|
||||
"hash" to gitCommitHash.get(),
|
||||
"build" to (System.getenv("BUILD_ID") ?: "").ifEmpty { "undefined" }
|
||||
)
|
||||
|
||||
inputs.properties(props)
|
||||
|
||||
filesMatching("paper-plugin.yml") {
|
||||
expand(props)
|
||||
}
|
||||
|
||||
filesMatching("version.yml") {
|
||||
expand(props)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.publishAllPublicationsToHangar {
|
||||
dependsOn("shadowJar")
|
||||
}
|
||||
|
||||
tasks.modrinth {
|
||||
dependsOn("shadowJar")
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
}
|
||||
|
||||
val gitCommitHash: Provider<String> = providers.exec {
|
||||
commandLine("git", "rev-parse", "HEAD")
|
||||
}.standardOutput.asText.map { it.trim() }
|
||||
|
||||
val gitCommitMessage: Provider<String> = providers.exec {
|
||||
commandLine("git", "log", "-1", "--pretty=%B")
|
||||
}.standardOutput.asText.map { it.trim() }
|
||||
|
||||
fun getFDVersion(): String {
|
||||
return file("VERSION").readText()
|
||||
}
|
||||
|
||||
hangarPublish {
|
||||
publications.register("plugin") {
|
||||
version = project.version as String
|
||||
id = "FancyDialogs"
|
||||
channel = "Alpha"
|
||||
|
||||
apiKey.set(System.getenv("HANGAR_PUBLISH_API_TOKEN"))
|
||||
|
||||
platforms {
|
||||
paper {
|
||||
jar = tasks.shadowJar.flatMap { it.archiveFile }
|
||||
platformVersions = supportedVersions
|
||||
}
|
||||
}
|
||||
|
||||
changelog = gitCommitMessage.get()
|
||||
}
|
||||
}
|
||||
|
||||
modrinth {
|
||||
token.set(System.getenv("MODRINTH_PUBLISH_API_TOKEN"))
|
||||
projectId.set("FancyDialogs")
|
||||
versionNumber.set(getFDVersion())
|
||||
versionType.set("alpha")
|
||||
uploadFile.set(file("build/libs/${project.name}-${getFDVersion()}.jar"))
|
||||
gameVersions.addAll(supportedVersions)
|
||||
loaders.add("paper")
|
||||
loaders.add("folia")
|
||||
changelog.set(gitCommitMessage.get())
|
||||
}
|
||||
16
plugins/fancydialogs/release_deployment_config.json
Normal file
16
plugins/fancydialogs/release_deployment_config.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"project_name": "FancyDialogs",
|
||||
"project_id": "TODO",
|
||||
"plugin_jar_path": "../../../../plugins/fancydialogs/build/libs/FancyDialogs-%VERSION%.jar",
|
||||
"changelog_path": "../../../../plugins/fancydialogs/CHANGELOG.md",
|
||||
"version_path": "../../../../plugins/fancydialogs/VERSION",
|
||||
"supported_versions":[
|
||||
"1.21.5"
|
||||
],
|
||||
"channel": "RELEASE",
|
||||
"loaders": [
|
||||
"paper",
|
||||
"folia"
|
||||
],
|
||||
"featured": false
|
||||
}
|
||||
16
plugins/fancydialogs/snapshot_deployment_config.json
Normal file
16
plugins/fancydialogs/snapshot_deployment_config.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"project_name": "FancyDialogs",
|
||||
"project_id": "TODO",
|
||||
"plugin_jar_path": "../../../../plugins/fancydialogs/build/libs/FancyDialogs-%VERSION%.jar",
|
||||
"changelog_path": "../../../../plugins/fancydialogs/CHANGELOG-SNAPSHOT.md",
|
||||
"version_path": "../../../../plugins/fancydialogs/VERSION",
|
||||
"supported_versions":[
|
||||
"1.21.5"
|
||||
],
|
||||
"channel": "ALPHA",
|
||||
"loaders": [
|
||||
"paper",
|
||||
"folia"
|
||||
],
|
||||
"featured": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.fancyinnovations.fancydialogs;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class FancyDialogsPlugin extends JavaPlugin {
|
||||
|
||||
private static FancyDialogsPlugin INSTANCE;
|
||||
|
||||
public FancyDialogsPlugin() {
|
||||
INSTANCE = this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
|
||||
public static FancyDialogsPlugin getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.fancyinnovations.fancydialogs.loaders;
|
||||
|
||||
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
|
||||
import io.papermc.paper.plugin.bootstrap.PluginBootstrap;
|
||||
import io.papermc.paper.plugin.bootstrap.PluginProviderContext;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class FancyDialogsBootstrapper implements PluginBootstrap {
|
||||
@Override
|
||||
public void bootstrap(@NotNull BootstrapContext bootstrapContext) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull JavaPlugin createPlugin(@NotNull PluginProviderContext context) {
|
||||
return PluginBootstrap.super.createPlugin(context);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.fancyinnovations.fancydialogs.loaders;
|
||||
|
||||
import io.papermc.paper.plugin.loader.PluginClasspathBuilder;
|
||||
import io.papermc.paper.plugin.loader.PluginLoader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class FancyDialogsLoader implements PluginLoader {
|
||||
@Override
|
||||
public void classloader(@NotNull PluginClasspathBuilder pluginClasspathBuilder) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,8 @@ include(":plugins:fancyholograms:implementation_1_19_4")
|
||||
|
||||
include(":plugins:fancyvisuals")
|
||||
|
||||
include(":plugins:fancydialogs")
|
||||
|
||||
include(":libraries:common")
|
||||
include(":libraries:jdb")
|
||||
include(":libraries:plugin-tests")
|
||||
|
||||
Reference in New Issue
Block a user