9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-22 16:39:36 +00:00
relocate again
to support 1.18.1 and below
This commit is contained in:
Xiao-MoMi
2022-07-18 19:58:28 +08:00
parent 342719c384
commit 1e3495cace
3 changed files with 22 additions and 19 deletions

View File

@@ -5,7 +5,7 @@ plugins {
group = 'net.momirealms'
version = '1.5.10'
version = '1.5.11'
repositories {
mavenCentral()
@@ -55,16 +55,16 @@ dependencies {
compileOnly "com.github.angeschossen:LandsAPI:6.5.1"
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
compileOnly 'com.comphenix.protocol:ProtocolLib:4.8.0'
compileOnly 'me.clip:placeholderapi:2.11.1'
compileOnly 'me.clip:placeholderapi:2.11.2'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.7'
compileOnly 'io.lumine:Mythic-Dist:5.0.3-SNAPSHOT'
compileOnly 'com.github.LoneDev6:api-itemsadder:3.2.0c-beta6'
compileOnly 'com.palmergames.bukkit.towny:towny:0.98.2.0'
compileOnly fileTree(dir:'libs',includes:['*.jar'])
compileOnly("net.kyori:adventure-api:4.11.0")
compileOnly("net.kyori:adventure-platform-bukkit:4.1.1")
compileOnly("net.kyori:adventure-text-minimessage:4.11.0")
implementation 'de.tr7zw:item-nbt-api:2.10.0'
implementation("net.kyori:adventure-api:4.11.0")
implementation("net.kyori:adventure-platform-bukkit:4.1.1")
implementation("net.kyori:adventure-text-minimessage:4.11.0")
implementation("de.tr7zw:item-nbt-api:2.10.0")
}
def targetJavaVersion = 16
@@ -97,5 +97,6 @@ tasks.withType(JavaCompile) {
}
shadowJar {
relocate 'de.tr7zw', 'libs.tr7zw'
relocate ('de.tr7zw', 'libs.tr7zw')
relocate ('net.kyori', 'libs.kyori')
}

View File

@@ -51,22 +51,24 @@ public final class CustomCrops extends JavaPlugin {
@Override
public void onLoad(){
instance = this;
LibraryLoader.load("net.kyori","adventure-api","4.11.0","https://oss.sonatype.org/content/groups/public");
LibraryLoader.load("net.kyori","adventure-platform-api","4.1.1","https://oss.sonatype.org/content/groups/public");
LibraryLoader.load("net.kyori","adventure-platform-bukkit","4.1.1","https://oss.sonatype.org/content/groups/public");
LibraryLoader.load("net.kyori","adventure-platform-facet","4.1.1","https://oss.sonatype.org/content/groups/public");
LibraryLoader.load("net.kyori","adventure-text-minimessage","4.10.1","https://oss.sonatype.org/content/groups/public");
LibraryLoader.load("net.kyori","adventure-text-serializer-gson","4.11.0","https://oss.sonatype.org/content/groups/public");
LibraryLoader.load("net.kyori","adventure-text-serializer-plain","4.11.0","https://oss.sonatype.org/content/groups/public");
LibraryLoader.load("net.kyori","adventure-text-serializer-gson-legacy-impl","4.11.0","https://oss.sonatype.org/content/groups/public");
LibraryLoader.load("net.kyori","adventure-nbt","4.11.0","https://oss.sonatype.org/content/groups/public");
LibraryLoader.load("net.kyori","adventure-key","4.11.0","https://oss.sonatype.org/content/groups/public");
// instance = this;
// LibraryLoader.load("net.kyori","adventure-api","4.11.0","https://oss.sonatype.org/content/groups/public");
// LibraryLoader.load("net.kyori","adventure-platform-api","4.1.1","https://oss.sonatype.org/content/groups/public");
// LibraryLoader.load("net.kyori","adventure-platform-bukkit","4.1.1","https://oss.sonatype.org/content/groups/public");
// LibraryLoader.load("net.kyori","adventure-platform-facet","4.1.1","https://oss.sonatype.org/content/groups/public");
// LibraryLoader.load("net.kyori","adventure-text-serializer-gson","4.11.0","https://oss.sonatype.org/content/groups/public");
// LibraryLoader.load("net.kyori","adventure-text-serializer-plain","4.11.0","https://oss.sonatype.org/content/groups/public");
// LibraryLoader.load("net.kyori","adventure-text-serializer-gson-legacy-impl","4.11.0","https://oss.sonatype.org/content/groups/public");
// LibraryLoader.load("net.kyori","adventure-nbt","4.11.0","https://oss.sonatype.org/content/groups/public");
// LibraryLoader.load("net.kyori","adventure-key","4.11.0","https://oss.sonatype.org/content/groups/public");
// LibraryLoader.load("net.kyori","adventure-text-minimessage","4.11.0","https://oss.sonatype.org/content/groups/public");
}
@Override
public void onEnable() {
instance = this;
adventure = BukkitAudiences.create(instance);
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>Running on " + Bukkit.getVersion());

View File

@@ -84,7 +84,7 @@ public class NBTUtil {
nbtCompound.setInteger(key, (Integer) value);
}catch (ClassCastException e){
e.printStackTrace();
AdventureManager.consoleMessage("<red>[CustomFishing] 非Int类型数字必须加上强制转换标识!</red>");
AdventureManager.consoleMessage("<red>[CustomCrops] 非Int类型数字必须加上强制转换标识!</red>");
}
}
}