From 536ed9e4c1e73569a99c1ac4d7d16495d72ebe64 Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 5 Feb 2023 17:43:14 -0500 Subject: [PATCH 1/5] feat: Improved API publication --- HEADER.txt | 16 +++++++++ api/paper/build.gradle.kts | 46 +++++++++++++++++++++----- api/velocity/build.gradle.kts | 61 ++++++++++++++++++++++++++--------- build.gradle.kts | 1 + gradle.properties | 2 +- gradle/libs.versions.toml | 2 ++ 6 files changed, 104 insertions(+), 24 deletions(-) create mode 100644 HEADER.txt diff --git a/HEADER.txt b/HEADER.txt new file mode 100644 index 0000000..617b81a --- /dev/null +++ b/HEADER.txt @@ -0,0 +1,16 @@ +/* + * Copyright (C) $YEAR AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ diff --git a/api/paper/build.gradle.kts b/api/paper/build.gradle.kts index da97b64..ed12679 100644 --- a/api/paper/build.gradle.kts +++ b/api/paper/build.gradle.kts @@ -1,5 +1,6 @@ plugins { - `maven-publish` + `java-library` + alias(libs.plugins.indra) } java { @@ -24,13 +25,42 @@ tasks { } } -publishing { - publications { - create("maven") { - groupId = project.group as String - artifactId = project.name - version = project.version as String - from(components["java"]) +indra { + javaVersions { + testWith().add(17) + } + + issues { + url("https://github.com/4drian3d/AuthMeVelocity/issues") + system("Github Issues") + } + + github("4drian3d", "AuthMeVelocity") { + ci(true) + } + + gpl3OrLaterLicense() + + scm { + connection("scm:git:git://github.com/4drian3d/AuthMeVelocity.git") + developerConnection("scm:git:ssh://github.com/4drian3d/AuthMeVelocity.git") + url("http://github.com/4drian3d/AuthMeVelocity/") + } + + configurePublications { + groupId = project.group as String + artifactId = "api-paper" + version = project.version as String + from(components["java"]) + + pom { + developers { + developer { + id.set("4drian3d") + name.set("Adrian") + } + } } } } + diff --git a/api/velocity/build.gradle.kts b/api/velocity/build.gradle.kts index df55e62..59fc1ed 100644 --- a/api/velocity/build.gradle.kts +++ b/api/velocity/build.gradle.kts @@ -1,5 +1,6 @@ plugins { - `maven-publish` + `java-library` + alias(libs.plugins.indra) } dependencies { @@ -13,22 +14,52 @@ java { tasks { javadoc { - options.encoding = Charsets.UTF_8.name() - (options as StandardJavadocDocletOptions).links( - "https://jd.adventure.kyori.net/api/4.11.0/", - "https://jd.adventure.kyori.net/text-minimessage/4.11.0/", - "https://jd.papermc.io/velocity/3.0.0/" - ) + (options as? StandardJavadocDocletOptions)?.run{ + encoding = Charsets.UTF_8.name() + links( + "https://jd.adventure.kyori.net/api/4.12.0/", + "https://jd.adventure.kyori.net/text-minimessage/4.12.0/", + "https://jd.papermc.io/velocity/3.0.0/" + ) + } } } -publishing { - publications { - create("maven") { - groupId = project.group as String - artifactId = project.name - version = project.version as String - from(components["java"]) +indra { + javaVersions { + testWith().add(17) + } + + issues { + url("https://github.com/4drian3d/AuthMeVelocity/issues") + system("Github Issues") + } + + github("4drian3d", "AuthMeVelocity") { + ci(true) + } + + gpl3OrLaterLicense() + + scm { + connection("scm:git:git://github.com/4drian3d/AuthMeVelocity.git") + developerConnection("scm:git:ssh://github.com/4drian3d/AuthMeVelocity.git") + url("http://github.com/4drian3d/AuthMeVelocity/") + } + + configurePublications { + groupId = project.group as String + artifactId = "api-velocity" + version = project.version as String + from(components["java"]) + + pom { + developers { + developer { + id.set("4drian3d") + name.set("Adrian") + } + } } } -} \ No newline at end of file +} diff --git a/build.gradle.kts b/build.gradle.kts index fc1bfab..14eea6e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,6 +9,7 @@ repositories { allprojects { apply() + repositories { maven("https://repo.papermc.io/repository/maven-public/") } diff --git a/gradle.properties b/gradle.properties index 7f518fc..c235889 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group = me.adrianed.authmevelocity -version = 3.0.5 +version = 3.0.6-SNAPSHOT description = AuthMeReloaded Support for Velocity url = https://modrinth.com/plugin/authmevelocity id = authmevelocity diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e8ce546..3d6c1fb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,6 +15,7 @@ configurate = "4.1.2" adventure = "4.12.0" blossom = "1.3.1" geantyref = "1.3.13" +indra = "3.0.1" [libraries] @@ -40,3 +41,4 @@ configurate-hocon = { group = "org.spongepowered", name = "configurate-hocon", v pluginyml-bukkit = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "pluginyml" } shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" } blossom = { id = "net.kyori.blossom", version.ref = "blossom" } +indra = { id = "net.kyori.indra.publishing", version.ref = "indra" } From 04e430466fabe55bedff7da6e355787e1a6a5cc8 Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 5 Feb 2023 18:15:57 -0500 Subject: [PATCH 2/5] build: Improved build organization with gradle plugins --- api/paper/build.gradle.kts | 41 +------------------ api/velocity/build.gradle.kts | 40 +----------------- build-logic/build.gradle.kts | 17 ++++++++ build-logic/settings.gradle.kts | 14 +++++++ .../authmevelocity.publishing.gradle.kts | 31 ++++++++++++++ gradle/libs.versions.toml | 3 ++ settings.gradle.kts | 8 ++++ 7 files changed, 75 insertions(+), 79 deletions(-) create mode 100644 build-logic/build.gradle.kts create mode 100644 build-logic/settings.gradle.kts create mode 100644 build-logic/src/main/kotlin/authmevelocity.publishing.gradle.kts diff --git a/api/paper/build.gradle.kts b/api/paper/build.gradle.kts index ed12679..d09b3b8 100644 --- a/api/paper/build.gradle.kts +++ b/api/paper/build.gradle.kts @@ -1,6 +1,7 @@ plugins { `java-library` alias(libs.plugins.indra) + id("authmevelocity.publishing") } java { @@ -24,43 +25,3 @@ tasks { } } } - -indra { - javaVersions { - testWith().add(17) - } - - issues { - url("https://github.com/4drian3d/AuthMeVelocity/issues") - system("Github Issues") - } - - github("4drian3d", "AuthMeVelocity") { - ci(true) - } - - gpl3OrLaterLicense() - - scm { - connection("scm:git:git://github.com/4drian3d/AuthMeVelocity.git") - developerConnection("scm:git:ssh://github.com/4drian3d/AuthMeVelocity.git") - url("http://github.com/4drian3d/AuthMeVelocity/") - } - - configurePublications { - groupId = project.group as String - artifactId = "api-paper" - version = project.version as String - from(components["java"]) - - pom { - developers { - developer { - id.set("4drian3d") - name.set("Adrian") - } - } - } - } -} - diff --git a/api/velocity/build.gradle.kts b/api/velocity/build.gradle.kts index 59fc1ed..c09a044 100644 --- a/api/velocity/build.gradle.kts +++ b/api/velocity/build.gradle.kts @@ -1,6 +1,7 @@ plugins { `java-library` alias(libs.plugins.indra) + id("authmevelocity.publishing") } dependencies { @@ -24,42 +25,3 @@ tasks { } } } - -indra { - javaVersions { - testWith().add(17) - } - - issues { - url("https://github.com/4drian3d/AuthMeVelocity/issues") - system("Github Issues") - } - - github("4drian3d", "AuthMeVelocity") { - ci(true) - } - - gpl3OrLaterLicense() - - scm { - connection("scm:git:git://github.com/4drian3d/AuthMeVelocity.git") - developerConnection("scm:git:ssh://github.com/4drian3d/AuthMeVelocity.git") - url("http://github.com/4drian3d/AuthMeVelocity/") - } - - configurePublications { - groupId = project.group as String - artifactId = "api-velocity" - version = project.version as String - from(components["java"]) - - pom { - developers { - developer { - id.set("4drian3d") - name.set("Adrian") - } - } - } - } -} diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts new file mode 100644 index 0000000..18057e2 --- /dev/null +++ b/build-logic/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + `kotlin-dsl` +} + +dependencies { + implementation(libs.plugin.shadow) + implementation(libs.build.indra) +} + +repositories { + gradlePluginPortal() +} + +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} \ No newline at end of file diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts new file mode 100644 index 0000000..80c5fb3 --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,14 @@ +rootProject.name = "build-logic" + +dependencyResolutionManagement { + repositories { + gradlePluginPortal() + mavenCentral() + } + + versionCatalogs { + register("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/authmevelocity.publishing.gradle.kts b/build-logic/src/main/kotlin/authmevelocity.publishing.gradle.kts new file mode 100644 index 0000000..17e955d --- /dev/null +++ b/build-logic/src/main/kotlin/authmevelocity.publishing.gradle.kts @@ -0,0 +1,31 @@ +plugins { + id("net.kyori.indra.publishing") +} + +indra { + javaVersions { + testWith().add(17) + } + + github("4drian3d", "AuthMeVelocity") { + ci(true) + } + + gpl3OrLaterLicense() + + configurePublications { + groupId = project.group as String + artifactId = project.name.replaceFirst("authmevelocity-", "") + version = project.version as String + from(components["java"]) + + pom { + developers { + developer { + id.set("4drian3d") + name.set("Adrian") + } + } + } + } +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3d6c1fb..46a2afa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -36,6 +36,9 @@ bstats-velocity = { group = "org.bstats", name = "bstats-velocity", version.ref configurate-hocon = { group = "org.spongepowered", name = "configurate-hocon", version.ref = "configurate" } +build-indra = { module = "net.kyori:indra-common", version.ref = "indra" } +plugin-shadow = { group = "gradle.plugin.com.github.johnrengelman", name = "shadow", version.ref = "shadow" } + [plugins] pluginyml-bukkit = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "pluginyml" } diff --git a/settings.gradle.kts b/settings.gradle.kts index ba8295d..3bc03c6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -8,4 +8,12 @@ listOf("common", "paper", "velocity").forEach { listOf("paper", "velocity").forEach { include("authmevelocity-api-$it") project(":authmevelocity-api-$it").projectDir = file("api/$it") +} + +pluginManagement { + includeBuild("build-logic") + repositories { + gradlePluginPortal() + mavenCentral() + } } \ No newline at end of file From f5ecb22b0669845f4ce8f35328c0d731d072b481 Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 5 Feb 2023 18:23:19 -0500 Subject: [PATCH 3/5] build: Implement type safe project accessors --- build.gradle.kts | 4 ++-- common/build.gradle.kts | 2 +- paper/build.gradle.kts | 4 ++-- settings.gradle.kts | 3 +++ velocity/build.gradle.kts | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 14eea6e..753938f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,8 +25,8 @@ allprojects { dependencies { shadow(project(":authmevelocity-common", "shadow")) - shadow(project(":authmevelocity-api-paper")) - shadow(project(":authmevelocity-api-velocity")) + shadow(projects.authmevelocityApiPaper) + shadow(projects.authmevelocityApiVelocity) shadow(project(":authmevelocity-velocity", "shadow")) shadow(project(":authmevelocity-paper", "shadow")) } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index f20219b..5ac12b8 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,6 +1,6 @@ plugins { alias(libs.plugins.blossom) - // Required to shadow packages + // Required to relocate packages alias(libs.plugins.shadow) } diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 654de6c..1380f6b 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -10,8 +10,8 @@ repositories { } dependencies { - compileOnly(project(":authmevelocity-common")) - compileOnly(project(":authmevelocity-api-paper")) + compileOnly(projects.authmevelocityCommon) + compileOnly(projects.authmevelocityApiPaper) compileOnly(libs.paper) compileOnly(libs.authme) compileOnly(libs.miniplaceholders) diff --git a/settings.gradle.kts b/settings.gradle.kts index 3bc03c6..3bf25ea 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,6 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +enableFeaturePreview("VERSION_CATALOGS") + rootProject.name = "authmevelocity-parent" listOf("common", "paper", "velocity").forEach { diff --git a/velocity/build.gradle.kts b/velocity/build.gradle.kts index 1566edd..92c95a9 100644 --- a/velocity/build.gradle.kts +++ b/velocity/build.gradle.kts @@ -9,8 +9,8 @@ repositories { } dependencies { - compileOnly(project(":authmevelocity-common")) - compileOnly(project(":authmevelocity-api-velocity")) + compileOnly(projects.authmevelocityCommon) + compileOnly(projects.authmevelocityApiVelocity) compileOnly(libs.velocity) compileOnly(libs.miniplaceholders) compileOnly(libs.fastlogin.velocity) From 3a962560b958d5ebd9eb590d50217de7c05f6009 Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 5 Feb 2023 18:33:34 -0500 Subject: [PATCH 4/5] build(perf): Improved performance of dependency search --- build.gradle.kts | 6 +++++- paper/build.gradle.kts | 18 +++++++++++++++--- velocity/build.gradle.kts | 18 +++++++++++++++--- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 753938f..72a3d8c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,11 @@ plugins { } repositories { - maven("https://repo.alessiodp.com/releases/") + maven("https://repo.alessiodp.com/releases/") { + mavenContent { + includeGroup("net.byteflux") + } + } } allprojects { diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 1380f6b..0639eb3 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -4,9 +4,21 @@ plugins { } repositories { - maven("https://jitpack.io") - maven("https://repo.codemc.org/repository/maven-public/") - maven("https://repo.alessiodp.com/releases/") + maven("https://repo.codemc.org/repository/maven-public/") { + mavenContent { + includeGroup("fr.xephi") + } + } + maven("https://repo.alessiodp.com/releases/"){ + mavenContent { + includeGroup("net.byteflux") + } + } + maven("https://jitpack.io") { + mavenContent { + includeGroup("com.github.4drian3d") + } + } } dependencies { diff --git a/velocity/build.gradle.kts b/velocity/build.gradle.kts index 92c95a9..d5e16ca 100644 --- a/velocity/build.gradle.kts +++ b/velocity/build.gradle.kts @@ -3,9 +3,21 @@ plugins { } repositories { - maven("https://repo.codemc.org/repository/maven-public/") - maven("https://repo.alessiodp.com/releases/") - maven("https://jitpack.io") + maven("https://repo.codemc.org/repository/maven-public/") { + mavenContent { + includeGroup("com.github.games647") + } + } + maven("https://repo.alessiodp.com/releases/"){ + mavenContent { + includeGroup("net.byteflux") + } + } + maven("https://jitpack.io") { + mavenContent { + includeGroup("com.github.4drian3d") + } + } } dependencies { From c4ac9eaabb4fd338833e72e3d95ea64be8ddadc8 Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 5 Feb 2023 20:55:44 -0500 Subject: [PATCH 5/5] licence: Implement Indra licencer --- HEADER.txt | 30 +++++++++---------- api/paper/build.gradle.kts | 1 + .../api/paper/event/LoginByProxyEvent.java | 17 +++++++++++ .../api/paper/event/PreSendLoginEvent.java | 17 +++++++++++ api/velocity/build.gradle.kts | 1 + .../api/velocity/AuthMeVelocityAPI.java | 17 +++++++++++ .../velocity/event/PreSendOnLoginEvent.java | 17 +++++++++++ .../event/ProxyForcedUnregisterEvent.java | 17 +++++++++++ .../api/velocity/event/ProxyLoginEvent.java | 17 +++++++++++ .../api/velocity/event/ProxyLogoutEvent.java | 17 +++++++++++ .../velocity/event/ProxyRegisterEvent.java | 17 +++++++++++ .../velocity/event/ProxyUnregisterEvent.java | 17 +++++++++++ .../api/velocity/event/ServerResult.java | 17 +++++++++++ build-logic/build.gradle.kts | 3 +- .../kotlin/authmevelocity.spotless.gradle.kts | 11 +++++++ common/build.gradle.kts | 1 + .../authmevelocity/common/Constants.java | 17 +++++++++++ .../authmevelocity/common/LibsManager.java | 17 +++++++++++ .../authmevelocity/common/MessageType.java | 17 +++++++++++ .../configuration/ConfigurationContainer.java | 17 +++++++++++ .../common/configuration/Loader.java | 17 +++++++++++ .../configuration/PaperConfiguration.java | 17 +++++++++++ .../configuration/ProxyConfiguration.java | 17 +++++++++++ .../authmevelocity/common/enums/SendMode.java | 17 +++++++++++ gradle/libs.versions.toml | 3 +- paper/build.gradle.kts | 1 + .../paper/AuthMeVelocityPlugin.java | 17 +++++++++++ .../paper/AuthmePlaceholders.java | 17 +++++++++++ .../paper/listeners/AuthMeListener.java | 17 +++++++++++ .../paper/listeners/MessageListener.java | 17 +++++++++++ velocity/build.gradle.kts | 1 + .../velocity/AuthMePlaceholders.java | 17 +++++++++++ .../velocity/AuthMeVelocityPlugin.java | 17 +++++++++++ .../velocity/commands/AuthmeCommand.java | 17 +++++++++++ .../velocity/listener/ConnectListener.java | 17 +++++++++++ .../velocity/listener/FastLoginListener.java | 17 +++++++++++ .../listener/PluginMessageListener.java | 17 +++++++++++ .../velocity/listener/ProxyListener.java | 17 +++++++++++ .../velocity/utils/AuthmeUtils.java | 17 +++++++++++ .../authmevelocity/velocity/utils/Pair.java | 17 +++++++++++ 40 files changed, 561 insertions(+), 18 deletions(-) create mode 100644 build-logic/src/main/kotlin/authmevelocity.spotless.gradle.kts diff --git a/HEADER.txt b/HEADER.txt index 617b81a..73d6eba 100644 --- a/HEADER.txt +++ b/HEADER.txt @@ -1,16 +1,14 @@ -/* - * Copyright (C) $YEAR AuthMeVelocity Contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +Copyright (C) $YEAR AuthMeVelocity Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/api/paper/build.gradle.kts b/api/paper/build.gradle.kts index d09b3b8..92df27a 100644 --- a/api/paper/build.gradle.kts +++ b/api/paper/build.gradle.kts @@ -2,6 +2,7 @@ plugins { `java-library` alias(libs.plugins.indra) id("authmevelocity.publishing") + id("authmevelocity.spotless") } java { diff --git a/api/paper/src/main/java/me/adrianed/authmevelocity/api/paper/event/LoginByProxyEvent.java b/api/paper/src/main/java/me/adrianed/authmevelocity/api/paper/event/LoginByProxyEvent.java index 173055b..6649c3b 100644 --- a/api/paper/src/main/java/me/adrianed/authmevelocity/api/paper/event/LoginByProxyEvent.java +++ b/api/paper/src/main/java/me/adrianed/authmevelocity/api/paper/event/LoginByProxyEvent.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.paper.event; import org.bukkit.entity.Player; diff --git a/api/paper/src/main/java/me/adrianed/authmevelocity/api/paper/event/PreSendLoginEvent.java b/api/paper/src/main/java/me/adrianed/authmevelocity/api/paper/event/PreSendLoginEvent.java index 366b059..bff3ca7 100644 --- a/api/paper/src/main/java/me/adrianed/authmevelocity/api/paper/event/PreSendLoginEvent.java +++ b/api/paper/src/main/java/me/adrianed/authmevelocity/api/paper/event/PreSendLoginEvent.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.paper.event; import org.bukkit.entity.Player; diff --git a/api/velocity/build.gradle.kts b/api/velocity/build.gradle.kts index c09a044..bdcc68e 100644 --- a/api/velocity/build.gradle.kts +++ b/api/velocity/build.gradle.kts @@ -2,6 +2,7 @@ plugins { `java-library` alias(libs.plugins.indra) id("authmevelocity.publishing") + id("authmevelocity.spotless") } dependencies { diff --git a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/AuthMeVelocityAPI.java b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/AuthMeVelocityAPI.java index f049a4c..bd08fd9 100644 --- a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/AuthMeVelocityAPI.java +++ b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/AuthMeVelocityAPI.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.velocity; import java.util.function.Predicate; diff --git a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/PreSendOnLoginEvent.java b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/PreSendOnLoginEvent.java index d7f64a2..d18ff85 100644 --- a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/PreSendOnLoginEvent.java +++ b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/PreSendOnLoginEvent.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.velocity.event; import java.util.Objects; diff --git a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyForcedUnregisterEvent.java b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyForcedUnregisterEvent.java index 2294e9f..fd38737 100644 --- a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyForcedUnregisterEvent.java +++ b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyForcedUnregisterEvent.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.velocity.event; import com.velocitypowered.api.proxy.Player; diff --git a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyLoginEvent.java b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyLoginEvent.java index c107eae..ab23395 100644 --- a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyLoginEvent.java +++ b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyLoginEvent.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.velocity.event; import com.velocitypowered.api.proxy.Player; diff --git a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyLogoutEvent.java b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyLogoutEvent.java index 0c7a97e..eb15bd1 100644 --- a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyLogoutEvent.java +++ b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyLogoutEvent.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.velocity.event; import com.velocitypowered.api.proxy.Player; diff --git a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyRegisterEvent.java b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyRegisterEvent.java index ae5d007..6210ab8 100644 --- a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyRegisterEvent.java +++ b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyRegisterEvent.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.velocity.event; import com.velocitypowered.api.proxy.Player; diff --git a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyUnregisterEvent.java b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyUnregisterEvent.java index 164ee8a..b0d4469 100644 --- a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyUnregisterEvent.java +++ b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ProxyUnregisterEvent.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.velocity.event; import com.velocitypowered.api.proxy.Player; diff --git a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ServerResult.java b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ServerResult.java index b9abf50..7f54d1f 100644 --- a/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ServerResult.java +++ b/api/velocity/src/main/java/me/adrianed/authmevelocity/api/velocity/event/ServerResult.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.api.velocity.event; import com.velocitypowered.api.event.ResultedEvent.Result; diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 18057e2..70accc8 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -4,7 +4,8 @@ plugins { dependencies { implementation(libs.plugin.shadow) - implementation(libs.build.indra) + implementation(libs.build.indra.common) + implementation(libs.build.indra.spotless) } repositories { diff --git a/build-logic/src/main/kotlin/authmevelocity.spotless.gradle.kts b/build-logic/src/main/kotlin/authmevelocity.spotless.gradle.kts new file mode 100644 index 0000000..cad0883 --- /dev/null +++ b/build-logic/src/main/kotlin/authmevelocity.spotless.gradle.kts @@ -0,0 +1,11 @@ +import java.time.LocalDate + +plugins { + id("net.kyori.indra.licenser.spotless") +} + +indraSpotlessLicenser { + licenseHeaderFile(rootProject.file("HEADER.txt")) + property("YEAR", LocalDate.now().year.toString()) + newLine(true) +} diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 5ac12b8..ec62d73 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -2,6 +2,7 @@ plugins { alias(libs.plugins.blossom) // Required to relocate packages alias(libs.plugins.shadow) + id("authmevelocity.spotless") } repositories { diff --git a/common/src/main/java/me/adrianed/authmevelocity/common/Constants.java b/common/src/main/java/me/adrianed/authmevelocity/common/Constants.java index 799f0e2..c95f41b 100644 --- a/common/src/main/java/me/adrianed/authmevelocity/common/Constants.java +++ b/common/src/main/java/me/adrianed/authmevelocity/common/Constants.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.common; public final class Constants { diff --git a/common/src/main/java/me/adrianed/authmevelocity/common/LibsManager.java b/common/src/main/java/me/adrianed/authmevelocity/common/LibsManager.java index c099866..a1db5dc 100644 --- a/common/src/main/java/me/adrianed/authmevelocity/common/LibsManager.java +++ b/common/src/main/java/me/adrianed/authmevelocity/common/LibsManager.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.common; import net.byteflux.libby.Library; diff --git a/common/src/main/java/me/adrianed/authmevelocity/common/MessageType.java b/common/src/main/java/me/adrianed/authmevelocity/common/MessageType.java index 5d830d0..a964a09 100644 --- a/common/src/main/java/me/adrianed/authmevelocity/common/MessageType.java +++ b/common/src/main/java/me/adrianed/authmevelocity/common/MessageType.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.common; public enum MessageType { diff --git a/common/src/main/java/me/adrianed/authmevelocity/common/configuration/ConfigurationContainer.java b/common/src/main/java/me/adrianed/authmevelocity/common/configuration/ConfigurationContainer.java index cfa12ce..c9f0615 100644 --- a/common/src/main/java/me/adrianed/authmevelocity/common/configuration/ConfigurationContainer.java +++ b/common/src/main/java/me/adrianed/authmevelocity/common/configuration/ConfigurationContainer.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.common.configuration; import java.util.concurrent.CompletableFuture; diff --git a/common/src/main/java/me/adrianed/authmevelocity/common/configuration/Loader.java b/common/src/main/java/me/adrianed/authmevelocity/common/configuration/Loader.java index 094c43e..0621e9d 100644 --- a/common/src/main/java/me/adrianed/authmevelocity/common/configuration/Loader.java +++ b/common/src/main/java/me/adrianed/authmevelocity/common/configuration/Loader.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.common.configuration; import java.io.IOException; diff --git a/common/src/main/java/me/adrianed/authmevelocity/common/configuration/PaperConfiguration.java b/common/src/main/java/me/adrianed/authmevelocity/common/configuration/PaperConfiguration.java index ca1f937..0ef61e1 100644 --- a/common/src/main/java/me/adrianed/authmevelocity/common/configuration/PaperConfiguration.java +++ b/common/src/main/java/me/adrianed/authmevelocity/common/configuration/PaperConfiguration.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.common.configuration; import org.spongepowered.configurate.objectmapping.ConfigSerializable; diff --git a/common/src/main/java/me/adrianed/authmevelocity/common/configuration/ProxyConfiguration.java b/common/src/main/java/me/adrianed/authmevelocity/common/configuration/ProxyConfiguration.java index 09ae2be..9539a5c 100644 --- a/common/src/main/java/me/adrianed/authmevelocity/common/configuration/ProxyConfiguration.java +++ b/common/src/main/java/me/adrianed/authmevelocity/common/configuration/ProxyConfiguration.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.common.configuration; import org.spongepowered.configurate.objectmapping.ConfigSerializable; diff --git a/common/src/main/java/me/adrianed/authmevelocity/common/enums/SendMode.java b/common/src/main/java/me/adrianed/authmevelocity/common/enums/SendMode.java index 541510c..599af40 100644 --- a/common/src/main/java/me/adrianed/authmevelocity/common/enums/SendMode.java +++ b/common/src/main/java/me/adrianed/authmevelocity/common/enums/SendMode.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.common.enums; public enum SendMode { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 46a2afa..fda9aaa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -36,7 +36,8 @@ bstats-velocity = { group = "org.bstats", name = "bstats-velocity", version.ref configurate-hocon = { group = "org.spongepowered", name = "configurate-hocon", version.ref = "configurate" } -build-indra = { module = "net.kyori:indra-common", version.ref = "indra" } +build-indra-common = { module = "net.kyori:indra-common", version.ref = "indra" } +build-indra-spotless = { module = "net.kyori:indra-licenser-spotless", version.ref = "indra" } plugin-shadow = { group = "gradle.plugin.com.github.johnrengelman", name = "shadow", version.ref = "shadow" } [plugins] diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 0639eb3..2cdc224 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(libs.plugins.pluginyml.bukkit) alias(libs.plugins.shadow) + id("authmevelocity.spotless") } repositories { diff --git a/paper/src/main/java/me/adrianed/authmevelocity/paper/AuthMeVelocityPlugin.java b/paper/src/main/java/me/adrianed/authmevelocity/paper/AuthMeVelocityPlugin.java index 60e52e8..b19ae53 100644 --- a/paper/src/main/java/me/adrianed/authmevelocity/paper/AuthMeVelocityPlugin.java +++ b/paper/src/main/java/me/adrianed/authmevelocity/paper/AuthMeVelocityPlugin.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.paper; import me.adrianed.authmevelocity.paper.listeners.AuthMeListener; diff --git a/paper/src/main/java/me/adrianed/authmevelocity/paper/AuthmePlaceholders.java b/paper/src/main/java/me/adrianed/authmevelocity/paper/AuthmePlaceholders.java index 48f4d1f..283458a 100644 --- a/paper/src/main/java/me/adrianed/authmevelocity/paper/AuthmePlaceholders.java +++ b/paper/src/main/java/me/adrianed/authmevelocity/paper/AuthmePlaceholders.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.paper; import org.bukkit.Bukkit; diff --git a/paper/src/main/java/me/adrianed/authmevelocity/paper/listeners/AuthMeListener.java b/paper/src/main/java/me/adrianed/authmevelocity/paper/listeners/AuthMeListener.java index 3250668..f659d0c 100644 --- a/paper/src/main/java/me/adrianed/authmevelocity/paper/listeners/AuthMeListener.java +++ b/paper/src/main/java/me/adrianed/authmevelocity/paper/listeners/AuthMeListener.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.paper.listeners; import me.adrianed.authmevelocity.paper.AuthMeVelocityPlugin; diff --git a/paper/src/main/java/me/adrianed/authmevelocity/paper/listeners/MessageListener.java b/paper/src/main/java/me/adrianed/authmevelocity/paper/listeners/MessageListener.java index 4e9b485..91609e4 100644 --- a/paper/src/main/java/me/adrianed/authmevelocity/paper/listeners/MessageListener.java +++ b/paper/src/main/java/me/adrianed/authmevelocity/paper/listeners/MessageListener.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.paper.listeners; import com.google.common.io.ByteArrayDataInput; diff --git a/velocity/build.gradle.kts b/velocity/build.gradle.kts index d5e16ca..92500a8 100644 --- a/velocity/build.gradle.kts +++ b/velocity/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.shadow) + id("authmevelocity.spotless") } repositories { diff --git a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/AuthMePlaceholders.java b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/AuthMePlaceholders.java index 02e66de..6942061 100644 --- a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/AuthMePlaceholders.java +++ b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/AuthMePlaceholders.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.velocity; import com.velocitypowered.api.proxy.Player; diff --git a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/AuthMeVelocityPlugin.java b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/AuthMeVelocityPlugin.java index c9cfd11..0abd62d 100644 --- a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/AuthMeVelocityPlugin.java +++ b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/AuthMeVelocityPlugin.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.velocity; import me.adrianed.authmevelocity.velocity.commands.AuthmeCommand; diff --git a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/commands/AuthmeCommand.java b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/commands/AuthmeCommand.java index 80074eb..4bed90b 100644 --- a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/commands/AuthmeCommand.java +++ b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/commands/AuthmeCommand.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.velocity.commands; import com.mojang.brigadier.Command; diff --git a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/ConnectListener.java b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/ConnectListener.java index 9567813..be45715 100644 --- a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/ConnectListener.java +++ b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/ConnectListener.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.velocity.listener; import java.util.Optional; diff --git a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/FastLoginListener.java b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/FastLoginListener.java index 46b2fd9..cf8cb8d 100644 --- a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/FastLoginListener.java +++ b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/FastLoginListener.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.velocity.listener; import com.github.games647.fastlogin.velocity.event.VelocityFastLoginAutoLoginEvent; diff --git a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/PluginMessageListener.java b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/PluginMessageListener.java index cf2f024..d23af06 100644 --- a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/PluginMessageListener.java +++ b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/PluginMessageListener.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.velocity.listener; import java.util.Locale; diff --git a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/ProxyListener.java b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/ProxyListener.java index c04c1b4..2b8aebf 100644 --- a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/ProxyListener.java +++ b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/listener/ProxyListener.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.velocity.listener; import me.adrianed.authmevelocity.velocity.utils.AuthmeUtils; diff --git a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/utils/AuthmeUtils.java b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/utils/AuthmeUtils.java index 64f78a1..4e6ffc8 100644 --- a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/utils/AuthmeUtils.java +++ b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/utils/AuthmeUtils.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.velocity.utils; import java.util.List; diff --git a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/utils/Pair.java b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/utils/Pair.java index 8ae66c8..8c17ced 100644 --- a/velocity/src/main/java/me/adrianed/authmevelocity/velocity/utils/Pair.java +++ b/velocity/src/main/java/me/adrianed/authmevelocity/velocity/utils/Pair.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2023 AuthMeVelocity Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package me.adrianed.authmevelocity.velocity.utils; public record Pair(String string, O object) {