-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add vector * make vector static * Setup tests * add BlockVector * add color de-serializer * test dummy * add unit test utils * Implement vector tests * migrate to color record * implement blockvector deserialization test * remove toml list in block vector test * add deserialization test for color * fix block vector * Add potion effect type * implement test for color de-serialization * Fix tests * Add firework effect * Add pattern * implemented bounding box de-serializer * implemented attribute modifier de-serializer * Add unit tests for location * Fix merge * Add player serialization * add inventory like de-serializer * Add readme and publishing * Final cleanup --------- Co-authored-by: Florian Fülling <[email protected]>
- Loading branch information
1 parent
79b1bab
commit 14aff41
Showing
148 changed files
with
3,266 additions
and
3 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,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: RainbowDashLabs | ||
patreon: eldoriaplugins | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: eldoriaplugins | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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,31 @@ | ||
name: Javadocs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 18 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 18 | ||
- name: Build Javadocs | ||
run: | | ||
echo "Building javadocs with gradle" | ||
./gradlew clean javadoc | ||
echo "Moving to javadocs directory:" | ||
cd build/docs/javadoc | ||
echo "Creating .nojekyll to have Github pages deploy html as is:" | ||
touch .nojekyll | ||
- name: Deploy | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages # The branch the action should deploy to. | ||
folder: build/docs/javadoc # The folder the action should deploy. |
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,30 @@ | ||
name: Publish to Nexus | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev* | ||
- feature/* | ||
- fix/* | ||
jobs: | ||
build: | ||
environment: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up JDK 18 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 18 | ||
- name: Build with Gradle | ||
run: ./gradlew --build-cache build | ||
- name: Test with Gradle | ||
run: ./gradlew test | ||
- name: Publish to eldonexus | ||
run: ./gradlew publishMavenPublicationToEldoNexusRepository | ||
env: | ||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
NEXUS_PASSWORD: ${{ secrets.NEXUS_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,19 @@ | ||
name: Verify state | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up JDK 18 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 18 | ||
- name: Build with Gradle | ||
run: ./gradlew --build-cache build | ||
- name: Test with Gradle | ||
run: ./gradlew test |
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
# .idea/modules.xml | ||
# .idea/*.iml | ||
# .idea/modules | ||
# *.iml | ||
*.iml | ||
# *.ipr | ||
|
||
# CMake | ||
|
File renamed without changes.
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,68 @@ | ||
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/eldoriarpg/jackson-bukkit/verify.yml?branch=main&style=for-the-badge&label=Building) | ||
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/eldoriarpg/jackson-bukkit/publish_to_nexus.yml?branch=main&style=for-the-badge&label=Publishing) \ | ||
![Sonatype Nexus (Releases)](https://img.shields.io/nexus/maven-releases/de.eldoria/jackson-bukkit?label=Release&logo=Release&server=https%3A%2F%2Feldonexus.de&style=for-the-badge) | ||
![Sonatype Nexus (Development)](https://img.shields.io/nexus/maven-dev/de.eldoria/jackson-bukkit?label=DEV&logo=Release&server=https%3A%2F%2Feldonexus.de&style=for-the-badge) | ||
![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/de.eldoria/jackson-bukkit?color=orange&label=Snapshot&server=https%3A%2F%2Feldonexus.de&style=for-the-badge) | ||
|
||
### [Javadocs](https://rainbowdashlabs.github.io/jackson-bukkit/) | ||
|
||
## Dependency | ||
|
||
**Gradle** | ||
|
||
``` kotlin | ||
repositories { | ||
maven("https://eldonexus.de/repository/maven-public") | ||
} | ||
|
||
dependencies { | ||
compileOnly("de.eldoria", "jackson-bukkit", "version") | ||
} | ||
``` | ||
|
||
**Maven** | ||
|
||
``` xml | ||
<repository> | ||
<id>EldoNexus</id> | ||
<url>https://eldonexus.de/repository/maven-public/</url> | ||
</repository> | ||
|
||
<dependency> | ||
<groupId>de.eldoria</groupId> | ||
<artifactId>jackson-bukkit</artifactId> | ||
<version>version</version> | ||
</dependency> | ||
``` | ||
|
||
## Usage | ||
|
||
Simply add the JacksonBukkit module to the builder of your choice. | ||
|
||
```java | ||
ObjectMapper JSON = JsonMapper.builder() | ||
.addModule(new JacksonBukkit()) | ||
.build(); | ||
|
||
``` | ||
|
||
## Supported Classes | ||
|
||
We support all classes implementing `ConfigurationSerializable`. To be precise we support the following classes: | ||
|
||
- Vector | ||
- BlockVector | ||
- Color | ||
- ItemStack (Serialized as Base64 encoded bytes as recommended by [paper](https://jd.papermc.io/paper/1.19/org/bukkit/inventory/ItemStack.html#serializeAsBytes())) | ||
- PotionEffect | ||
- FireworkEffect | ||
- Pattern | ||
- BoundingBox | ||
- AttributeModifier | ||
- Location | ||
|
||
**Additional Support for:** | ||
|
||
- NamespacedKey | ||
- OfflinePlayer | ||
- Inventory via InventoryWrapper class |
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
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 @@ | ||
#!/usr/bin/env bash | ||
touch $PWD/src/test/resources/json/$1.json | ||
touch $PWD/src/test/resources/json/$1_list.json | ||
touch $PWD/src/test/resources/yaml/$1.yaml | ||
touch $PWD/src/test/resources/yaml/$1_list.yaml | ||
touch $PWD/src/test/resources/toml/$1.toml | ||
touch $PWD/src/test/resources/toml/$1_list.toml |
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
Oops, something went wrong.