generated from AllayMC/JavaPluginTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 77b23a1
Showing
12 changed files
with
541 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build with Gradle | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
paths: | ||
- .github/workflows/build.yml | ||
- src/** | ||
pull_request: | ||
paths: | ||
- .github/workflows/build.yml | ||
- src/** | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Support for ipv6 | ||
- name: Set up WARP | ||
uses: fscarmen/[email protected] | ||
if: contains(github.ref_name, 'master') | ||
with: | ||
stack: dual | ||
- uses: actions/checkout@v4 | ||
- run: chmod +x gradlew | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'zulu' | ||
- name: Setup gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
gradle-version: wrapper | ||
cache-overwrite-existing: true | ||
cache-read-only: false | ||
build-scan-publish: true | ||
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | ||
build-scan-terms-of-use-agree: "yes" | ||
- name: Build | ||
run: ./gradlew build | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
if: success() && contains(github.ref_name, 'master') | ||
with: | ||
path: build/libs/*.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
### Eclipse ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Mac OS ### | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 AllayMC | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Allay Java Plugin Template | ||
|
||
Welcome to the java plugin template for allay. | ||
|
||
## Prerequisites | ||
|
||
- Java21 or higher. | ||
- Allay installed. | ||
|
||
## Getting Started | ||
|
||
1. **Clone this Repository** | ||
|
||
```bash | ||
git clone https://github.com/AllayMC/JavaPluginTemplate.git | ||
``` | ||
|
||
2. **Navigate to the Cloned Directory** | ||
|
||
```bash | ||
cd JavaPluginTemplate | ||
``` | ||
|
||
3. **Change Plugin Information** | ||
|
||
- Rename package name from `org.allaymc.javaplugintemplate` to `your.group.name.and.pluginname` | ||
- Edit [build.gradle.kts](build.gradle.kts) and [settings.gradle.kts](settings.gradle.kts) | ||
- Edit [plugin.json](src/main/resources/plugin.json) | ||
- Reload gradle | ||
|
||
4. **Build and Run Your Plugin** | ||
|
||
```bash | ||
gradlew shadowJar | ||
``` | ||
|
||
This command will produce a `.jar` file in the `build/libs` directory. | ||
Copy the `.jar` file to the `plugins` directory of your allay server. | ||
Start the allay server and check the logs to ensure your plugin loads and operates | ||
as expected. | ||
|
||
## Documentation | ||
|
||
For a deeper dive into the Allay API and its functionalities, please refer to our [documentation](https://docs.allaymc.org) (WIP). | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
plugins { | ||
id("java-library") | ||
id("com.github.johnrengelman.shadow") version "8.1.1" | ||
} | ||
|
||
group = "org.allaymc.myplugin" | ||
description = "My plugin" | ||
version = "1.0.0" | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(21) | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven("https://www.jitpack.io/") | ||
maven("https://repo.opencollab.dev/maven-releases/") | ||
maven("https://repo.opencollab.dev/maven-snapshots/") | ||
maven("https://storehouse.okaeri.eu/repository/maven-public/") | ||
} | ||
|
||
dependencies { | ||
compileOnly(group = "com.github.AllayMC.Allay", name = "Allay-API", version = "master-SNAPSHOT") | ||
compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.34") | ||
|
||
annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.34") | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Sun Sep 01 22:03:52 CST 2024 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.