|
1 | | -# Spigot Plugin Template |
2 | | - |
3 | | -[](../../actions?query=workflow%3ABuild) |
4 | | -[](../../releases) |
5 | | - |
6 | | -[](https://www.spigotmc.org/resources/splugintemplate.79903/) |
7 | | -[](https://www.spigotmc.org/resources/splugintemplate.79903/) |
8 | | -[](https://codecov.io/gh/Silthus/spigot-plugin-template) |
9 | | -[](http://commitizen.github.io/cz-cli/) |
10 | | -[](https://github.com/semantic-release/semantic-release) |
11 | | -[](https://discord.gg/R4st4QxAjb) |
12 | | - |
13 | | -You can use this template to develop your own high quality Spigot plugins using [Gradle](https://gradle.org/) with ease. |
14 | | - |
15 | | -> See the [minecraft-server-template](https://github.com/Silthus/minecraft-server-template) for quick starting your Minecraft network in under 30 seconds. |
16 | | -
|
17 | | -* [Features](#features) |
18 | | -* [Quickstart setup](#quickstart-setup) |
19 | | -* [Releasing a new version of your plugin](#releasing-a-new-version-of-your-plugin) |
20 | | - * [Commit message format](#commit-message-format) |
21 | | -* [Publishing your maven package](#publishing-your-maven-package) |
22 | | - * [About the group and artifactId](#about-the-group-and-artifactid) |
23 | | - * [Github Package Authentication](#github-package-authentication) |
24 | | -* [Debugging your plugin](#debugging-your-plugin) |
25 | | - * [Copy your plugin automatically](#copy-your-plugin-automatically) |
26 | | - * [Running and debugging the Minecraft server](#running-and-debugging-the-minecraft-server) |
27 | | -* [References](#references) |
28 | | - |
29 | | -## Features |
30 | | - |
31 | | -The template or better boilerplate comes with a lot of features that are useful if you want to develop high quality plugins. However you don't need to use all of them, you can simply remove the features you don't need. |
32 | | - |
33 | | -* Ready to use [**Gradle**](https://gradle.org/) project with lots of utility tasks |
34 | | -* Automatic **generation of `plugin.yaml`** based of project properties with [SpiGradle](https://github.com/EntryPointKR/Spigradle/) |
35 | | -* Integrated [**Spigot test server**](https://github.com/EntryPointKR/Spigradle/) with a one click build, copy plugin and start debugging in IntelliJ task |
36 | | -* [**Gradle shadow plugin**](https://imperceptiblethoughts.com/shadow/) to easily ship your needed dependencies with your plugin |
37 | | -* Example integrations including tests for the [Annotation Command Framework](https://github.com/aikar/commands/) and [Vault](https://github.com/MilkBowl/VaultAPI). |
38 | | -* **[JUnit 5](https://junit.org/junit5/docs/current/user-guide/)** test setup including [MockBukkit](https://github.com/seeseemelk/MockBukkit) and [AssertJ](https://joel-costigliola.github.io/assertj/) |
39 | | -* **[Jacoco](https://github.com/jacoco/jacoco) code coverage** report including an upload task to [codecov](https://codecov.io/) |
40 | | -* Fully integrated [**semantic-release**](https://semantic-release.gitbook.io/semantic-release/) release pipeline |
41 | | -* Automatic [**changelog generation**](https://github.com/semantic-release/changelog) based on [conventional commit messages](https://www.conventionalcommits.org/) |
42 | | -* [**Github Actions**](https://github.com/features/actions) workflow for build and release |
43 | | -* Publishing of **maven artifacts** to [GitHub Packages](https://github.com/features/packages) |
44 | | - > no more need for self hosted nexus or artifactory server |
45 | | -* GitHub [**issue templates**](https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository) for bug and feature requests |
46 | | -* Contributing and Code of Conduct **guidelines** |
47 | | -* Nice [**badges**](https://shields.io) to show of your project |
48 | | - |
49 | | -## Quickstart setup |
50 | | - |
51 | | -* Create a [new Github project](https://github.com/Silthus/spigot-plugin-template/generate) using this template. |
52 | | -* **Clone** the new repository and open it in IntelliJ. |
53 | | -* **Update** the **gradle.properties** file and change the following variables: |
54 | | - * `group`: your-maven-group-id (e.g.: io.github.silthus) |
55 | | - * `pluginName`: YourPluginName |
56 | | - * `author`: YourName |
57 | | -* **Update** the `root.projectName` inside **settings.gradle**. This will be your `artifactId`. |
58 | | -* **Delete** the `CHANGELOG.md`. It will be generated on your [first release](#releasing-a-new-version-of-your-plugin). |
59 | | -* **Update** the `README` to point to your project and spigot resource id. |
60 | | -* **Rename** the java package and plugin to match your project. |
61 | | -* Then execute the `prepareSpigotPlugins` gradle task this will try to download all plugin denpendencies and puts them into `debug/spigot/plugins/`. |
62 | | -* **Start** the Minecraft server by executing the `debugPaper` task. This will start the server in the background and you can connect to it using the `localhost:25565` address. |
63 | | -* **Code away :)** - *and once you are ready, push your commit (in [conventional commit style](#commit-message-format)) to master.* |
64 | | - |
65 | | - |
66 | | - |
67 | | -Please read the [Contributing Guidelines](CONTRIBUTING.md) before submitting any pull requests or opening issues. |
68 | | - |
69 | | -> **NOTE** |
70 | | -> You might need to run the `gradle clean` task after renaming the packages and reimport the gradle project to resolve errors with generating the `plugin.yml`. |
71 | | -
|
72 | | -## Releasing a new version of your plugin |
73 | | - |
74 | | -One of the major benefits of this template is the fact that it will **automatically release a new version** on every push to `master` based on your commit messages. This makes sure your plugin is released following the [semantic versioning](https://semver.org/) guidelines. For this to work you have to follow a few simple rules: |
75 | | - |
76 | | -* Commit only working and tested code to the master branch. *Use Pull Requests to work on bigger features or bug fixes and merge them when you are ready.* |
77 | | -* Every bugfix, feature and change should have one commit associated with it. *Do not mix multiple bugs, features, etc. into one huge commit message. Keep your commit size small and commit often.* |
78 | | -* Your commit messages must follow the [conventional commit rules](https://www.conventionalcommits.org/). |
| 1 | +# MatrixStats2 |
| 2 | + |
| 3 | +[](../../actions?query=workflow%3ABuild) |
| 4 | +[](../../releases) |
| 5 | + |
| 6 | +Minecraft plugin which provides player stats to an angular frontend. The stats can be accessed by players by logging in using their in-game credentials. (AuthMe) |
79 | 7 |
|
80 | 8 | ### Commit message format |
81 | 9 |
|
@@ -151,44 +79,6 @@ Refs #133 |
151 | 79 |
|
152 | 80 | </details> |
153 | 81 |
|
154 | | -## Publishing your maven package |
155 | | - |
156 | | -Your plugin will be automatically published as a maven package on [Github packages](https://github.com/features/packages) as soon as you [release a new version](#releasing-a-new-version-of-your-plugin). |
157 | | - |
158 | | -### About the group and artifactId |
159 | | - |
160 | | -The `group` appended by your `artifactId` is used to uniquely identify your project when importing it in other projects. When you import spigot in your project you use the group `org.spigotmc` followed by the artifactId `spigot-api` and the version. |
161 | | - |
162 | | -The following was taken from the [offical maven naming guide](https://maven.apache.org/guides/mini/guide-naming-conventions.html). |
163 | | - |
164 | | -* `groupId` uniquely identifies your project across all projects. A group ID should follow [Java's package name rules](https://docs.oracle.com/javase/specs/jls/se6/html/packages.html#7.7). This means it starts with a reversed domain name you control. For example: `org.apache.maven`, `org.apache.commons`. |
165 | | - If you dont't own a domain, you can use the github domain `io.github` appended by your Github username, e.g. `io.github.silthus` |
166 | | -* `artifactId` is the name of the jar without version. If you created it, then you can choose whatever name you want with lowercase letters and no strange symbols. For example: `maven, commons-math |
167 | | - |
168 | | -### Github Package Authentication |
169 | | - |
170 | | -You need to configure [authentication for Github Packages](https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages#authenticating-to-github-packages) if you want to use your maven package in other projects. |
171 | | - |
172 | | -1. [Create a Github Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) |
173 | | -2. Create or update the `gradle.properties` inside `C:\Users\%username%\.gradle` with the following and replace `YOUR_GITHUB_USERNAME` with your Github username and `YOUR_PERSONAL_ACCESS_TOKEN` with the access token from step 1. |
174 | | - |
175 | | -```properties |
176 | | -gpr.user=YOUR_GITHUB_USERNAME |
177 | | -gpr.key=YOUR_PERSONAL_ACCESS_TOKEN |
178 | | -``` |
179 | | - |
180 | | -## Debugging your plugin |
181 | | - |
182 | | -### Copy your plugin automatically |
183 | | - |
184 | | -You can export your plugin to the plugins directory from your working directory with the Gradle **prepareSpigotPlugins** task. The task will **build and copy** your plugin **automatically** into the `plugins/` directory. |
185 | | - |
186 | | -### Running and debugging the Minecraft server |
187 | | - |
188 | | -You can run or debug your plugin using the `Server` run configuration from within IntelliJ to automatically download the Minecraft server, built it, copy your and dependent plugins into it and start it in debugging mode. |
189 | | - |
190 | | -This is due to the awesome power of Spigradle's debug tasks. Find out more on the [Spigradle Github page](https://github.com/spigradle/spigradle). |
191 | | - |
192 | 82 | ## References |
193 | 83 |
|
194 | 84 | * [Spigradle](https://github.com/spigradle/spigradle/): *provides awesome gradle tasks that make your live a lot easier* |
|
0 commit comments