Skip to content

Commit 1ca68c6

Browse files
Merge pull request #36 from OneLiteFeatherNET/develop
Release 1.11.1
2 parents 3eaf249 + e48e48c commit 1ca68c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+544
-182
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Add the following dependency to your `build.gradle.kts` file:
3434

3535
```kotlin
3636
dependencies {
37-
implementation("net.theevilreaper:aves:<version>")
37+
implementation("net.theevilreaper:aves:1.0.0")
3838
}
3939
```
4040

build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ plugins {
77
}
88

99
group = "net.theevilreaper"
10-
version = "1.11.0"
10+
version = "1.11.1"
1111
description = "Aves"
1212

1313
java {
1414
toolchain {
1515
languageVersion = JavaLanguageVersion.of(21)
1616
}
17+
withJavadocJar()
18+
withSourcesJar()
1719
}
1820

1921
configurations.all {

gradle/wrapper/gradle-wrapper.jar

1.65 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

renovate.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
4-
"config:base",
4+
"github>OneLiteFeatherNET/renovate:default(OneLiteFeatherNET/aves-maintainers)",
5+
"github>OneLiteFeatherNET/renovate:minestom",
56
":semanticCommitsDisabled"
67
],
7-
"labels": [
8-
"Renovate"
9-
],
10-
"rebaseWhen": "conflicted",
11-
"packageRules": [
8+
"customManagers": [
129
{
13-
"matchUpdateTypes": [
14-
"patch"
10+
"customType": "regex",
11+
"managerFilePatterns": [
12+
"/README.md/"
13+
],
14+
"matchStrings": [
15+
"implementation\\(\"net\\.theevilreaper:aves:(?<currentValue>.*?)\""
1516
],
16-
"automerge": true
17+
"datasourceTemplate": "maven",
18+
"depNameTemplate": "net.theevilreaper:aves"
1719
}
1820
]
1921
}

src/main/java/net/theevilreaper/aves/file/FileHandler.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
/**
1313
* The class represents the base logic to load or save json files.
14+
*
1415
* @author theEvilReaper
1516
* @version 1.0.0
1617
* @since 1.0.0
@@ -19,23 +20,31 @@
1920
@Deprecated(since = "1.9.0", forRemoval = true)
2021
public interface FileHandler {
2122

23+
/**
24+
* The logger for the {@link FileHandler}.
25+
*/
2226
Logger LOGGER = LoggerFactory.getLogger(FileHandler.class);
2327

28+
/**
29+
* The default charset used for reading and writing files.
30+
*/
2431
Charset UTF_8 = StandardCharsets.UTF_8;
2532

2633
/**
2734
* Saves a given object into a file.
28-
* @param path The path where the file is located
35+
*
36+
* @param path The path where the file is located
2937
* @param object The object to save
30-
* @param <T> A generic type for the object value
38+
* @param <T> A generic type for the object value
3139
*/
3240
<T> void save(@NotNull Path path, @NotNull T object);
3341

3442
/**
3543
* Load a given file and parse to the give class.
36-
* @param path is the where the file is located
44+
*
45+
* @param path is the where the file is located
3746
* @param clazz Represents the class which should be loaded
38-
* @param <T> is generic type for the object value
47+
* @param <T> is generic type for the object value
3948
* @return a {@link Optional} with the object instance
4049
*/
4150
<T> Optional<T> load(@NotNull Path path, @NotNull Class<T> clazz);

src/main/java/net/theevilreaper/aves/file/gson/ItemStackGsonTypeAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public JsonElement serialize(@NotNull ItemStack itemStack, Type type, JsonSerial
4242

4343
if (itemStack.has(DataComponents.TOOLTIP_DISPLAY)) {
4444
TooltipDisplay tooltipDisplay = itemStack.get(DataComponents.TOOLTIP_DISPLAY);
45-
if (tooltipDisplay.hideTooltip()) {
45+
if (tooltipDisplay != null && tooltipDisplay.hideTooltip()) {
4646
metaObject.addProperty("hideTooltip", true);
4747
}
4848
}

src/main/java/net/theevilreaper/aves/file/gson/PositionGsonAdapter.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
import java.lang.reflect.Type;
1616

1717
/**
18+
* The {@link PositionGsonAdapter} class is a custom implementation of the {@link JsonSerializer} and {@link JsonDeserializer} interfaces for gson.
19+
* It allows the serialization and deserialization of {@link Point} objects, specifically handling both {@link Pos} and {@link Vec} types.
20+
*
1821
* @author theEvilReaper
1922
* @version 1.0.0
2023
* @since 1.0.0
@@ -34,9 +37,9 @@ public Point deserialize(@NotNull JsonElement json, Type typeOfT, JsonDeserializ
3437
if (object.has("yaw") && object.has(PITCH)) {
3538
yaw = object.get("yaw").getAsFloat();
3639
pitch = object.get(PITCH).getAsFloat();
37-
return new Pos(x,y,z, yaw, pitch);
40+
return new Pos(x, y, z, yaw, pitch);
3841
}
39-
return new Vec(x,y,z);
42+
return new Vec(x, y, z);
4043
}
4144

4245
@Override

src/main/java/net/theevilreaper/aves/i18n/TextData.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99

1010
/**
1111
* The TextData is a record which holds some information about a message with optional arguments.
12-
* @param key the key for the message
12+
*
13+
* @param key the key for the message
1314
* @param args optional arguments for the message
1415
*/
1516
@SuppressWarnings("java:S6218")
1617
public record TextData(@NotNull String key, @NotNull Component... args) {
1718

1819
/**
1920
* Creates a new instance of the TextData.
21+
*
2022
* @param key the key for the message
2123
* @return the created instance
2224
*/
@@ -26,14 +28,18 @@ public record TextData(@NotNull String key, @NotNull Component... args) {
2628

2729
/**
2830
* Creates a new instance of the TextData.
29-
* @param key the key for the message
31+
*
32+
* @param key the key for the message
33+
* @param args the arguments for the message
34+
* @return the created instance with the given key and arguments
3035
*/
3136
public static @NotNull TextData of(@NotNull String key, @NotNull String... args) {
3237
return new TextData(key, args);
3338
}
3439

3540
/**
3641
* Creates a new instance of the TextData.
42+
*
3743
* @param key the key for the message
3844
*/
3945
public TextData(@NotNull String key) {
@@ -42,7 +48,8 @@ public TextData(@NotNull String key) {
4248

4349
/**
4450
* Creates a new instance of the TextData.
45-
* @param key the key for the message
51+
*
52+
* @param key the key for the message
4653
* @param args the arguments for the message
4754
*/
4855
public TextData(@NotNull String key, @NotNull String... args) {
@@ -51,6 +58,7 @@ public TextData(@NotNull String key, @NotNull String... args) {
5158

5259
/**
5360
* Returns a {@link TranslatableComponent} from the given data.
61+
*
5462
* @return the created component
5563
*/
5664
public @NotNull TranslatableComponent createComponent() {

0 commit comments

Comments
 (0)