-
Notifications
You must be signed in to change notification settings - Fork 2
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 2a80b1b
Showing
26 changed files
with
752 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @WillFP |
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,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Discord | ||
url: https://discord.gg/ZcwpSsE/ | ||
about: Issues have moved to Discord, please join the server to get help! |
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,11 @@ | ||
--- | ||
name: Report a Bug | ||
about: Report an issue with the plugin | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
--- | ||
|
||
# Please report bugs on the discord! | ||
|
||
[Join by clicking here](https://discord.gg/ZcwpSsE/) |
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,33 @@ | ||
name: Publish Packages | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [ created ] | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout latest code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Change wrapper permissions | ||
run: chmod +x ./gradlew | ||
|
||
- name: Publish package | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: publish | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} |
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,23 @@ | ||
# Java | ||
*.class | ||
|
||
# Eclipse IDE | ||
.settings/ | ||
bin/ | ||
.classpath | ||
.project | ||
|
||
# IntelliJ IDEA | ||
.idea/ | ||
*.iml | ||
|
||
# Gradle | ||
.gradle | ||
**/build/ | ||
!src/**/build/ | ||
.gradletasknamecache | ||
!gradle-wrapper.jar | ||
gradle-app.setting | ||
|
||
# Mac OSX | ||
.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,23 @@ | ||
The MIT License (MIT) | ||
===================== | ||
|
||
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,35 @@ | ||
# ModelEngineBridge | ||
|
||
Provides a minimal bridge to allow limited API support for Model Engine v3 and v4. | ||
|
||
## API | ||
|
||
Repository: | ||
```kts | ||
repositories { | ||
maven("https://repo.auxilor.io/repository/maven-public/") | ||
} | ||
``` | ||
|
||
Dependency: | ||
```kts | ||
dependencies { | ||
implementation("com.willfp:ModelEngineBridge:1.0.0") | ||
} | ||
``` | ||
|
||
|
||
<h1 align="center"> | ||
Check out our partners! | ||
<br> | ||
<div style="width: 50%; margin: 0 auto;"> | ||
<br> | ||
<a href="https://gamersupps.gg/discount/Auxilor?afmc=Auxilor" target="_blank"> | ||
<img src="https://i.imgur.com/7mFhlQO.png" alt="supps banner"> | ||
</a> | ||
<a href="https://dedimc.promo/Auxilor" target="_blank"> | ||
<img src="https://i.imgur.com/x9aeH38.png" alt="dedimc banner"> | ||
</a> | ||
<br> | ||
</div> | ||
</h1> |
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,7 @@ | ||
group = "com.willfp" | ||
version = rootProject.version | ||
|
||
dependencies { | ||
compileOnly("io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT") | ||
compileOnly("com.ticxo.modelengine:api:R3.1.8") | ||
} |
5 changes: 5 additions & 0 deletions
5
api/src/main/kotlin/com.willfp.modelenginebridge/BridgedActiveModel.kt
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,5 @@ | ||
package com.willfp.modelenginebridge | ||
|
||
interface BridgedActiveModel { | ||
val id: String | ||
} |
9 changes: 9 additions & 0 deletions
9
api/src/main/kotlin/com.willfp.modelenginebridge/BridgedModeledEntity.kt
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,9 @@ | ||
package com.willfp.modelenginebridge | ||
|
||
interface BridgedModeledEntity { | ||
var isBaseEntityVisible: Boolean | ||
|
||
fun addModel(model: BridgedActiveModel) | ||
|
||
fun removeModel(model: BridgedActiveModel) | ||
} |
32 changes: 32 additions & 0 deletions
32
api/src/main/kotlin/com.willfp.modelenginebridge/ModelEngineBridge.kt
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,32 @@ | ||
package com.willfp.modelenginebridge | ||
|
||
import org.bukkit.Bukkit | ||
import org.bukkit.entity.Entity | ||
|
||
interface ModelEngineBridge { | ||
fun createActiveModel(id: String): BridgedActiveModel? | ||
|
||
fun createModeledEntity(entity: Entity): BridgedModeledEntity | ||
|
||
companion object { | ||
val instance: ModelEngineBridge = createInstance() | ||
|
||
private fun createInstance(): ModelEngineBridge { | ||
val plugin = Bukkit.getPluginManager().getPlugin("ModelEngine") | ||
?: throw IllegalStateException("ModelEngineBridge requires ModelEngine to be installed.") | ||
|
||
@Suppress("DEPRECATION") | ||
val version = plugin.description.version | ||
|
||
return if (version.startsWith("R3")) { | ||
val clazz = Class.forName("com.willfp.modelenginebridge.v3.ModelEngineBridgeV3") | ||
clazz.constructors[0].newInstance() as ModelEngineBridge | ||
} else if (version.startsWith("R4")) { | ||
val clazz = Class.forName("com.willfp.modelenginebridge.v4.ModelEngineBridgeV4") | ||
clazz.constructors[0].newInstance() as ModelEngineBridge | ||
} else { | ||
throw IllegalStateException("ModelEngineBridge requires version 3 or 4 of Model Engine!") | ||
} | ||
} | ||
} | ||
} |
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,92 @@ | ||
plugins { | ||
java | ||
`java-library` | ||
`maven-publish` | ||
kotlin("jvm") version "1.7.10" | ||
id("com.github.johnrengelman.shadow") version "8.0.0" | ||
} | ||
|
||
group = "com.willfp" | ||
version = findProperty("version")!! | ||
|
||
dependencies { | ||
implementation(project(":api")) | ||
implementation(project(":v3")) | ||
implementation(project(":v4")) | ||
} | ||
|
||
allprojects { | ||
apply(plugin = "java") | ||
apply(plugin = "kotlin") | ||
apply(plugin = "maven-publish") | ||
apply(plugin = "com.github.johnrengelman.shadow") | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
|
||
maven("https://repo.papermc.io/repository/maven-public/") | ||
maven("https://repo.auxilor.io/repository/maven-public/") | ||
maven("https://jitpack.io") | ||
maven("https://mvn.lumine.io/repository/maven-public/") | ||
} | ||
|
||
dependencies { | ||
compileOnly("com.willfp:eco:6.65.0") | ||
compileOnly("org.jetbrains:annotations:23.0.0") | ||
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.7.10") | ||
} | ||
|
||
java { | ||
withSourcesJar() | ||
toolchain.languageVersion.set(JavaLanguageVersion.of(17)) | ||
} | ||
|
||
tasks { | ||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "17" | ||
} | ||
} | ||
|
||
compileJava { | ||
options.isDeprecation = true | ||
options.encoding = "UTF-8" | ||
|
||
dependsOn(clean) | ||
} | ||
|
||
build { | ||
dependsOn(shadowJar) | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
build { | ||
dependsOn(publishToMavenLocal) | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
register<MavenPublication>("maven") { | ||
groupId = project.group.toString() | ||
version = project.version.toString() | ||
artifactId = rootProject.name | ||
|
||
artifact(rootProject.tasks.shadowJar.get().archiveFile) | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "auxilor" | ||
url = uri("https://repo.auxilor.io/repository/maven-releases/") | ||
credentials { | ||
username = System.getenv("MAVEN_USERNAME") | ||
password = System.getenv("MAVEN_PASSWORD") | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
version=1.0.0 |
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,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.