diff --git a/HEADER.txt b/HEADER.txt new file mode 100644 index 0000000..73d6eba --- /dev/null +++ b/HEADER.txt @@ -0,0 +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 . diff --git a/api/paper/build.gradle.kts b/api/paper/build.gradle.kts index da97b64..92df27a 100644 --- a/api/paper/build.gradle.kts +++ b/api/paper/build.gradle.kts @@ -1,5 +1,8 @@ plugins { - `maven-publish` + `java-library` + alias(libs.plugins.indra) + id("authmevelocity.publishing") + id("authmevelocity.spotless") } java { @@ -23,14 +26,3 @@ tasks { } } } - -publishing { - publications { - create("maven") { - groupId = project.group as String - artifactId = project.name - version = project.version as String - from(components["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 df55e62..bdcc68e 100644 --- a/api/velocity/build.gradle.kts +++ b/api/velocity/build.gradle.kts @@ -1,5 +1,8 @@ plugins { - `maven-publish` + `java-library` + alias(libs.plugins.indra) + id("authmevelocity.publishing") + id("authmevelocity.spotless") } dependencies { @@ -13,22 +16,13 @@ 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"]) - } - } -} \ No newline at end of file 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 new file mode 100644 index 0000000..70accc8 --- /dev/null +++ b/build-logic/build.gradle.kts @@ -0,0 +1,18 @@ +plugins { + `kotlin-dsl` +} + +dependencies { + implementation(libs.plugin.shadow) + implementation(libs.build.indra.common) + implementation(libs.build.indra.spotless) +} + +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/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/build.gradle.kts b/build.gradle.kts index fc1bfab..72a3d8c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,11 +4,16 @@ plugins { } repositories { - maven("https://repo.alessiodp.com/releases/") + maven("https://repo.alessiodp.com/releases/") { + mavenContent { + includeGroup("net.byteflux") + } + } } allprojects { apply() + repositories { maven("https://repo.papermc.io/repository/maven-public/") } @@ -24,8 +29,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..ec62d73 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,7 +1,8 @@ plugins { alias(libs.plugins.blossom) - // Required to shadow packages + // 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.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..fda9aaa 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] @@ -35,8 +36,13 @@ bstats-velocity = { group = "org.bstats", name = "bstats-velocity", version.ref configurate-hocon = { group = "org.spongepowered", name = "configurate-hocon", version.ref = "configurate" } +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] 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" } diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 654de6c..2cdc224 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -1,17 +1,30 @@ plugins { alias(libs.plugins.pluginyml.bukkit) alias(libs.plugins.shadow) + id("authmevelocity.spotless") } 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 { - 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/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/settings.gradle.kts b/settings.gradle.kts index ba8295d..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 { @@ -8,4 +11,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 diff --git a/velocity/build.gradle.kts b/velocity/build.gradle.kts index 1566edd..92500a8 100644 --- a/velocity/build.gradle.kts +++ b/velocity/build.gradle.kts @@ -1,16 +1,29 @@ plugins { alias(libs.plugins.shadow) + id("authmevelocity.spotless") } 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 { - 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) 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) {