Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f59de86c5e | ||
|
|
0f1c69f8b2 | ||
|
|
f8deb9b7fb | ||
|
|
8428e2b124 | ||
|
|
8f91a1b445 | ||
|
|
0ca1f8f19d | ||
|
|
2fd3d41cbd | ||
|
|
ce201ba89e | ||
|
|
e33135d3c6 | ||
|
|
5f6e2789e2 | ||
|
|
add32b31e7 | ||
|
|
b2b2801907 | ||
|
|
c919c40a59 | ||
|
|
b3cc4bce5c | ||
|
|
6fdf75dd3d | ||
|
|
a8c2b0f23e | ||
|
|
0ee99d90f2 | ||
|
|
6623a5928e | ||
|
|
6532c03706 | ||
|
|
0bf3bfba7f | ||
|
|
f7094e0a77 | ||
|
|
563da7f255 | ||
|
|
51e599838d | ||
|
|
e4970016e4 | ||
|
|
2a04d0b2c8 | ||
|
|
f8c6c2db6f | ||
|
|
9e25b68d00 | ||
|
|
96b7d12743 | ||
|
|
328ad6cd39 | ||
|
|
c0ee968e5b |
No files matched your search
@@ -5,10 +5,15 @@ on:
|
||||
branches: [ "**" ]
|
||||
tags-ignore: [ "**" ]
|
||||
pull_request:
|
||||
release:
|
||||
types: [ released ]
|
||||
|
||||
jobs:
|
||||
call-build:
|
||||
uses: "jpenilla/actions/.github/workflows/shared-ci.yml@master"
|
||||
secrets: inherit
|
||||
with:
|
||||
artifacts-path: 'build/libs/*.jar'
|
||||
modrinth-publish: true
|
||||
hangar-publish: true
|
||||
loom: true
|
||||
@@ -8,8 +8,10 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation(libs.indraCommon)
|
||||
implementation(libs.indraLicenser)
|
||||
implementation(libs.shadow)
|
||||
implementation(libs.testLogger)
|
||||
implementation(libs.minotaur)
|
||||
implementation(libs.hangarPublishPlugin)
|
||||
|
||||
// https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
|
||||
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
||||
|
||||
@@ -2,7 +2,7 @@ import ca.stellardrift.build.configurate.ConfigFormats
|
||||
import ca.stellardrift.build.configurate.catalog.PolyglotVersionCatalogExtension
|
||||
|
||||
plugins {
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "5.0.1"
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "6.1.0"
|
||||
}
|
||||
|
||||
extensions.configure<PolyglotVersionCatalogExtension> {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.bundling.AbstractArchiveTask
|
||||
import org.gradle.kotlin.dsl.property
|
||||
|
||||
abstract class MiniMOTDPlatformExtension(project: Project) {
|
||||
val jarTask: Property<AbstractArchiveTask> = project.objects.property()
|
||||
interface MiniMOTDPlatformExtension {
|
||||
val jarTask: Property<AbstractArchiveTask>
|
||||
val hangar: Property<Boolean>
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import net.kyori.indra.git.IndraGitExtension
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.kotlin.dsl.the
|
||||
|
||||
fun Project.lastCommitHash(): String =
|
||||
@@ -8,3 +9,26 @@ fun Project.lastCommitHash(): String =
|
||||
|
||||
val Project.libs: LibrariesForLibs
|
||||
get() = the()
|
||||
|
||||
val Project.releaseNotes: Provider<String>
|
||||
get() = providers.environmentVariable("RELEASE_NOTES")
|
||||
|
||||
val Project.minecraftVersion
|
||||
get() = libs.versions.minecraft.get()
|
||||
|
||||
val bukkitVersions = listOf(
|
||||
"1.8.8",
|
||||
"1.8.9",
|
||||
"1.9.4",
|
||||
"1.10.2",
|
||||
"1.11.2",
|
||||
"1.12.2",
|
||||
"1.13.2",
|
||||
"1.14.4",
|
||||
"1.15.2",
|
||||
"1.16.5",
|
||||
"1.17.1",
|
||||
"1.18.2",
|
||||
"1.19.4",
|
||||
"1.20.2"
|
||||
)
|
||||
@@ -1,12 +1,9 @@
|
||||
import com.adarshr.gradle.testlogger.theme.ThemeType
|
||||
|
||||
plugins {
|
||||
id("java-library")
|
||||
id("net.kyori.indra")
|
||||
id("net.kyori.indra.git")
|
||||
id("net.kyori.indra.checkstyle")
|
||||
id("net.kyori.indra.license-header")
|
||||
id("com.adarshr.test-logger")
|
||||
id("net.kyori.indra.licenser.spotless")
|
||||
}
|
||||
|
||||
version = (version as String)
|
||||
@@ -21,24 +18,23 @@ indra {
|
||||
mitLicense()
|
||||
}
|
||||
|
||||
testlogger {
|
||||
theme = ThemeType.MOCHA_PARALLEL
|
||||
showPassed = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation(libs.jupiterEngine)
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
}
|
||||
|
||||
tasks {
|
||||
tasks {
|
||||
withType<JavaCompile> {
|
||||
options.compilerArgs.add("-Xlint:-processing")
|
||||
withType<JavaCompile> {
|
||||
options.compilerArgs.add("-Xlint:-processing")
|
||||
}
|
||||
sequenceOf(javadocJar, javadoc).forEach {
|
||||
it.configure {
|
||||
onlyIf { false }
|
||||
}
|
||||
sequenceOf(javadocJar, javadoc).forEach {
|
||||
it.configure {
|
||||
onlyIf { false }
|
||||
}
|
||||
}
|
||||
test {
|
||||
testLogging {
|
||||
events("passed")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,35 @@
|
||||
import io.papermc.hangarpublishplugin.model.Platforms
|
||||
|
||||
plugins {
|
||||
base
|
||||
id("io.papermc.hangar-publish-plugin")
|
||||
}
|
||||
|
||||
fun jar(platform: String) = project(":minimotd-$platform")
|
||||
.the<MiniMOTDPlatformExtension>().jarTask.flatMap { it.archiveFile }
|
||||
|
||||
hangarPublish.publications.register("plugin") {
|
||||
version.set(project.version as String)
|
||||
id.set("MiniMOTD")
|
||||
channel.set("Release")
|
||||
changelog.set(releaseNotes)
|
||||
apiKey.set(providers.environmentVariable("HANGAR_UPLOAD_KEY"))
|
||||
platforms {
|
||||
register(Platforms.PAPER) {
|
||||
jar.set(jar("bukkit"))
|
||||
val vers = bukkitVersions.toMutableList()
|
||||
vers -= "1.8.8"
|
||||
vers -= "1.8.9"
|
||||
vers += "1.8"
|
||||
platformVersions.addAll(vers)
|
||||
}
|
||||
register(Platforms.VELOCITY) {
|
||||
jar.set(jar("velocity"))
|
||||
platformVersions.addAll("3.2")
|
||||
}
|
||||
register(Platforms.WATERFALL) {
|
||||
jar.set(jar("bungeecord"))
|
||||
platformVersions.addAll("1.20")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
import com.modrinth.minotaur.ModrinthExtension
|
||||
|
||||
plugins {
|
||||
id("minimotd.base-conventions")
|
||||
id("net.kyori.indra.git")
|
||||
}
|
||||
|
||||
val platformExtension = extensions.create<MiniMOTDPlatformExtension>("miniMOTDPlatform", project)
|
||||
val platformExtension = extensions.create<MiniMOTDPlatformExtension>("miniMOTDPlatform")
|
||||
|
||||
tasks {
|
||||
val copyJar = register<FileCopyTask>("copyJar") {
|
||||
@@ -16,3 +18,15 @@ tasks {
|
||||
dependsOn(copyJar)
|
||||
}
|
||||
}
|
||||
|
||||
if (name != "minimotd-bukkit-bungeecord") {
|
||||
plugins.apply("com.modrinth.minotaur")
|
||||
|
||||
the<ModrinthExtension>().apply {
|
||||
projectId.set("16vhQOQN")
|
||||
versionType.set("release")
|
||||
file.set(platformExtension.jarTask.flatMap { it.archiveFile })
|
||||
changelog.set(releaseNotes)
|
||||
token.set(providers.environmentVariable("MODRINTH_TOKEN"))
|
||||
}
|
||||
}
|
||||
+10
-11
@@ -5,7 +5,7 @@ plugins {
|
||||
|
||||
tasks.jar {
|
||||
from(rootProject.file("license.txt")) {
|
||||
rename { "license_${rootProject.name.toLowerCase()}.txt" }
|
||||
rename { "license_${rootProject.name.lowercase()}.txt" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,15 +25,14 @@ dependencies {
|
||||
compileOnlyApi(libs.guava)
|
||||
}
|
||||
|
||||
blossom {
|
||||
val file = "src/main/java/xyz/jpenilla/minimotd/common/Constants.java"
|
||||
mapOf(
|
||||
"PLUGIN_NAME" to rootProject.name,
|
||||
"PLUGIN_VERSION" to project.version.toString(),
|
||||
"PLUGIN_WEBSITE" to Constants.GITHUB_URL,
|
||||
"GITHUB_USER" to Constants.GITHUB_USER,
|
||||
"GITHUB_REPO" to Constants.GITHUB_REPO
|
||||
).forEach { (k, v) ->
|
||||
replaceToken("\${$k}", v, file)
|
||||
sourceSets.main {
|
||||
blossom {
|
||||
javaSources {
|
||||
property("PLUGIN_NAME", rootProject.name)
|
||||
property("PLUGIN_VERSION", project.version.toString())
|
||||
property("PLUGIN_WEBSITE", Constants.GITHUB_URL)
|
||||
property("GITHUB_USER", Constants.GITHUB_USER)
|
||||
property("GITHUB_REPO", Constants.GITHUB_REPO)
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -34,11 +34,11 @@ public final class Constants {
|
||||
private PluginMetadata() {
|
||||
}
|
||||
|
||||
public static final String NAME = "${PLUGIN_NAME}";
|
||||
public static final String VERSION = "${PLUGIN_VERSION}";
|
||||
public static final String WEBSITE = "${PLUGIN_WEBSITE}";
|
||||
public static final String GITHUB_USER = "${GITHUB_USER}";
|
||||
public static final String GITHUB_REPO = "${GITHUB_REPO}";
|
||||
public static final String NAME = "{{ PLUGIN_NAME }}";
|
||||
public static final String VERSION = "{{ PLUGIN_VERSION }}";
|
||||
public static final String WEBSITE = "{{ PLUGIN_WEBSITE }}";
|
||||
public static final String GITHUB_USER = "{{ GITHUB_USER }}";
|
||||
public static final String GITHUB_REPO = "{{ GITHUB_REPO }}";
|
||||
public static final String GITHUB_REPO_URL = "https://github.com/" + GITHUB_USER + "/" + GITHUB_REPO;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -120,7 +120,7 @@ public final class MiniMOTD<I> {
|
||||
return input.replace("{onlinePlayers}", online).replace("{maxPlayers}", max);
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
public synchronized void reload() {
|
||||
this.iconManager.loadIcons();
|
||||
this.configManager.loadConfigs();
|
||||
this.platform.onReload();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
group=xyz.jpenilla
|
||||
version=2.0.10
|
||||
version=2.0.14
|
||||
description=Use MiniMessage text formatting in the server list MOTD.
|
||||
|
||||
org.gradle.caching=true
|
||||
|
||||
+32
-24
@@ -4,36 +4,36 @@ metadata:
|
||||
- plugins
|
||||
|
||||
plugins:
|
||||
net.kyori.blossom: 1.3.0
|
||||
org.spongepowered.gradle.plugin: 2.0.2
|
||||
net.minecrell.plugin-yml.bungee: &plugin-yml 0.5.2
|
||||
net.minecrell.plugin-yml.bukkit: *plugin-yml
|
||||
xyz.jpenilla.run-paper: &run-task 2.0.1
|
||||
net.kyori.blossom: 2.0.1
|
||||
org.spongepowered.gradle.plugin: 2.2.0
|
||||
net.minecrell.plugin-yml.bungee: 0.5.3
|
||||
xyz.jpenilla.run-paper: &run-task 2.2.0
|
||||
xyz.jpenilla.run-velocity: *run-task
|
||||
xyz.jpenilla.run-waterfall: *run-task
|
||||
|
||||
versions:
|
||||
indra: 2.1.1
|
||||
shadow: 7.1.2
|
||||
testLoggerPlugin: 3.2.0
|
||||
adventure: 4.12.0
|
||||
adventurePlatform: 4.2.0
|
||||
adventurePlatformFabric: 5.6.0
|
||||
minotaur: 2.7.5
|
||||
hangarPublishPlugin: 0.1.0
|
||||
indra: 3.1.3
|
||||
shadow: 8.1.1
|
||||
adventure: 4.14.0
|
||||
adventurePlatform: 4.3.1
|
||||
adventurePlatformFabric: 5.10.0
|
||||
configurate: 4.1.2
|
||||
checkerQual: 3.28.0
|
||||
checkerQual: 3.38.0
|
||||
slf4j: 1.7.32
|
||||
gson: 2.8.0
|
||||
guava: 21.0
|
||||
bstats: 3.0.0
|
||||
bstats: 3.0.2
|
||||
paperApi: 1.16.5-R0.1-SNAPSHOT
|
||||
paperlib: 1.0.8-SNAPSHOT
|
||||
waterfallApi: 1.16-R0.4-SNAPSHOT
|
||||
fabricApi: 0.68.1+1.19.3
|
||||
fabricLoader: 0.14.11
|
||||
fabricMinecraft: 1.19.3
|
||||
fabricApi: 0.89.2+1.20.2
|
||||
fabricLoader: 0.14.22
|
||||
minecraft: 1.20.2
|
||||
spongeApi7: 7.2.0
|
||||
velocityApi: 3.1.2-SNAPSHOT
|
||||
jupiterEngine: 5.9.0
|
||||
jupiterEngine: 5.10.0
|
||||
|
||||
dependencies:
|
||||
adventureBom:
|
||||
@@ -136,10 +136,10 @@ dependencies:
|
||||
group: net.fabricmc
|
||||
name: fabric-loader
|
||||
version: { ref: fabricLoader }
|
||||
fabricMinecraft:
|
||||
minecraft:
|
||||
group: com.mojang
|
||||
name: minecraft
|
||||
version: { ref: fabricMinecraft }
|
||||
version: { ref: minecraft }
|
||||
|
||||
spongeApi7:
|
||||
group: org.spongepowered
|
||||
@@ -161,13 +161,21 @@ dependencies:
|
||||
group: net.kyori
|
||||
name: indra-common
|
||||
version: { ref: indra }
|
||||
indraLicenser:
|
||||
group: net.kyori
|
||||
name: indra-licenser-spotless
|
||||
version: { ref: indra }
|
||||
shadow:
|
||||
group: gradle.plugin.com.github.johnrengelman
|
||||
group: com.github.johnrengelman
|
||||
name: shadow
|
||||
version: { ref: shadow }
|
||||
testLogger:
|
||||
group: com.adarshr
|
||||
name: gradle-test-logger-plugin
|
||||
version: { ref: testLoggerPlugin }
|
||||
minotaur:
|
||||
group: com.modrinth.minotaur
|
||||
name: Minotaur
|
||||
version: { ref: minotaur }
|
||||
hangarPublishPlugin:
|
||||
group: io.papermc
|
||||
name: hangar-publish-plugin
|
||||
version: { ref: hangarPublishPlugin }
|
||||
|
||||
bundles:
|
||||
Vendored
BIN
Binary file not shown.
+2
-1
@@ -1,5 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -85,9 +85,6 @@ done
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
@@ -144,7 +141,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -152,7 +149,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020-2022 Jason Penilla
|
||||
Copyright (c) 2020-2023 Jason Penilla
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
This file is part of MiniMOTD, licensed under the MIT License.
|
||||
|
||||
Copyright (c) 2020-2022 Jason Penilla
|
||||
Copyright (c) 2020-2023 Jason Penilla
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id("minimotd.shadow-platform")
|
||||
id("net.minecrell.plugin-yml.bukkit")
|
||||
id("xyz.jpenilla.run-paper")
|
||||
}
|
||||
|
||||
@@ -15,7 +14,7 @@ dependencies {
|
||||
|
||||
tasks {
|
||||
runServer {
|
||||
minecraftVersion("1.19.3")
|
||||
minecraftVersion(minecraftVersion)
|
||||
}
|
||||
shadowJar {
|
||||
platformRelocation("bukkit", "xyz.jpenilla.minimotd.common")
|
||||
@@ -25,20 +24,22 @@ tasks {
|
||||
commonRelocation("org.bstats")
|
||||
commonRelocation("io.papermc.lib")
|
||||
}
|
||||
}
|
||||
|
||||
bukkit {
|
||||
name = rootProject.name
|
||||
main = "xyz.jpenilla.minimotd.bukkit.MiniMOTDPlugin"
|
||||
apiVersion = "1.13"
|
||||
website = Constants.GITHUB_URL
|
||||
authors = listOf("jmp")
|
||||
softDepend = listOf("ViaVersion")
|
||||
commands {
|
||||
register("minimotd") {
|
||||
description = "MiniMOTD Command"
|
||||
usage = "/minimotd help"
|
||||
permission = "minimotd.admin"
|
||||
processResources {
|
||||
val props = mapOf(
|
||||
"version" to project.version,
|
||||
"website" to Constants.GITHUB_URL,
|
||||
"description" to project.description
|
||||
)
|
||||
inputs.properties(props)
|
||||
filesMatching("plugin.yml") {
|
||||
expand(props)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
runPaper.folia.registerTask()
|
||||
|
||||
modrinth {
|
||||
loaders.set(listOf("paper", "folia"))
|
||||
gameVersions.addAll(bukkitVersions)
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -26,6 +26,7 @@ package xyz.jpenilla.minimotd.bukkit;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.nio.file.Path;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
@@ -71,8 +72,17 @@ public final class MiniMOTDPlugin extends JavaPlugin implements MiniMOTDPlatform
|
||||
final Metrics metrics = new Metrics(this, 8132);
|
||||
|
||||
if (this.miniMOTD.configManager().pluginSettings().updateChecker()) {
|
||||
this.getServer().getScheduler().runTaskAsynchronously(this, () ->
|
||||
new UpdateChecker().checkVersion().forEach(this.logger::info));
|
||||
try {
|
||||
Class.forName("io.papermc.paper.threadedregions.RegionizedServer");
|
||||
CompletableFuture.runAsync(() -> new UpdateChecker().checkVersion().forEach(this.logger::info)).whenComplete(($, thr) -> {
|
||||
if (thr != null) {
|
||||
this.logger.warn("Exception checking for updates", thr);
|
||||
}
|
||||
});
|
||||
} catch (final ReflectiveOperationException ex) {
|
||||
this.getServer().getScheduler().runTaskAsynchronously(this, () ->
|
||||
new UpdateChecker().checkVersion().forEach(this.logger::info));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
name: MiniMOTD
|
||||
version: $version
|
||||
main: xyz.jpenilla.minimotd.bukkit.MiniMOTDPlugin
|
||||
folia-supported: true
|
||||
description: $description
|
||||
authors:
|
||||
- jmp
|
||||
website: $website
|
||||
commands:
|
||||
minimotd:
|
||||
description: MiniMOTD Command
|
||||
permission: minimotd.admin
|
||||
usage: /minimotd help
|
||||
api-version: 1.13
|
||||
softdepend:
|
||||
- ViaVersion
|
||||
@@ -19,7 +19,7 @@ tasks {
|
||||
commonRelocation("org.bstats")
|
||||
}
|
||||
runWaterfall {
|
||||
waterfallVersion("1.19")
|
||||
waterfallVersion("1.20")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,3 +28,8 @@ bungee {
|
||||
main = "xyz.jpenilla.minimotd.bungee.MiniMOTDPlugin"
|
||||
author = "jmp"
|
||||
}
|
||||
|
||||
modrinth {
|
||||
loaders.add("waterfall") // not sure why this isn't detected automatically from run-waterfall...
|
||||
gameVersions.addAll(minecraftVersion)
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -39,6 +39,8 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import xyz.jpenilla.minimotd.common.MiniMOTD;
|
||||
import xyz.jpenilla.minimotd.common.MiniMOTDPlatform;
|
||||
import xyz.jpenilla.minimotd.common.PingResponse;
|
||||
import xyz.jpenilla.minimotd.common.config.MiniMOTDConfig;
|
||||
import xyz.jpenilla.minimotd.common.util.UpdateChecker;
|
||||
|
||||
public final class MiniMOTDPlugin extends Plugin implements MiniMOTDPlatform<Favicon> {
|
||||
@@ -65,6 +67,9 @@ public final class MiniMOTDPlugin extends Plugin implements MiniMOTDPlatform<Fav
|
||||
this.getProxy().getScheduler().runAsync(this, () ->
|
||||
new UpdateChecker().checkVersion().forEach(this.logger::info));
|
||||
}
|
||||
|
||||
// preload some stuff, so the first ping is as fast as the rest
|
||||
this.preload();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -109,4 +114,10 @@ public final class MiniMOTDPlugin extends Plugin implements MiniMOTDPlatform<Fav
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private void preload() {
|
||||
final MiniMOTDConfig cfg = this.miniMOTD.configManager().mainConfig();
|
||||
final PingResponse<Favicon> mini = this.miniMOTD.createMOTD(cfg, 0, 0);
|
||||
mini.motd(motd -> BungeeComponentSerializer.get().serialize(motd));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -6,10 +6,8 @@ plugins {
|
||||
|
||||
val shade: Configuration by configurations.creating
|
||||
|
||||
val minecraftVersion = libs.versions.fabricMinecraft.get()
|
||||
|
||||
dependencies {
|
||||
minecraft(libs.fabricMinecraft)
|
||||
minecraft(libs.minecraft)
|
||||
mappings(loom.officialMojangMappings())
|
||||
modImplementation(libs.fabricLoader)
|
||||
modImplementation(libs.fabricApi)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -25,14 +25,9 @@ package xyz.jpenilla.minimotd.fabric;
|
||||
|
||||
import com.mojang.brigadier.Command;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufOutputStream;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Base64;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import javax.imageio.ImageIO;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
@@ -41,6 +36,8 @@ import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.kyori.adventure.platform.fabric.FabricServerAudiences;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.network.protocol.status.ServerStatus;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -48,16 +45,18 @@ import xyz.jpenilla.minimotd.common.CommandHandler;
|
||||
import xyz.jpenilla.minimotd.common.MiniMOTD;
|
||||
import xyz.jpenilla.minimotd.common.MiniMOTDPlatform;
|
||||
import xyz.jpenilla.minimotd.common.util.UpdateChecker;
|
||||
import xyz.jpenilla.minimotd.fabric.access.ServerStatusFaviconAccess;
|
||||
|
||||
import static net.minecraft.commands.Commands.literal;
|
||||
|
||||
public final class MiniMOTDFabric implements ModInitializer, MiniMOTDPlatform<String> {
|
||||
public final class MiniMOTDFabric implements ModInitializer, MiniMOTDPlatform<ServerStatus.Favicon> {
|
||||
private static MiniMOTDFabric instance = null;
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(MiniMOTD.class);
|
||||
private final Path dataDirectory = FabricLoader.getInstance().getConfigDir().resolve("MiniMOTD");
|
||||
private final MiniMOTD<String> miniMOTD = new MiniMOTD<>(this);
|
||||
private final MiniMOTD<ServerStatus.Favicon> miniMOTD = new MiniMOTD<>(this);
|
||||
|
||||
private MinecraftServer server;
|
||||
private FabricServerAudiences audiences;
|
||||
|
||||
public MiniMOTDFabric() {
|
||||
@@ -67,19 +66,26 @@ public final class MiniMOTDFabric implements ModInitializer, MiniMOTDPlatform<St
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public @NonNull MiniMOTD<String> miniMOTD() {
|
||||
public @NonNull MiniMOTD<ServerStatus.Favicon> miniMOTD() {
|
||||
return this.miniMOTD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
this.registerCommand();
|
||||
ServerLifecycleEvents.SERVER_STARTED.register(minecraftServer -> {
|
||||
ServerLifecycleEvents.SERVER_STARTING.register(minecraftServer -> {
|
||||
this.server = minecraftServer;
|
||||
this.audiences = FabricServerAudiences.of(minecraftServer);
|
||||
});
|
||||
ServerLifecycleEvents.SERVER_STARTED.register(minecraftServer -> {
|
||||
if (this.miniMOTD.configManager().pluginSettings().updateChecker()) {
|
||||
CompletableFuture.runAsync(() -> new UpdateChecker().checkVersion().forEach(this.logger()::info));
|
||||
}
|
||||
});
|
||||
ServerLifecycleEvents.SERVER_STOPPED.register($ -> {
|
||||
this.server = null;
|
||||
this.audiences = null;
|
||||
});
|
||||
this.miniMOTD.logger().info("Done initializing MiniMOTD");
|
||||
}
|
||||
|
||||
@@ -93,7 +99,7 @@ public final class MiniMOTDFabric implements ModInitializer, MiniMOTDPlatform<St
|
||||
|
||||
@Override
|
||||
public int run(final @NonNull CommandContext<CommandSourceStack> context) {
|
||||
this.handler.execute(MiniMOTDFabric.this.audiences.audience(context.getSource()));
|
||||
this.handler.execute(context.getSource());
|
||||
return Command.SINGLE_SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -116,6 +122,13 @@ public final class MiniMOTDFabric implements ModInitializer, MiniMOTDPlatform<St
|
||||
return instance;
|
||||
}
|
||||
|
||||
public @NonNull MinecraftServer requireServer() {
|
||||
if (this.server == null) {
|
||||
throw new IllegalStateException("Server requested before started");
|
||||
}
|
||||
return this.server;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Path dataDirectory() {
|
||||
return this.dataDirectory;
|
||||
@@ -127,16 +140,11 @@ public final class MiniMOTDFabric implements ModInitializer, MiniMOTDPlatform<St
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String loadIcon(final @NonNull BufferedImage bufferedImage) throws Exception {
|
||||
final ByteBuf byteBuf = Unpooled.buffer();
|
||||
final String icon;
|
||||
try {
|
||||
ImageIO.write(bufferedImage, "PNG", new ByteBufOutputStream(byteBuf));
|
||||
final ByteBuffer base64 = Base64.getEncoder().encode(byteBuf.nioBuffer());
|
||||
icon = "data:image/png;base64," + StandardCharsets.UTF_8.decode(base64);
|
||||
} finally {
|
||||
byteBuf.release();
|
||||
}
|
||||
return icon;
|
||||
public ServerStatus.@NonNull Favicon loadIcon(final @NonNull BufferedImage bufferedImage) throws Exception {
|
||||
final ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
ImageIO.write(bufferedImage, "PNG", out);
|
||||
final ServerStatus.Favicon favicon = new ServerStatus.Favicon(out.toByteArray());
|
||||
((ServerStatusFaviconAccess) (Object) favicon).cacheEncodedIcon();
|
||||
return favicon;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package xyz.jpenilla.minimotd.fabric.access;
|
||||
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public interface ServerStatusFaviconAccess {
|
||||
@Nullable String cachedEncodedIcon();
|
||||
|
||||
void cacheEncodedIcon();
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -40,6 +40,6 @@ abstract class ServerHandshakePacketListenerImplMixin {
|
||||
|
||||
@Inject(method = "handleIntention", at = @At("HEAD"))
|
||||
public void injectHandleIntention(final ClientIntentionPacket packet, final CallbackInfo ci) {
|
||||
((ConnectionAccess) this.connection).protocolVersion(packet.getProtocolVersion());
|
||||
((ConnectionAccess) this.connection).protocolVersion(packet.protocolVersion());
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package xyz.jpenilla.minimotd.fabric.mixin;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.DataResult;
|
||||
import com.mojang.serialization.codecs.PrimitiveCodec;
|
||||
import java.util.function.Function;
|
||||
import net.minecraft.network.protocol.status.ServerStatus;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import xyz.jpenilla.minimotd.fabric.access.ServerStatusFaviconAccess;
|
||||
|
||||
@Mixin(ServerStatus.Favicon.class)
|
||||
abstract class ServerStatusFaviconMixin implements ServerStatusFaviconAccess {
|
||||
@Unique
|
||||
private static Function<ServerStatus.Favicon, String> VANILLA_ENCODE_TO_STRING;
|
||||
|
||||
@Redirect(
|
||||
method = "<clinit>",
|
||||
at = @At(
|
||||
target = "Lcom/mojang/serialization/codecs/PrimitiveCodec;comapFlatMap(Ljava/util/function/Function;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;",
|
||||
value = "INVOKE"
|
||||
),
|
||||
remap = false
|
||||
)
|
||||
private static Codec<ServerStatus.Favicon> makeCodec(
|
||||
final PrimitiveCodec<String> stringCodec,
|
||||
final Function<String, DataResult<ServerStatus.Favicon>> decode,
|
||||
final Function<ServerStatus.Favicon, String> encode
|
||||
) {
|
||||
VANILLA_ENCODE_TO_STRING = encode;
|
||||
return stringCodec.comapFlatMap(decode, favicon -> {
|
||||
final @Nullable String encodedIcon = ((ServerStatusFaviconAccess) (Object) favicon).cachedEncodedIcon();
|
||||
if (encodedIcon != null) {
|
||||
return encodedIcon;
|
||||
}
|
||||
return encode.apply(favicon);
|
||||
});
|
||||
}
|
||||
|
||||
@Unique
|
||||
private String encodedIcon;
|
||||
|
||||
@Override
|
||||
public @Nullable String cachedEncodedIcon() {
|
||||
return this.encodedIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cacheEncodedIcon() {
|
||||
this.encodedIcon = VANILLA_ENCODE_TO_STRING.apply((ServerStatus.Favicon) (Object) this);
|
||||
}
|
||||
}
|
||||
+35
-26
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -23,7 +23,9 @@
|
||||
*/
|
||||
package xyz.jpenilla.minimotd.fabric.mixin;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import java.util.Collections;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import net.minecraft.network.Connection;
|
||||
import net.minecraft.network.protocol.status.ServerStatus;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
@@ -40,46 +42,53 @@ import xyz.jpenilla.minimotd.common.config.MiniMOTDConfig;
|
||||
import xyz.jpenilla.minimotd.common.util.ComponentColorDownsampler;
|
||||
import xyz.jpenilla.minimotd.fabric.MiniMOTDFabric;
|
||||
import xyz.jpenilla.minimotd.fabric.access.ConnectionAccess;
|
||||
import xyz.jpenilla.minimotd.fabric.util.MutableServerStatus;
|
||||
|
||||
@Mixin(ServerStatusPacketListenerImpl.class)
|
||||
abstract class ServerStatusPacketListenerImplMixin {
|
||||
@Shadow @Final private Connection connection;
|
||||
|
||||
@Redirect(method = "handleStatusRequest", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/MinecraftServer;getStatus()Lnet/minecraft/network/protocol/status/ServerStatus;"))
|
||||
public ServerStatus injectHandleStatusRequest(final MinecraftServer minecraftServer) {
|
||||
final ServerStatus vanillaStatus = minecraftServer.getStatus();
|
||||
|
||||
final ServerStatus modifiedStatus = new ServerStatus();
|
||||
modifiedStatus.setDescription(vanillaStatus.getDescription());
|
||||
modifiedStatus.setFavicon(vanillaStatus.getFavicon());
|
||||
modifiedStatus.setVersion(vanillaStatus.getVersion());
|
||||
|
||||
@Redirect(
|
||||
method = "handleStatusRequest",
|
||||
at = @At(value = "FIELD", target = "Lnet/minecraft/server/network/ServerStatusPacketListenerImpl;status:Lnet/minecraft/network/protocol/status/ServerStatus;")
|
||||
)
|
||||
public ServerStatus injectHandleStatusRequest(final ServerStatusPacketListenerImpl instance) {
|
||||
final MiniMOTDFabric miniMOTDFabric = MiniMOTDFabric.get();
|
||||
final MiniMOTD<String> miniMOTD = miniMOTDFabric.miniMOTD();
|
||||
final MinecraftServer minecraftServer = miniMOTDFabric.requireServer();
|
||||
final ServerStatus vanillaStatus = Objects.requireNonNull(minecraftServer.getStatus(), "vanillaStatus");
|
||||
|
||||
final MiniMOTD<ServerStatus.Favicon> miniMOTD = miniMOTDFabric.miniMOTD();
|
||||
final MiniMOTDConfig config = miniMOTD.configManager().mainConfig();
|
||||
|
||||
final PingResponse<String> response = miniMOTD.createMOTD(config, minecraftServer.getPlayerCount(), vanillaStatus.getPlayers().getMaxPlayers());
|
||||
final PingResponse<ServerStatus.Favicon> response = miniMOTD.createMOTD(
|
||||
config,
|
||||
minecraftServer.getPlayerCount(),
|
||||
vanillaStatus.players().map(ServerStatus.Players::max).orElseGet(minecraftServer::getMaxPlayers)
|
||||
);
|
||||
|
||||
final MutableServerStatus modifiedStatus = new MutableServerStatus(vanillaStatus);
|
||||
response.motd(motd -> {
|
||||
if (((ConnectionAccess) this.connection).protocolVersion() >= Constants.MINECRAFT_1_16_PROTOCOL_VERSION) {
|
||||
modifiedStatus.setDescription(miniMOTDFabric.audiences().toNative(motd));
|
||||
modifiedStatus.description(miniMOTDFabric.audiences().toNative(motd));
|
||||
} else {
|
||||
modifiedStatus.setDescription(miniMOTDFabric.audiences().toNative(ComponentColorDownsampler.downsampler().downsample(motd)));
|
||||
modifiedStatus.description(miniMOTDFabric.audiences().toNative(ComponentColorDownsampler.downsampler().downsample(motd)));
|
||||
}
|
||||
});
|
||||
response.icon(modifiedStatus::setFavicon);
|
||||
response.icon(favicon -> modifiedStatus.favicon(Optional.of(favicon)));
|
||||
|
||||
if (!response.hidePlayerCount()) {
|
||||
final GameProfile[] oldSample = vanillaStatus.getPlayers().getSample();
|
||||
final ServerStatus.Players newPlayers = new ServerStatus.Players(response.playerCount().maxPlayers(), response.playerCount().onlinePlayers());
|
||||
if (response.disablePlayerListHover()) {
|
||||
newPlayers.setSample(new GameProfile[]{});
|
||||
} else {
|
||||
newPlayers.setSample(oldSample);
|
||||
}
|
||||
modifiedStatus.setPlayers(newPlayers);
|
||||
if (response.hidePlayerCount()) {
|
||||
modifiedStatus.players(Optional.empty());
|
||||
} else {
|
||||
final ServerStatus.Players newPlayers = new ServerStatus.Players(
|
||||
response.playerCount().maxPlayers(),
|
||||
response.playerCount().onlinePlayers(),
|
||||
response.disablePlayerListHover()
|
||||
? Collections.emptyList()
|
||||
: vanillaStatus.players().map(ServerStatus.Players::sample).orElse(Collections.emptyList())
|
||||
);
|
||||
modifiedStatus.players(Optional.of(newPlayers));
|
||||
}
|
||||
|
||||
return modifiedStatus;
|
||||
return modifiedStatus.toServerStatus();
|
||||
}
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package xyz.jpenilla.minimotd.fabric.util;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.protocol.status.ServerStatus;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
|
||||
@SuppressWarnings({"OptionalUsedAsFieldOrParameterType", "unused"})
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public final class MutableServerStatus {
|
||||
private Component description;
|
||||
private Optional<ServerStatus.Players> players;
|
||||
private Optional<ServerStatus.Version> version;
|
||||
private Optional<ServerStatus.Favicon> favicon;
|
||||
private boolean enforcesSecureChat;
|
||||
|
||||
public MutableServerStatus(final ServerStatus status) {
|
||||
this.description = status.description();
|
||||
this.players = status.players();
|
||||
this.version = status.version();
|
||||
this.favicon = status.favicon();
|
||||
this.enforcesSecureChat = status.enforcesSecureChat();
|
||||
}
|
||||
|
||||
public ServerStatus toServerStatus() {
|
||||
return new ServerStatus(this.description, this.players, this.version, this.favicon, this.enforcesSecureChat);
|
||||
}
|
||||
|
||||
public Component description() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public void description(final Component description) {
|
||||
Objects.requireNonNull(description, "description");
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Optional<ServerStatus.Players> players() {
|
||||
return this.players;
|
||||
}
|
||||
|
||||
public void players(final Optional<ServerStatus.Players> players) {
|
||||
Objects.requireNonNull(players, "players");
|
||||
this.players = players;
|
||||
}
|
||||
|
||||
public Optional<ServerStatus.Version> version() {
|
||||
return this.version;
|
||||
}
|
||||
|
||||
public void version(final Optional<ServerStatus.Version> version) {
|
||||
Objects.requireNonNull(version, "version");
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Optional<ServerStatus.Favicon> favicon() {
|
||||
return this.favicon;
|
||||
}
|
||||
|
||||
public void favicon(final Optional<ServerStatus.Favicon> favicon) {
|
||||
Objects.requireNonNull(favicon, "favicon");
|
||||
this.favicon = favicon;
|
||||
}
|
||||
|
||||
public boolean enforcesSecureChat() {
|
||||
return this.enforcesSecureChat;
|
||||
}
|
||||
|
||||
public void enforcesSecureChat(final boolean enforcesSecureChat) {
|
||||
this.enforcesSecureChat = enforcesSecureChat;
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,6 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.6",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.19.x"
|
||||
"minecraft": "~1.20.2"
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
"mixins": [
|
||||
"ConnectionMixin",
|
||||
"ServerHandshakePacketListenerImplMixin",
|
||||
"ServerStatusFaviconMixin",
|
||||
"ServerStatusPacketListenerImplMixin"
|
||||
],
|
||||
"client": [
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import java.util.Locale
|
||||
|
||||
plugins {
|
||||
id("minimotd.shadow-platform")
|
||||
}
|
||||
@@ -14,7 +12,7 @@ dependencies {
|
||||
tasks {
|
||||
processResources {
|
||||
val replacements = mapOf(
|
||||
"modid" to rootProject.name.toLowerCase(Locale.ENGLISH),
|
||||
"modid" to rootProject.name.lowercase(),
|
||||
"name" to rootProject.name,
|
||||
"version" to project.version.toString(),
|
||||
"description" to project.description.toString(),
|
||||
@@ -31,3 +29,8 @@ tasks {
|
||||
commonRelocation("org.bstats")
|
||||
}
|
||||
}
|
||||
|
||||
modrinth {
|
||||
loaders.add("sponge")
|
||||
gameVersions.add("1.12.2")
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import org.spongepowered.gradle.plugin.config.PluginLoaders
|
||||
import org.spongepowered.plugin.metadata.model.PluginDependency
|
||||
import java.util.Locale
|
||||
|
||||
plugins {
|
||||
id("minimotd.shadow-platform")
|
||||
@@ -14,7 +13,7 @@ dependencies {
|
||||
sponge {
|
||||
injectRepositories(false)
|
||||
apiVersion("8.1.0-SNAPSHOT")
|
||||
plugin(rootProject.name.toLowerCase(Locale.ENGLISH)) {
|
||||
plugin(rootProject.name.lowercase()) {
|
||||
loader {
|
||||
name(PluginLoaders.JAVA_PLAIN)
|
||||
version("1.0")
|
||||
@@ -46,3 +45,13 @@ tasks {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
modrinth {
|
||||
gameVersions.addAll(
|
||||
"1.16.5",
|
||||
"1.17.1",
|
||||
"1.18.2",
|
||||
"1.19.4",
|
||||
"1.20.2"
|
||||
)
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id("minimotd.shadow-platform")
|
||||
id("net.kyori.blossom")
|
||||
id("xyz.jpenilla.run-velocity")
|
||||
}
|
||||
|
||||
@@ -8,7 +7,6 @@ dependencies {
|
||||
implementation(projects.minimotdCommon)
|
||||
implementation(libs.bstatsVelocity)
|
||||
compileOnly(libs.velocityApi)
|
||||
annotationProcessor(libs.velocityApi)
|
||||
}
|
||||
|
||||
tasks {
|
||||
@@ -20,15 +18,19 @@ tasks {
|
||||
runVelocity {
|
||||
velocityVersion(libs.versions.velocityApi.get())
|
||||
}
|
||||
}
|
||||
|
||||
blossom {
|
||||
val file = "src/main/java/xyz/jpenilla/minimotd/velocity/MiniMOTDPlugin.java"
|
||||
mapOf(
|
||||
"project.name" to project.name,
|
||||
"description" to description as String,
|
||||
"url" to Constants.GITHUB_URL
|
||||
).forEach { (k, v) ->
|
||||
replaceToken("\${$k}", v, file)
|
||||
processResources {
|
||||
val props = mapOf(
|
||||
"description" to project.description as String,
|
||||
"url" to Constants.GITHUB_URL,
|
||||
"version" to project.version,
|
||||
)
|
||||
inputs.properties(props)
|
||||
filesMatching("velocity-plugin.json") {
|
||||
expand(props)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
modrinth {
|
||||
gameVersions.addAll(minecraftVersion)
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -36,7 +36,6 @@ import com.velocitypowered.api.command.CommandManager;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.event.Subscribe;
|
||||
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
|
||||
import com.velocitypowered.api.plugin.Plugin;
|
||||
import com.velocitypowered.api.plugin.annotation.DataDirectory;
|
||||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
import com.velocitypowered.api.util.Favicon;
|
||||
@@ -47,19 +46,10 @@ import org.bstats.velocity.Metrics;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.slf4j.Logger;
|
||||
import xyz.jpenilla.minimotd.common.CommandHandler;
|
||||
import xyz.jpenilla.minimotd.common.Constants;
|
||||
import xyz.jpenilla.minimotd.common.MiniMOTD;
|
||||
import xyz.jpenilla.minimotd.common.MiniMOTDPlatform;
|
||||
import xyz.jpenilla.minimotd.common.util.UpdateChecker;
|
||||
|
||||
@Plugin(
|
||||
id = "${project.name}",
|
||||
name = Constants.PluginMetadata.NAME,
|
||||
version = Constants.PluginMetadata.VERSION,
|
||||
description = "${description}",
|
||||
url = "${url}",
|
||||
authors = {"jmp"}
|
||||
)
|
||||
public final class MiniMOTDPlugin implements MiniMOTDPlatform<Favicon> {
|
||||
private static final Set<Class<?>> LISTENER_CLASSES = ImmutableSet.of(
|
||||
PingListener.class
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of MiniMOTD, licensed under the MIT License.
|
||||
*
|
||||
* Copyright (c) 2020-2022 Jason Penilla
|
||||
* Copyright (c) 2020-2023 Jason Penilla
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "minimotd-velocity",
|
||||
"name": "MiniMOTD",
|
||||
"version": "$version",
|
||||
"description": "$description",
|
||||
"url": "$url",
|
||||
"authors": [
|
||||
"jmp"
|
||||
],
|
||||
"dependencies": [],
|
||||
"main": "xyz.jpenilla.minimotd.velocity.MiniMOTDPlugin"
|
||||
}
|
||||
+2
-3
@@ -19,15 +19,14 @@ pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven("https://maven.fabricmc.net/")
|
||||
maven("https://maven.quiltmc.org/repository/release/")
|
||||
maven("https://repo.jpenilla.xyz/snapshots/")
|
||||
}
|
||||
includeBuild("build-logic")
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "5.0.1"
|
||||
id("quiet-fabric-loom") version "1.0-SNAPSHOT"
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "6.1.0"
|
||||
id("quiet-fabric-loom") version "1.3-SNAPSHOT"
|
||||
}
|
||||
|
||||
rootProject.name = "MiniMOTD"
|
||||
|
||||
Reference in new issue
Block a user