diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a0acf9..7d07afe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,138 +4,3 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/), and this project adheres to [Semantic Versioning](http://semver.org/). - -## v3.4.0 - 2023-01-07 - -### Changes - -- Better README. - -### Chores - -- Bump dependencies. - -## v3.3.0 - 2022-11-08 - -### Changes - -- Switched the nullness annotations from jetbrains to checker (checker is better). - -### Features - -- Added option to enable/disable `-SNAPSHOT` suffix. - -### Fixes - -- Fixes a bug where java 8 is set as the project version. - -### Chores - -- Bumped workflow tasks. -- Reworked the `README.md` to be simpler. - -## v3.2.0 - 2022-10-08 - -### ๐Ÿ’Š Bugfixes - -- removed initial sha lookup in release-drafter - -### ๐Ÿงน Chore - -- bump dependencies -- fix ci formatting -- fix doc changelog - -## v3.1.0 - 2022-05-23 - -### ๐Ÿš€ New Features - -- Release drafter is now a manual workflow - -## v3.0.4 - 2022-05-23 - -### Changes - -- Got rid of release-please... - -### ๐Ÿ’Š Bugfixes - -- fixed missing status task in build workflow - -## [v3.0.3](https://github.com/Xpdustry/TemplatePlugin/compare/v3.0.3-SNAPSHOT...v3.0.3) - 2022-05-22 - -### Miscellaneous Chores - -- release 3.0.3 ([ef49fd2](https://github.com/Xpdustry/TemplatePlugin/commit/ef49fd26dc65b14449a1ca58985e8da2aaa43f62)) - -## [v3.0.2](https://github.com/Xpdustry/TemplatePlugin/compare/v3.0.1...v3.0.2) - 2022-05-21 - -### Bug Fixes - -- fix broken release ([b6581a4](https://github.com/Xpdustry/TemplatePlugin/commit/b6581a477826d19cf62dbe632c82d3f3d20edb64)) - -## [v3.0.1](https://github.com/Xpdustry/TemplatePlugin/compare/v3.0.0...v3.0.1) - 2022-05-21 - -### Bug Fixes - -- Added forgotten line for mindustry compile version ([e03bffc](https://github.com/Xpdustry/TemplatePlugin/commit/e03bffcb936c61fef663954a99eb1a9f696b3315)) - -## [v3.0.0](https://github.com/Xpdustry/TemplatePlugin/compare/v2.6.1...v3.0.0) - 2022-05-21 - -### โš  BREAKING CHANGES - -- Move to toxopid 2.0.0 - -### Features - -- Move to toxopid 2.0.0 ([9208e3c](https://github.com/Xpdustry/TemplatePlugin/commit/9208e3ce21b76437dccd65e510085f13c6540bbb)) - -### Bug Fixes - -- pls release-please, work ([ed558ee](https://github.com/Xpdustry/TemplatePlugin/commit/ed558ee00ed440400be6d1b1bf32cb7af0e5f203)) -- remove comment in release-please.yml ([1fb8259](https://github.com/Xpdustry/TemplatePlugin/commit/1fb8259d931111371eb0f1c8f3915e97469456e1)) -- updated license header ([fde8c59](https://github.com/Xpdustry/TemplatePlugin/commit/fde8c594acac66768d86cf372cda8ab604b13823)) - -## [v2.6.1](https://github.com/Xpdustry/TemplatePlugin/compare/v2.6.0...v2.6.1) - 2022-05-19 - -### Bug Fixes - -- Update changelog to follow release-please style ([9fdd102](https://github.com/Xpdustry/TemplatePlugin/commit/9fdd102941d30f3c386d6612d23ed92d3adfd968)) - -## [v2.6.0](https://github.com/Xpdustry/TemplatePlugin/compare/v2.5.1...v2.6.0) - 2022-05-19 - -### Features - -- Test release please ([3bb5d54](https://github.com/Xpdustry/TemplatePlugin/commit/3bb5d542dc8ba77583a837b2e21b89ea4f94a658)) - -### Bug Fixes - -- fix branch name in release-please ([ba2f978](https://github.com/Xpdustry/TemplatePlugin/commit/ba2f978c33bac4993f316eb58f062f8a18c007fa)) - -## [v2.5.1](https://github.com/Xpdustry/TemplatePlugin/compare/v2.5.0...v2.5.1) - 2022-05-17 - -### Added - -- Information about shading in the `README.md`. - -### Fixed - -- Typos in the `README.md`. - -## [v2.5.0](https://github.com/Xpdustry/TemplatePlugin/compare/v2.4.0...v2.5.0) - 2022-05-17 - -### Added - -- Added automatic shading task. -- Added `indra.license-header` for license headers in files. - -### Changed - -- Updated `README.md` to be more explicit. -- A little bit of formatting :^). - -## v2.4.0 - 2022-05-14 - -### Changed - -- Improved the usability of the Template. diff --git a/README.md b/README.md index 80c2826..17712ad 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # HexedPluginReloaded -[![Xpdustry latest](https://maven.xpdustry.fr/api/badge/latest/releases/fr/xpdustry/hexed-reloaded?color=00FFFF&name=HexedPluginReloaded&prefix=v)](https://github.com/Xpdustry/HexedPluginReloaded/releases) -[![Build status](https://github.com/Xpdustry/HexedPluginReloaded/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/Xpdustry/HexedPluginReloaded/actions/workflows/build.yml) +[![Xpdustry latest](https://maven.xpdustry.com/api/badge/latest/releases/com/xpdustry/hexed-reloaded?color=00FFFF&name=hexed-reloaded&prefix=v)](https://github.com/Xpdustry/HexedPluginReloaded/releases) +[![Build status](https://github.com/xpdustry/hexed-reloaded/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/Xpdustry/HexedPluginReloaded/actions/workflows/build.yml) [![Mindustry 7.0 ](https://img.shields.io/badge/Mindustry-7.0-ffd37f)](https://github.com/Anuken/Mindustry/releases) -Lol +## Description + +This plugin is a re-implementation of the original plugin from Anuken. ## Installation @@ -12,14 +14,14 @@ This plugin requires : - Java 17 or above. -- Mindustry v141 or above. +- Mindustry v146 or above. -- [Distributor](https://github.com/Xpdustry/Distributor) latest `3.0.0` snapshot. +- [Distributor](https://github.com/xpdustry/distributor) v3.2.1. ## Building - `./gradlew shadowJar` to compile the plugin into a usable jar (will be located - at `builds/libs/HexedPluginReloaded`). + at `builds/libs/hexed-reloaded.jar`). - `./gradlew jar` for a plain jar that contains only the plugin code. diff --git a/build.gradle.kts b/build.gradle.kts index 3f9cb28..1f679a1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,86 +1,77 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation -import fr.xpdustry.toxopid.dsl.anukenJitpack import fr.xpdustry.toxopid.dsl.mindustryDependencies import fr.xpdustry.toxopid.spec.ModMetadata import fr.xpdustry.toxopid.spec.ModPlatform +import fr.xpdustry.toxopid.task.GithubArtifactDownload import net.ltgt.gradle.errorprone.CheckSeverity import net.ltgt.gradle.errorprone.errorprone plugins { - id("com.diffplug.spotless") version "6.11.0" - id("net.kyori.indra") version "3.0.1" - id("net.kyori.indra.publishing") version "3.0.1" - id("net.kyori.indra.git") version "3.0.1" - id("net.kyori.indra.licenser.spotless") version "3.0.1" - id("net.ltgt.errorprone") version "3.0.1" - id("com.github.johnrengelman.shadow") version "7.1.2" - id("fr.xpdustry.toxopid") version "3.1.0" -} - -val metadata = ModMetadata.fromJson(file("plugin.json").readText()) -group = property("props.project-group").toString() -if (indraGit.headTag() == null && property("props.enable-snapshots").toString().toBoolean()) { + id("com.diffplug.spotless") version "6.22.0" + id("net.kyori.indra") version "3.1.3" + id("net.kyori.indra.publishing") version "3.1.3" + id("net.kyori.indra.git") version "3.1.3" + id("net.kyori.indra.licenser.spotless") version "3.1.3" + id("net.ltgt.errorprone") version "3.1.0" + id("com.github.johnrengelman.shadow") version "8.1.1" + id("fr.xpdustry.toxopid") version "3.2.0" + id("com.github.ben-manes.versions") version "0.49.0" +} + +val metadata = + ModMetadata( + name = "hexed-reloaded", + displayName = "HexedPluginReloaded", + author = "Xpdustry", + description = "A reimplementation of the hexed gamemode, with more features and better performances.", + version = "1.0.0", + minGameVersion = "146", + hidden = true, + java = true, + main = "com.xpdustry.hexed.HexedPluginReloaded", + repo = "xpdustry/hexed-reloaded", + dependencies = mutableListOf("distributor-core"), + ) + +// Remove the following line if you don't want snapshot versions +if (indraGit.headTag() == null) { metadata.version += "-SNAPSHOT" } + +group = "com.xpdustry" +val rootPackage = "com.xpdustry.template" version = metadata.version description = metadata.description toxopid { - compileVersion.set("v" + metadata.minGameVersion) + compileVersion.set("v${metadata.minGameVersion}") platforms.set(setOf(ModPlatform.HEADLESS)) } repositories { mavenCentral() - anukenJitpack() - maven("https://maven.xpdustry.fr/releases") { - name = "xpdustry-releases" - mavenContent { releasesOnly() } - } - maven("https://maven.xpdustry.fr/snapshots") { - name = "xpdustry-snapshots" - mavenContent { snapshotsOnly() } - } -} - -val mindustryRuntime = configurations.register("mindustryRuntime") { - resolutionStrategy { - cacheDynamicVersionsFor(0, TimeUnit.SECONDS) - cacheChangingModulesFor(0, TimeUnit.SECONDS) - } + // This repository provides mindustry artifacts built by xpdustry + maven("https://maven.xpdustry.com/mindustry") + // This repository provides xpdustry libraries, such as the distributor-api + maven("https://maven.xpdustry.com/releases") } dependencies { mindustryDependencies() - compileOnly("fr.xpdustry:distributor-api:3.0.0-SNAPSHOT") + compileOnly("fr.xpdustry:distributor-api:3.2.1") implementation("fr.xpdustry:nucleus-mindustry-testing:2023.3.2") - val junit = "5.9.0" + val junit = "5.10.1" testImplementation("org.junit.jupiter:junit-jupiter-params:$junit") testImplementation("org.junit.jupiter:junit-jupiter-api:$junit") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit") - val checker = "3.27.0" + val checker = "3.40.0" compileOnly("org.checkerframework:checker-qual:$checker") testImplementation("org.checkerframework:checker-qual:$checker") // Static analysis - annotationProcessor("com.uber.nullaway:nullaway:0.10.6") - errorprone("com.google.errorprone:error_prone_core:2.17.0") - mindustryRuntime.configure { - invoke( - group = "fr.xpdustry", - name = "distributor-core", - version = "3.0.0-SNAPSHOT", - classifier = "plugin" - ) - } -} - -signing { - val signingKey: String? by project - val signingPassword: String? by project - useInMemoryPgpKeys(signingKey, signingPassword) + annotationProcessor("com.uber.nullaway:nullaway:0.10.16") + errorprone("com.google.errorprone:error_prone_core:2.23.0") } indra { @@ -89,8 +80,8 @@ indra { minimumToolchain(17) } - publishSnapshotsTo("xpdustry", "https://maven.xpdustry.fr/snapshots") - publishReleasesTo("xpdustry", "https://maven.xpdustry.fr/releases") + publishSnapshotsTo("xpdustry", "https://maven.xpdustry.com/snapshots") + publishReleasesTo("xpdustry", "https://maven.xpdustry.com/releases") // The license of your project, kyori has already functions for the most common licenses // such as gpl3OnlyLicense() for GPLv3, apache2License() for Apache 2.0, etc. @@ -109,24 +100,29 @@ indra { configurePublications { pom { organization { - name.set("Xpdustry") - url.set("https://www.xpdustry.fr") - } - - developers { - developer { - id.set(metadata.author) - } + name.set("xpdustry") + url.set("https://www.xpdustry.com") } } } } +signing { + val signingKey: String? by project + val signingPassword: String? by project + useInMemoryPgpKeys(signingKey, signingPassword) +} + spotless { java { + // Palantir is an excellent java linter, balanced between google codestyle and regular java codestyle palantirJavaFormat() formatAnnotations() + // Makes sure static imports are after normal imports importOrderFile(rootProject.file(".spotless/project.importorder")) + // Makes sure there is no wildcard imports. + // If you want to allow them, + // remove the following line and the bumpThisNumberIfACustomStepChanges(1) custom("noWildcardImports") { if (it.contains("*;\n")) { throw Error("No wildcard imports allowed") @@ -146,21 +142,16 @@ indraSpotlessLicenser { property("NAME", metadata.displayName) property("DESCRIPTION", metadata.description) property("AUTHOR", metadata.author) - property("YEAR", property("props.project-year").toString()) + property("YEAR", "2023") } -tasks.withType(JavaCompile::class.java).configureEach { +tasks.withType { options.errorprone { disableWarningsInGeneratedCode.set(true) - disable( - "MissingSummary", - "FutureReturnValueIgnored", - "InlineMeSuggester", - "EmptyCatch" - ) - if (!name.contains("test", true)) { + disable("MissingSummary", "InlineMeSuggester") + if (!name.contains("test", ignoreCase = true)) { check("NullAway", CheckSeverity.ERROR) - option("NullAway:AnnotatedPackages", project.property("props.root-package").toString()) + option("NullAway:AnnotatedPackages", rootPackage) option("NullAway:TreatGeneratedAsUnannotated", true) } } @@ -171,19 +162,17 @@ tasks.register("getArtifactPath") { doLast { println(tasks.shadowJar.get().archiveFile.get().toString()) } } -// Relocates dependencies -val relocate = tasks.register("relocateShadowJar") { - target = tasks.shadowJar.get() - prefix = project.property("props.root-package").toString() + ".shadow" -} - tasks.shadowJar { - // Makes sure the name of the final jar is (plugin-display-name).jar - archiveFileName.set(metadata.displayName + ".jar") + // Makes sure the name of the final jar is (plugin-name).jar + archiveFileName.set("${metadata.name}.jar") // Set the classifier to plugin for publication on a maven repository archiveClassifier.set("plugin") - // Configure the dependencies shading - dependsOn(relocate) + // Configure the dependencies shading. + // WARNING: SQL drivers do not play well with shading, + // the best solution would be to load them in an isolated classloader. + // If it's too difficult, you can disable relocation but be aware this can conflict with other plugins. + isEnableRelocation = true + relocationPrefix = "$rootPackage.shadow" // Reduce shadow jar size by removing unused classes. // Warning, if one of your dependencies use service loaders or reflection, add to the exclude list // such as "minimize { exclude(dependency("some.group:some-dependency:.*")) }" @@ -205,10 +194,14 @@ tasks.build { dependsOn(tasks.shadowJar) } -tasks.runMindustryServer { - mods.setFrom(tasks.shadowJar, mindustryRuntime) -} +val downloadDistributorCore = + tasks.register("downloadDistributorCore") { + user.set("xpdustry") + repo.set("distributor") + version.set("v3.2.1") + name.set("distributor-core.jar") + } -tasks.runMindustryClient { - mods.setFrom() +tasks.runMindustryServer { + mods.setFrom(tasks.shadowJar, downloadDistributorCore) } diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index ea9475b..0000000 --- a/gradle.properties +++ /dev/null @@ -1,12 +0,0 @@ -# The project name, used as the artifact name -props.project-name=hexed-reloaded -# The group of the project, usually a domain backwards such as com.google -props.project-group=fr.xpdustry -# The year the project started -props.project-year=2023 -# The root java package of the plugin for NullAway and Shadow -props.root-package=fr.xpdustry.hexed -# Whether a snapshot suffix should be added to the version string. -# This option is for more advanced plugins, basically for any non-official builds, the "-SNAPSHOT" suffix -# is added to the version string to be able to distinguish between experimental and stable builds. -props.enable-snapshots=true \ No newline at end of file diff --git a/plugin.json b/plugin.json deleted file mode 100644 index 683d53d..0000000 --- a/plugin.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "hexed-reloaded", - "displayName": "HexedPluginReloaded", - "author": "Xpdustry", - "description": "A reimplementation of the hexed gamemode, with more features and better performances.", - "version": "1.0.0", - "minGameVersion": "142", - "hidden": true, - "java": true, - "main": "fr.xpdustry.hexed.HexedPluginReloaded", - "repo": "Xpdustry/HexedPluginReloaded", - "dependencies": [ - "distributor-core" - ] -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 19be275..80a1011 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,2 @@ -import java.util.Properties - -val props = Properties() -file("./gradle.properties").reader().use { props.load(it) } -rootProject.name = props.getProperty("props.project-name") +// The project name, used as the name of the final artifact +rootProject.name = "hexed-reloaded" diff --git a/src/main/java/fr/xpdustry/hexed/HexedLogic.java b/src/main/java/com/xpdustry/hexed/HexedLogic.java similarity index 98% rename from src/main/java/fr/xpdustry/hexed/HexedLogic.java rename to src/main/java/com/xpdustry/hexed/HexedLogic.java index a3dee6e..98a7e3a 100644 --- a/src/main/java/fr/xpdustry/hexed/HexedLogic.java +++ b/src/main/java/com/xpdustry/hexed/HexedLogic.java @@ -16,21 +16,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed; +package com.xpdustry.hexed; import arc.math.Mathf; import arc.util.Interval; import arc.util.Time; +import com.xpdustry.hexed.event.HexCaptureEvent; +import com.xpdustry.hexed.event.HexLostEvent; +import com.xpdustry.hexed.event.HexPlayerJoinEvent; +import com.xpdustry.hexed.event.HexPlayerQuitEvent; import fr.xpdustry.distributor.api.DistributorProvider; import fr.xpdustry.distributor.api.event.EventHandler; import fr.xpdustry.distributor.api.plugin.PluginListener; import fr.xpdustry.distributor.api.scheduler.MindustryTimeUnit; import fr.xpdustry.distributor.api.scheduler.TaskHandler; import fr.xpdustry.distributor.api.util.ArcCollections; -import fr.xpdustry.hexed.event.HexCaptureEvent; -import fr.xpdustry.hexed.event.HexLostEvent; -import fr.xpdustry.hexed.event.HexPlayerJoinEvent; -import fr.xpdustry.hexed.event.HexPlayerQuitEvent; import java.util.ArrayList; import java.util.Comparator; import java.util.List; diff --git a/src/main/java/fr/xpdustry/hexed/HexedPluginReloaded.java b/src/main/java/com/xpdustry/hexed/HexedPluginReloaded.java similarity index 92% rename from src/main/java/fr/xpdustry/hexed/HexedPluginReloaded.java rename to src/main/java/com/xpdustry/hexed/HexedPluginReloaded.java index daf1a53..5f6b8a3 100644 --- a/src/main/java/fr/xpdustry/hexed/HexedPluginReloaded.java +++ b/src/main/java/com/xpdustry/hexed/HexedPluginReloaded.java @@ -16,13 +16,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed; +package com.xpdustry.hexed; import arc.util.CommandHandler; +import com.xpdustry.hexed.commands.AnnotationCommandManager; +import com.xpdustry.hexed.commands.HexedGameCommands; +import com.xpdustry.hexed.commands.HexedStartCommand; import fr.xpdustry.distributor.api.plugin.AbstractMindustryPlugin; -import fr.xpdustry.hexed.commands.AnnotationCommandManager; -import fr.xpdustry.hexed.commands.HexedGameCommands; -import fr.xpdustry.hexed.commands.HexedStartCommand; import mindustry.Vars; @SuppressWarnings("unused") diff --git a/src/main/java/fr/xpdustry/hexed/HexedRenderer.java b/src/main/java/com/xpdustry/hexed/HexedRenderer.java similarity index 96% rename from src/main/java/fr/xpdustry/hexed/HexedRenderer.java rename to src/main/java/com/xpdustry/hexed/HexedRenderer.java index a35f178..e5d9684 100644 --- a/src/main/java/fr/xpdustry/hexed/HexedRenderer.java +++ b/src/main/java/com/xpdustry/hexed/HexedRenderer.java @@ -16,19 +16,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed; +package com.xpdustry.hexed; import arc.math.Mathf; import arc.util.Align; import arc.util.Interval; import arc.util.Strings; import arc.util.Time; +import com.xpdustry.hexed.event.HexCaptureEvent; +import com.xpdustry.hexed.event.HexLostEvent; +import com.xpdustry.hexed.event.HexPlayerQuitEvent; +import com.xpdustry.hexed.model.Hex; import fr.xpdustry.distributor.api.event.EventHandler; import fr.xpdustry.distributor.api.plugin.PluginListener; -import fr.xpdustry.hexed.event.HexCaptureEvent; -import fr.xpdustry.hexed.event.HexLostEvent; -import fr.xpdustry.hexed.event.HexPlayerQuitEvent; -import fr.xpdustry.hexed.model.Hex; import java.util.ArrayList; import java.util.List; import mindustry.game.EventType; diff --git a/src/main/java/fr/xpdustry/hexed/HexedState.java b/src/main/java/com/xpdustry/hexed/HexedState.java similarity index 99% rename from src/main/java/fr/xpdustry/hexed/HexedState.java rename to src/main/java/com/xpdustry/hexed/HexedState.java index 4bf46cd..b3d2d8e 100644 --- a/src/main/java/fr/xpdustry/hexed/HexedState.java +++ b/src/main/java/com/xpdustry/hexed/HexedState.java @@ -16,13 +16,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed; +package com.xpdustry.hexed; import arc.math.geom.Point2; import arc.struct.IntFloatMap; import arc.struct.IntMap; import arc.util.Timekeeper; -import fr.xpdustry.hexed.model.Hex; +import com.xpdustry.hexed.model.Hex; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; diff --git a/src/main/java/fr/xpdustry/hexed/HexedTeamAssigner.java b/src/main/java/com/xpdustry/hexed/HexedTeamAssigner.java similarity index 98% rename from src/main/java/fr/xpdustry/hexed/HexedTeamAssigner.java rename to src/main/java/com/xpdustry/hexed/HexedTeamAssigner.java index 4b9c91a..f20991f 100644 --- a/src/main/java/fr/xpdustry/hexed/HexedTeamAssigner.java +++ b/src/main/java/com/xpdustry/hexed/HexedTeamAssigner.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed; +package com.xpdustry.hexed; import arc.struct.Seq; import java.util.Arrays; diff --git a/src/main/java/fr/xpdustry/hexed/HexedUtils.java b/src/main/java/com/xpdustry/hexed/HexedUtils.java similarity index 98% rename from src/main/java/fr/xpdustry/hexed/HexedUtils.java rename to src/main/java/com/xpdustry/hexed/HexedUtils.java index e22ac6c..adfa00f 100644 --- a/src/main/java/fr/xpdustry/hexed/HexedUtils.java +++ b/src/main/java/com/xpdustry/hexed/HexedUtils.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed; +package com.xpdustry.hexed; import java.util.Optional; import mindustry.gen.Groups; diff --git a/src/main/java/fr/xpdustry/hexed/commands/AnnotationCommandManager.java b/src/main/java/com/xpdustry/hexed/commands/AnnotationCommandManager.java similarity index 97% rename from src/main/java/fr/xpdustry/hexed/commands/AnnotationCommandManager.java rename to src/main/java/com/xpdustry/hexed/commands/AnnotationCommandManager.java index 97d3786..df72b4d 100644 --- a/src/main/java/fr/xpdustry/hexed/commands/AnnotationCommandManager.java +++ b/src/main/java/com/xpdustry/hexed/commands/AnnotationCommandManager.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.commands; +package com.xpdustry.hexed.commands; import cloud.commandframework.annotations.AnnotationParser; import fr.xpdustry.distributor.api.command.ArcCommandManager; diff --git a/src/main/java/fr/xpdustry/hexed/commands/HexedGameCommands.java b/src/main/java/com/xpdustry/hexed/commands/HexedGameCommands.java similarity index 94% rename from src/main/java/fr/xpdustry/hexed/commands/HexedGameCommands.java rename to src/main/java/com/xpdustry/hexed/commands/HexedGameCommands.java index bdd3488..9fe7aaa 100644 --- a/src/main/java/fr/xpdustry/hexed/commands/HexedGameCommands.java +++ b/src/main/java/com/xpdustry/hexed/commands/HexedGameCommands.java @@ -16,21 +16,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.commands; +package com.xpdustry.hexed.commands; import arc.util.CommandHandler; import cloud.commandframework.annotations.Argument; import cloud.commandframework.annotations.CommandDescription; import cloud.commandframework.annotations.CommandMethod; import cloud.commandframework.annotations.CommandPermission; +import com.xpdustry.hexed.HexedPluginReloaded; +import com.xpdustry.hexed.HexedState; +import com.xpdustry.hexed.HexedUtils; +import com.xpdustry.hexed.event.HexPlayerJoinEvent; +import com.xpdustry.hexed.event.HexPlayerQuitEvent; import fr.xpdustry.distributor.api.DistributorProvider; import fr.xpdustry.distributor.api.command.sender.CommandSender; import fr.xpdustry.distributor.api.plugin.PluginListener; -import fr.xpdustry.hexed.HexedPluginReloaded; -import fr.xpdustry.hexed.HexedState; -import fr.xpdustry.hexed.HexedUtils; -import fr.xpdustry.hexed.event.HexPlayerJoinEvent; -import fr.xpdustry.hexed.event.HexPlayerQuitEvent; import java.util.stream.Collectors; import mindustry.game.Team; import mindustry.gen.Player; diff --git a/src/main/java/fr/xpdustry/hexed/commands/HexedStartCommand.java b/src/main/java/com/xpdustry/hexed/commands/HexedStartCommand.java similarity index 95% rename from src/main/java/fr/xpdustry/hexed/commands/HexedStartCommand.java rename to src/main/java/com/xpdustry/hexed/commands/HexedStartCommand.java index a457985..8d896d3 100644 --- a/src/main/java/fr/xpdustry/hexed/commands/HexedStartCommand.java +++ b/src/main/java/com/xpdustry/hexed/commands/HexedStartCommand.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.commands; +package com.xpdustry.hexed.commands; import arc.util.CommandHandler; import cloud.commandframework.annotations.Argument; @@ -24,11 +24,11 @@ import cloud.commandframework.annotations.CommandMethod; import cloud.commandframework.annotations.CommandPermission; import cloud.commandframework.annotations.Flag; +import com.xpdustry.hexed.HexedPluginReloaded; +import com.xpdustry.hexed.generator.AnukeHexedGenerator; +import com.xpdustry.hexed.generator.HexedGeneratorContext; import fr.xpdustry.distributor.api.command.sender.CommandSender; import fr.xpdustry.distributor.api.plugin.PluginListener; -import fr.xpdustry.hexed.HexedPluginReloaded; -import fr.xpdustry.hexed.generator.AnukeHexedGenerator; -import fr.xpdustry.hexed.generator.HexedGeneratorContext; import fr.xpdustry.nucleus.mindustry.testing.map.MapGenerator; import fr.xpdustry.nucleus.mindustry.testing.map.MapLoader; import java.io.IOException; diff --git a/src/main/java/fr/xpdustry/hexed/event/HexCaptureEvent.java b/src/main/java/com/xpdustry/hexed/event/HexCaptureEvent.java similarity index 92% rename from src/main/java/fr/xpdustry/hexed/event/HexCaptureEvent.java rename to src/main/java/com/xpdustry/hexed/event/HexCaptureEvent.java index af2c43a..68737f0 100644 --- a/src/main/java/fr/xpdustry/hexed/event/HexCaptureEvent.java +++ b/src/main/java/com/xpdustry/hexed/event/HexCaptureEvent.java @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.event; +package com.xpdustry.hexed.event; -import fr.xpdustry.hexed.model.Hex; +import com.xpdustry.hexed.model.Hex; import mindustry.gen.Player; public record HexCaptureEvent(Player player, Hex hex) {} diff --git a/src/main/java/fr/xpdustry/hexed/event/HexLostEvent.java b/src/main/java/com/xpdustry/hexed/event/HexLostEvent.java similarity index 92% rename from src/main/java/fr/xpdustry/hexed/event/HexLostEvent.java rename to src/main/java/com/xpdustry/hexed/event/HexLostEvent.java index b99d039..e7250d8 100644 --- a/src/main/java/fr/xpdustry/hexed/event/HexLostEvent.java +++ b/src/main/java/com/xpdustry/hexed/event/HexLostEvent.java @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.event; +package com.xpdustry.hexed.event; -import fr.xpdustry.hexed.model.Hex; +import com.xpdustry.hexed.model.Hex; import mindustry.gen.Player; public record HexLostEvent(Player player, Hex hex) {} diff --git a/src/main/java/fr/xpdustry/hexed/event/HexPlayerJoinEvent.java b/src/main/java/com/xpdustry/hexed/event/HexPlayerJoinEvent.java similarity index 96% rename from src/main/java/fr/xpdustry/hexed/event/HexPlayerJoinEvent.java rename to src/main/java/com/xpdustry/hexed/event/HexPlayerJoinEvent.java index 5687904..f2d4605 100644 --- a/src/main/java/fr/xpdustry/hexed/event/HexPlayerJoinEvent.java +++ b/src/main/java/com/xpdustry/hexed/event/HexPlayerJoinEvent.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.event; +package com.xpdustry.hexed.event; import mindustry.gen.Player; diff --git a/src/main/java/fr/xpdustry/hexed/event/HexPlayerQuitEvent.java b/src/main/java/com/xpdustry/hexed/event/HexPlayerQuitEvent.java similarity index 96% rename from src/main/java/fr/xpdustry/hexed/event/HexPlayerQuitEvent.java rename to src/main/java/com/xpdustry/hexed/event/HexPlayerQuitEvent.java index a57215d..1f4d040 100644 --- a/src/main/java/fr/xpdustry/hexed/event/HexPlayerQuitEvent.java +++ b/src/main/java/com/xpdustry/hexed/event/HexPlayerQuitEvent.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.event; +package com.xpdustry.hexed.event; import mindustry.game.Team; import mindustry.gen.Player; diff --git a/src/main/java/fr/xpdustry/hexed/generator/AnukeHexedGenerator.java b/src/main/java/com/xpdustry/hexed/generator/AnukeHexedGenerator.java similarity index 98% rename from src/main/java/fr/xpdustry/hexed/generator/AnukeHexedGenerator.java rename to src/main/java/com/xpdustry/hexed/generator/AnukeHexedGenerator.java index 0adc5e3..31583e5 100644 --- a/src/main/java/fr/xpdustry/hexed/generator/AnukeHexedGenerator.java +++ b/src/main/java/com/xpdustry/hexed/generator/AnukeHexedGenerator.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.generator; +package com.xpdustry.hexed.generator; import arc.math.Mathf; import arc.math.geom.Bresenham2; @@ -26,8 +26,8 @@ import arc.struct.Seq; import arc.util.Structs; import arc.util.noise.Simplex; -import fr.xpdustry.hexed.model.Hex; -import fr.xpdustry.hexed.model.Hexagon; +import com.xpdustry.hexed.model.Hex; +import com.xpdustry.hexed.model.Hexagon; import fr.xpdustry.nucleus.mindustry.testing.map.MapGenerator; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/fr/xpdustry/hexed/generator/HexedGeneratorContext.java b/src/main/java/com/xpdustry/hexed/generator/HexedGeneratorContext.java similarity index 95% rename from src/main/java/fr/xpdustry/hexed/generator/HexedGeneratorContext.java rename to src/main/java/com/xpdustry/hexed/generator/HexedGeneratorContext.java index 4a83e81..3685083 100644 --- a/src/main/java/fr/xpdustry/hexed/generator/HexedGeneratorContext.java +++ b/src/main/java/com/xpdustry/hexed/generator/HexedGeneratorContext.java @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.generator; +package com.xpdustry.hexed.generator; -import fr.xpdustry.hexed.model.Hex; +import com.xpdustry.hexed.model.Hex; import fr.xpdustry.nucleus.mindustry.testing.map.MapContext; import java.util.List; import java.util.function.Predicate; diff --git a/src/main/java/fr/xpdustry/hexed/generator/SimpleHexedGeneratorContext.java b/src/main/java/com/xpdustry/hexed/generator/SimpleHexedGeneratorContext.java similarity index 97% rename from src/main/java/fr/xpdustry/hexed/generator/SimpleHexedGeneratorContext.java rename to src/main/java/com/xpdustry/hexed/generator/SimpleHexedGeneratorContext.java index d27e6a1..180dba1 100644 --- a/src/main/java/fr/xpdustry/hexed/generator/SimpleHexedGeneratorContext.java +++ b/src/main/java/com/xpdustry/hexed/generator/SimpleHexedGeneratorContext.java @@ -16,10 +16,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.generator; +package com.xpdustry.hexed.generator; -import fr.xpdustry.hexed.HexedPluginReloaded; -import fr.xpdustry.hexed.model.Hex; +import com.xpdustry.hexed.HexedPluginReloaded; +import com.xpdustry.hexed.model.Hex; import fr.xpdustry.nucleus.mindustry.testing.map.SimpleMapContext; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/fr/xpdustry/hexed/model/Hex.java b/src/main/java/com/xpdustry/hexed/model/Hex.java similarity index 97% rename from src/main/java/fr/xpdustry/hexed/model/Hex.java rename to src/main/java/com/xpdustry/hexed/model/Hex.java index 6bce9d4..0d749b0 100644 --- a/src/main/java/fr/xpdustry/hexed/model/Hex.java +++ b/src/main/java/com/xpdustry/hexed/model/Hex.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.model; +package com.xpdustry.hexed.model; import mindustry.Vars; diff --git a/src/main/java/fr/xpdustry/hexed/model/Hexagon.java b/src/main/java/com/xpdustry/hexed/model/Hexagon.java similarity index 98% rename from src/main/java/fr/xpdustry/hexed/model/Hexagon.java rename to src/main/java/com/xpdustry/hexed/model/Hexagon.java index 6728550..61e5f52 100644 --- a/src/main/java/fr/xpdustry/hexed/model/Hexagon.java +++ b/src/main/java/com/xpdustry/hexed/model/Hexagon.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package fr.xpdustry.hexed.model; +package com.xpdustry.hexed.model; import arc.math.geom.Intersector;