Skip to content

Commit

Permalink
Merge branch 'master' into dev/update
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock committed Nov 11, 2024
2 parents 24a90f1 + 79a3b1b commit 68decf3
Show file tree
Hide file tree
Showing 52 changed files with 2,149 additions and 585 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ core/src/main/resources/pack/textures
.DS_Store
**/.DS_Store

### VsCode ###
.vscode

### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
Expand Down
35 changes: 18 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
//id("com.github.johnrengelman.shadow") version "8.1.1"
id("xyz.jpenilla.run-paper") version "2.3.1"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0" // Generates plugin.yml
id("io.papermc.paperweight.userdev") version "1.7.2" apply false
id("io.papermc.paperweight.userdev") version "1.7.4" apply false
id("io.github.goooler.shadow") version "8.1.8"
alias(libs.plugins.mia.publication)
}
Expand All @@ -26,7 +26,8 @@ val SUPPORTED_VERSIONS: List<NMSVersion> = listOf(
"v1_20_R2" toNms "1.20.2-R0.1-SNAPSHOT",
"v1_20_R3" toNms "1.20.4-R0.1-SNAPSHOT",
"v1_20_R4" toNms "1.20.6-R0.1-SNAPSHOT",
"v1_21_R1" toNms "1.21-R0.1-SNAPSHOT"
"v1_21_R1" toNms "1.21.1-R0.1-SNAPSHOT",
"v1_21_R2" toNms "1.21.3-R0.1-SNAPSHOT"
)

val compiled = (project.findProperty("oraxen_compiled")?.toString() ?: "true").toBoolean()
Expand All @@ -35,7 +36,7 @@ val devPluginPath = project.findProperty("oraxen_dev_plugin_path")?.toString()
val foliaPluginPath = project.findProperty("oraxen_folia_plugin_path")?.toString()
val spigotPluginPath = project.findProperty("oraxen_spigot_plugin_path")?.toString()
val pluginVersion: String by project
val commandApiVersion = "9.5.3"
val commandApiVersion = "9.6.1"
val adventureVersion = "4.17.0"
val platformVersion = "4.3.4"
val googleGsonVersion = "2.10.1"
Expand Down Expand Up @@ -104,6 +105,7 @@ allprojects {
implementation("team.unnamed:creative-api:1.7.3") { exclude("net.kyori") }
implementation("dev.jorel:commandapi-bukkit-shade:$commandApiVersion")
implementation("org.bstats:bstats-bukkit:3.0.0")
implementation("org.glassfish:javax.json:1.1.4")
implementation("io.th0rgal:protectionlib:1.6.2")
implementation("com.github.stefvanschie.inventoryframework:IF:0.10.12")
implementation("com.jeff-media:custom-block-data:2.2.2")
Expand Down Expand Up @@ -149,23 +151,22 @@ tasks {
downloadPlugins {
url("https://ci.dmulloy2.net/job/ProtocolLib/lastSuccessfulBuild/artifact/build/libs/ProtocolLib.jar")
}
minecraftVersion("1.21.1")
minecraftVersion("1.20.4")
}

shadowJar {
SUPPORTED_VERSIONS.forEach { dependsOn(":${it.nmsVersion}:reobfJar") }

archiveClassifier = null
relocate("org.bstats", "io.th0rgal.oraxen.shaded.bstats")
relocate("com.jeff_media.customblockdata", "io.th0rgal.oraxen.shaded.jeff_media.customblockdata")
//relocate("dev.triumphteam.gui", "io.th0rgal.oraxen.shaded.triumphteam.gui")
//relocate("com.github.stefvanschie.inventoryframework", "io.th0rgal.oraxen.shaded.inventoryframework")
//relocate("me.gabytm.util.actions", "io.th0rgal.oraxen.shaded.actions")
//relocate("org.intellij.lang.annotations", "io.th0rgal.oraxen.shaded.intellij.annotations")
//relocate("org.jetbrains.annotations", "io.th0rgal.oraxen.shaded.jetbrains.annotations")
//relocate("com.udojava.evalex", "io.th0rgal.oraxen.shaded.evalex")
//relocate("com.ticxo.playeranimator", "io.th0rgal.oraxen.shaded.playeranimator")
//relocate("dev.jorel", "io.th0rgal.oraxen.shaded")
relocate("dev.triumphteam.gui", "io.th0rgal.oraxen.shaded.triumphteam.gui")
relocate("com.jeff_media", "io.th0rgal.oraxen.shaded.jeff_media")
relocate("com.github.stefvanschie.inventoryframework", "io.th0rgal.oraxen.shaded.inventoryframework")
relocate("me.gabytm.util.actions", "io.th0rgal.oraxen.shaded.actions")
relocate("org.intellij.lang.annotations", "io.th0rgal.oraxen.shaded.intellij.annotations")
relocate("org.jetbrains.annotations", "io.th0rgal.oraxen.shaded.jetbrains.annotations")
relocate("com.ticxo.playeranimator", "io.th0rgal.oraxen.shaded.playeranimator")
relocate("dev.jorel", "io.th0rgal.oraxen.shaded")

manifest {
attributes(
Expand Down Expand Up @@ -221,18 +222,18 @@ bukkit {
)
}

if (pluginPath != null) {
if (spigotPluginPath != null) {
tasks {
val defaultPath = findByName("reobfJar") ?: findByName("shadowJar") ?: findByName("jar")
// Define the main copy task
val copyJarTask = register<Copy>("copyJar") {
this.doNotTrackState("Overwrites the plugin jar to allow for easier reloading")
dependsOn(shadowJar, jar)
from(defaultPath)
into(pluginPath)
into(spigotPluginPath)
doLast {
println("Copied to plugin directory $pluginPath")
Path(pluginPath).listDirectoryEntries()
println("Copied to plugin directory $spigotPluginPath")
Path(spigotPluginPath).listDirectoryEntries()
.filter { it.fileName.toString().matches("oraxen-.*.jar".toRegex()) }
.filterNot { it.fileName.toString().endsWith("$pluginVersion.jar") }
.forEach { delete(it) }
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repositories {
}

dependencies {
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT")
}

java {
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/io/th0rgal/oraxen/OraxenPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static JarFile getJarFile() {

@Override
public void onLoad() {
CommandAPI.onLoad(new CommandAPIBukkitConfig(this).silentLogs(true));
CommandAPI.onLoad(new CommandAPIBukkitConfig(this).silentLogs(true).skipReloadDatapacks(true));
}

@Override
Expand Down Expand Up @@ -115,7 +115,7 @@ public void onEnable() {
resourcePack.generate();
RecipesManager.load(this);
invManager = new InvManager();
ArmorEquipEvent.registerListener(this);
if (!VersionUtil.atOrAbove("1.21.2")) ArmorEquipEvent.registerListener(this);
new CommandsManager().loadCommands();
postLoading();
try {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/th0rgal/oraxen/api/OraxenItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static void ensureComponentDataHandled() {

ConfigurationSection section = OraxenYaml.loadConfiguration(entry.getKey()).getConfigurationSection(itemId + ".Components.food.replacement");
ItemStack replacementItem = parseFoodComponentReplacement(section);
foodComponent.setUsingConvertsTo(replacementItem);
//foodComponent.setUsingConvertsTo(replacementItem);
itemBuilder.setFoodComponent(foodComponent).regen();
}
}
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/io/th0rgal/oraxen/config/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public enum Settings {

// Custom Armor
CUSTOM_ARMOR_TYPE("CustomArmor.type"),
CUSTOM_ARMOR_COMPONENT_ASSIGN("CustomArmor.component_settings.auto_assign_component"),
DISABLE_LEATHER_REPAIR_CUSTOM("CustomArmor.disable_leather_repair"),
CUSTOM_ARMOR_TRIMS_MATERIAL("CustomArmor.trims_settings.material_replacement"),
CUSTOM_ARMOR_TRIMS_ASSIGN("CustomArmor.trims_settings.auto_assign_settings"),
Expand Down
Loading

0 comments on commit 68decf3

Please sign in to comment.