mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-22 00:23:52 +00:00
1.21.10
This commit is contained in:
@@ -58,17 +58,44 @@ public class VersionHelper {
|
|||||||
return updateFuture;
|
return updateFuture;
|
||||||
};
|
};
|
||||||
|
|
||||||
private static float version;
|
private static int version;
|
||||||
private static boolean mojmap;
|
private static boolean mojmap;
|
||||||
private static boolean folia;
|
private static boolean folia;
|
||||||
|
|
||||||
public static void init(String serverVersion) {
|
public static void init(String serverVersion) {
|
||||||
String[] split = serverVersion.split("\\.");
|
version = parseVersionToInteger(serverVersion);
|
||||||
version = Float.parseFloat(split[1] + "." + (split.length == 3 ? split[2] : "0"));
|
|
||||||
checkMojMap();
|
checkMojMap();
|
||||||
checkFolia();
|
checkFolia();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int parseVersionToInteger(String versionString) {
|
||||||
|
int major = 0;
|
||||||
|
int minor = 0;
|
||||||
|
int currentNumber = 0;
|
||||||
|
int part = 0;
|
||||||
|
for (int i = 0; i < versionString.length(); i++) {
|
||||||
|
char c = versionString.charAt(i);
|
||||||
|
if (c >= '0' && c <= '9') {
|
||||||
|
currentNumber = currentNumber * 10 + (c - '0');
|
||||||
|
} else if (c == '.') {
|
||||||
|
if (part == 1) {
|
||||||
|
major = currentNumber;
|
||||||
|
}
|
||||||
|
part++;
|
||||||
|
currentNumber = 0;
|
||||||
|
if (part > 2) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (part == 1) {
|
||||||
|
major = currentNumber;
|
||||||
|
} else if (part == 2) {
|
||||||
|
minor = currentNumber;
|
||||||
|
}
|
||||||
|
return 10000 + major * 100 + minor;
|
||||||
|
}
|
||||||
|
|
||||||
private static void checkMojMap() {
|
private static void checkMojMap() {
|
||||||
// Check if the server is Mojmap
|
// Check if the server is Mojmap
|
||||||
try {
|
try {
|
||||||
@@ -87,31 +114,31 @@ public class VersionHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isVersionNewerThan1_19() {
|
public static boolean isVersionNewerThan1_19() {
|
||||||
return version >= 19;
|
return version >= 11900;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isVersionNewerThan1_19_4() {
|
public static boolean isVersionNewerThan1_19_4() {
|
||||||
return version >= 19.39;
|
return version >= 11904;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isVersionNewerThan1_20_2() {
|
public static boolean isVersionNewerThan1_20_2() {
|
||||||
return version >= 20.19;
|
return version >= 12002;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isVersionNewerThan1_20_5() {
|
public static boolean isVersionNewerThan1_20_5() {
|
||||||
return version >= 20.49;
|
return version >= 12005;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isVersionNewerThan1_21_3() {
|
public static boolean isVersionNewerThan1_21_3() {
|
||||||
return version >= 21.29;
|
return version >= 12103;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isVersionNewerThan1_21_4() {
|
public static boolean isVersionNewerThan1_21_4() {
|
||||||
return version >= 21.39;
|
return version >= 12104;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isVersionNewerThan1_21_5() {
|
public static boolean isVersionNewerThan1_21_5() {
|
||||||
return version >= 21.49;
|
return version >= 12105;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isFolia() {
|
public static boolean isFolia() {
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
import org.gradle.process.internal.ExecException
|
|
||||||
import java.io.ByteArrayOutputStream
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("com.gradleup.shadow") version "9.0.0-beta6"
|
id("com.gradleup.shadow") version "9.2.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
val git : String = versionBanner()
|
val git : String = versionBanner()
|
||||||
@@ -28,35 +25,17 @@ subprojects {
|
|||||||
|
|
||||||
filesMatching(arrayListOf("*.yml", "*/*.yml")) {
|
filesMatching(arrayListOf("*.yml", "*/*.yml")) {
|
||||||
expand(
|
expand(
|
||||||
Pair("project_version", rootProject.properties["project_version"]),
|
Pair("project_version", rootProject.properties["project_version"]!!),
|
||||||
Pair("config_version", rootProject.properties["config_version"])
|
Pair("config_version", rootProject.properties["config_version"]!!)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun versionBanner(): String {
|
fun versionBanner() = project.providers.exec {
|
||||||
val os = ByteArrayOutputStream()
|
commandLine("git", "rev-parse", "--short=8", "HEAD")
|
||||||
try {
|
}.standardOutput.asText.map { it.trim() }.getOrElse("Unknown")
|
||||||
project.exec {
|
|
||||||
commandLine = "git rev-parse --short=8 HEAD".split(" ")
|
|
||||||
standardOutput = os
|
|
||||||
}
|
|
||||||
} catch (e: ExecException) {
|
|
||||||
return "Unknown"
|
|
||||||
}
|
|
||||||
return String(os.toByteArray()).trim()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun builder(): String {
|
fun builder() = project.providers.exec {
|
||||||
val os = ByteArrayOutputStream()
|
commandLine("git", "config", "user.name")
|
||||||
try {
|
}.standardOutput.asText.map { it.trim() }.getOrElse("Unknown")
|
||||||
project.exec {
|
|
||||||
commandLine = "git config user.name".split(" ")
|
|
||||||
standardOutput = os
|
|
||||||
}
|
|
||||||
} catch (e: ExecException) {
|
|
||||||
return "Unknown"
|
|
||||||
}
|
|
||||||
return String(os.toByteArray()).trim()
|
|
||||||
}
|
|
||||||
@@ -48,7 +48,7 @@ public abstract class BukkitItemFactory extends ItemFactory<CustomFishingPlugin,
|
|||||||
"1.21", "1.21.1", "1.21.2", "1.21.3", "1.21.4" -> {
|
"1.21", "1.21.1", "1.21.2", "1.21.3", "1.21.4" -> {
|
||||||
return new ComponentItemFactory(plugin);
|
return new ComponentItemFactory(plugin);
|
||||||
}
|
}
|
||||||
case "1.21.5", "1.21.6", "1.21.7", "1.21.8" -> {
|
case "1.21.5", "1.21.6", "1.21.7", "1.21.8", "1.21.9", "1.21.10" -> {
|
||||||
return new ComponentItemFactory1_21_5(plugin);
|
return new ComponentItemFactory1_21_5(plugin);
|
||||||
}
|
}
|
||||||
default -> throw new IllegalStateException("Unsupported server version: " + plugin.getServerVersion());
|
default -> throw new IllegalStateException("Unsupported server version: " + plugin.getServerVersion());
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Project settings
|
# Project settings
|
||||||
# Rule: [major update].[feature update].[bug fix]
|
# Rule: [major update].[feature update].[bug fix]
|
||||||
project_version=2.3.15
|
project_version=2.3.16
|
||||||
config_version=38
|
config_version=38
|
||||||
project_group=net.momirealms
|
project_group=net.momirealms
|
||||||
|
|
||||||
@@ -8,41 +8,41 @@ project_group=net.momirealms
|
|||||||
lang=en,zh_cn,uk,ru,pt_br,fr
|
lang=en,zh_cn,uk,ru,pt_br,fr
|
||||||
|
|
||||||
# Dependency settings
|
# Dependency settings
|
||||||
sparrow_heart_version=0.59
|
sparrow_heart_version=0.60
|
||||||
paper_version=1.20.4
|
paper_version=1.20.4
|
||||||
jetbrains_annotations_version=26.0.2
|
jetbrains_annotations_version=26.0.2
|
||||||
slf4j_version=2.0.17
|
slf4j_version=2.0.17
|
||||||
log4j_version=2.24.3
|
log4j_version=2.25.2
|
||||||
gson_version=2.11.0
|
gson_version=2.13.2
|
||||||
asm_version=9.8
|
asm_version=9.9
|
||||||
asm_commons_version=9.8
|
asm_commons_version=9.9
|
||||||
jar_relocator_version=1.7
|
jar_relocator_version=1.7
|
||||||
h2_driver_version=2.3.232
|
h2_driver_version=2.4.240
|
||||||
sqlite_driver_version=3.49.1.0
|
sqlite_driver_version=3.50.3.0
|
||||||
adventure_bundle_version=4.23.0
|
adventure_bundle_version=4.25.0
|
||||||
adventure_platform_version=4.4.0
|
adventure_platform_version=4.4.1
|
||||||
cloud_core_version=2.0.0
|
cloud_core_version=2.0.0
|
||||||
cloud_services_version=2.0.0
|
cloud_services_version=2.0.0
|
||||||
cloud_brigadier_version=2.0.0-beta.11
|
cloud_brigadier_version=2.0.0-beta.13
|
||||||
cloud_bukkit_version=2.0.0-beta.11
|
cloud_bukkit_version=2.0.0-beta.13
|
||||||
cloud_paper_version=2.0.0-beta.11
|
cloud_paper_version=2.0.0-beta.13
|
||||||
cloud_minecraft_extras_version=2.0.0-beta.11
|
cloud_minecraft_extras_version=2.0.0-beta.13
|
||||||
boosted_yaml_version=1.3.7
|
boosted_yaml_version=1.3.7
|
||||||
mojang_brigadier_version=1.0.18
|
mojang_brigadier_version=1.0.18
|
||||||
mongodb_driver_version=5.4.0
|
mongodb_driver_version=5.6.1
|
||||||
mariadb_driver_version=3.5.3
|
mariadb_driver_version=3.5.6
|
||||||
mysql_driver_version=9.2.0
|
mysql_driver_version=9.4.0
|
||||||
hikari_version=5.1.0
|
hikari_version=7.0.2
|
||||||
commons_pool_version=2.12.1
|
commons_pool_version=2.12.1
|
||||||
bstats_version=3.1.0
|
bstats_version=3.1.0
|
||||||
geantyref_version=1.3.16
|
geantyref_version=1.3.16
|
||||||
caffeine_version=3.2.0
|
caffeine_version=3.2.2
|
||||||
rtag_version=1.5.11
|
rtag_version=1.5.13
|
||||||
jedis_version=5.2.0
|
jedis_version=7.0.0
|
||||||
exp4j_version=0.4.8
|
exp4j_version=0.4.8
|
||||||
placeholder_api_version=2.11.6
|
placeholder_api_version=2.11.6
|
||||||
vault_version=1.7
|
vault_version=1.7
|
||||||
guava_version=33.3.1-jre
|
guava_version=33.5.0-jre
|
||||||
lz4_version=1.8.0
|
lz4_version=1.8.0
|
||||||
|
|
||||||
# Proxy settings
|
# Proxy settings
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Reference in New Issue
Block a user