Skip to content

Commit dadf1b4

Browse files
authored
0.0.3 update
1 parent 2459307 commit dadf1b4

4 files changed

Lines changed: 20 additions & 12 deletions

File tree

build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
plugins {
22
id 'java'
3+
id 'maven-publish'
34
}
45

56
group = 'dev.team.hytalib'
6-
version = '0.0.2'
7+
version = '0.0.3'
78
sourceCompatibility = 21
89
targetCompatibility = 21
910

1011
repositories {
1112
mavenCentral()
1213
}
1314

15+
publishing {
16+
publications {
17+
mavenJava(MavenPublication) {
18+
from components.java
19+
}
20+
}
21+
}
22+
1423
dependencies {
1524
// Connection Pool
1625
implementation 'com.zaxxer:HikariCP:5.1.0'

src/main/java/dev/team/hytalib/core/PluginBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* HytaLab Studio code @ 2025
55
* <p>
6-
* CSubject to change once Hytale server code is released.
6+
* Subject to change once Hytale server code is released.
77
*/
88
public abstract class PluginBase {
99

src/main/java/dev/team/hytalib/messaging/HytaleServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ public interface HytaleServer {
88

99
int getOnlinePlayers();
1010
int getOfflinePlayers();
11-
}
11+
}

src/main/java/dev/team/hytalib/utils/NumberUtils.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package dev.team.hytalib.utils;
22

33

4-
import org.jetbrains.annotations.Nullable;
54

65
import java.text.DecimalFormat;
76

@@ -10,7 +9,7 @@
109
*/
1110
public class NumberUtils {
1211

13-
public static boolean isDouble(@Nullable String value) {
12+
public static boolean isDouble(String value) {
1413
if (value == null) return false;
1514
try {
1615
Double.parseDouble(value);
@@ -20,7 +19,7 @@ public static boolean isDouble(@Nullable String value) {
2019
}
2120
}
2221

23-
public static boolean isInt(@Nullable String value) {
22+
public static boolean isInt(String value) {
2423
if (value == null) return false;
2524
try {
2625
Integer.parseInt(value);
@@ -30,7 +29,7 @@ public static boolean isInt(@Nullable String value) {
3029
}
3130
}
3231

33-
public static boolean isLong(@Nullable String value) {
32+
public static boolean isLong(String value) {
3433
if (value == null) return false;
3534
try {
3635
Long.parseLong(value);
@@ -40,7 +39,7 @@ public static boolean isLong(@Nullable String value) {
4039
}
4140
}
4241

43-
public static boolean isFloat(@Nullable String value) {
42+
public static boolean isFloat(String value) {
4443
if (value == null) return false;
4544
try {
4645
Float.parseFloat(value);
@@ -50,19 +49,19 @@ public static boolean isFloat(@Nullable String value) {
5049
}
5150
}
5251

53-
public static int getIntOrDefault(@Nullable String value, int def) {
52+
public static int getIntOrDefault(String value, int def) {
5453
return isInt(value) ? Integer.parseInt(value) : def;
5554
}
5655

57-
public static double getDoubleOrDefault(@Nullable String value, double def) {
56+
public static double getDoubleOrDefault(String value, double def) {
5857
return isDouble(value) ? Double.parseDouble(value) : def;
5958
}
6059

61-
public static long getLongOrDefault(@Nullable String value, long def) {
60+
public static long getLongOrDefault(String value, long def) {
6261
return isLong(value) ? Long.parseLong(value) : def;
6362
}
6463

65-
public static float getFloatOrDefault(@Nullable String value, float def) {
64+
public static float getFloatOrDefault(String value, float def) {
6665
return isFloat(value) ? Float.parseFloat(value) : def;
6766
}
6867

0 commit comments

Comments
 (0)