Skip to content

Commit

Permalink
Resolvido problemas ao compilar
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock committed Mar 4, 2024
1 parent 8c88a8c commit 06ca291
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 67 deletions.
2 changes: 0 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ dependencies {

implementation(libs.runpaper)

implementation(libs.modrinth)

implementation(libs.hangar)
}
3 changes: 0 additions & 3 deletions buildSrc/src/main/kotlin/fabric-plugin.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ val fabricVersion = providers.gradleProperty("version").get()
project.version = if (System.getenv("BUILD_NUMBER") != null) "$fabricVersion-${System.getenv("BUILD_NUMBER")}" else fabricVersion

tasks {
modrinth {
loaders.addAll("fabric")
}
}
3 changes: 0 additions & 3 deletions buildSrc/src/main/kotlin/paper-plugin.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,4 @@ tasks {
minecraftVersion(mcVersion)
}

modrinth {
loaders.addAll("paper", "purpur")
}
}
45 changes: 0 additions & 45 deletions buildSrc/src/main/kotlin/root-plugin.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import io.papermc.hangarpublishplugin.model.Platforms
import org.gradle.kotlin.dsl.support.uppercaseFirstChar
import java.io.ByteArrayOutputStream

plugins {
id("io.papermc.hangar-publish-plugin")

id("com.github.johnrengelman.shadow")

id("com.modrinth.minotaur")

`java-library`

`maven-publish`
Expand All @@ -24,44 +17,6 @@ repositories {
mavenCentral()
}

// The commit id for the "main" branch prior to merging a pull request.
val start = "8f6f4dd"

// The commit id BEFORE merging the pull request so before "Merge pull request #30"
val end = "8f6f4dd"

val commitLog = getGitHistory().joinToString(separator = "") { formatGitLog(it) }

fun getGitHistory(): List<String> {
val output: String = ByteArrayOutputStream().use { outputStream ->
project.exec {
executable("git")
args("log", "$start..$end", "--format=format:%h %s")
standardOutput = outputStream
}

outputStream.toString()
}

return output.split("\n")
}

fun formatGitLog(commitLog: String): String {
val hash = commitLog.take(7)
val message = commitLog.substring(8) // Get message after commit hash + space between
return "[$hash](https://github.com/Crazy-Crew/${rootProject.name}/commit/$hash) $message<br>"
}

val changes = """
${rootProject.file("CHANGELOG.md").readText(Charsets.UTF_8)}
## Commits
<details>
<summary>Other</summary>
$commitLog
</details>
""".trimIndent()

tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,6 @@ public ItemStack build() {

setCustomItem();

if (oraxenItem != null && OraxenItems.exists(this.customMaterial)) {
item = oraxenItem.build();
this.itemMeta = item.getItemMeta();
}
}

if (item.getType() != Material.AIR) {
if (this.isHead) { // Has to go 1st due to it removing all data when finished.
if (this.isHash) { // Sauce: https://github.com/deanveloper/SkullCreator
Expand Down Expand Up @@ -562,20 +556,23 @@ public void setCustomItem() {

if ("or".equals(identifier) && PluginSupport.ORAXEN.isPluginEnabled()) {
configureOraxenItem(id);
} else if ("ie".equals(identifier) && PluginSupport.ITEM_EDIT.isPluginEnabled()) {
return;
}

if ("ie".equals(identifier) && PluginSupport.ITEM_EDIT.isPluginEnabled()) {
configureItemEditItem(id);
}
}

private void configureOraxenItem(String id) {
io.th0rgal.oraxen.items.ItemBuilder oraxenItem = OraxenItems.getItemById(id);
var oraxenItem = OraxenItems.getItemById(id);
if (oraxenItem != null) {
updateItemStack(oraxenItem.build());
}
}

private void configureItemEditItem(String id) {
ItemStack item = ItemEdit.get().getServerStorage().getItem(id);
var item = ItemEdit.get().getServerStorage().getItem(id);
updateItemStack(item);
}

Expand Down Expand Up @@ -762,7 +759,7 @@ public ItemBuilder setNamePlaceholders(HashMap<String, String> placeholders) {
* Add a placeholder to the name of the item.
*
* @param placeholder the placeholder that will be replaced.
* @param argument the argument you wish to replace the placeholder with.
* @param argument the argument you wish to replace the placeholder with.
* @return the ItemBuilder with updated info.
*/
public ItemBuilder addNamePlaceholder(String placeholder, String argument) {
Expand Down Expand Up @@ -803,7 +800,7 @@ public ItemBuilder setLore(List<String> lore) {
* Set the lore of the item with papi support in the builder. This will auto force color in all the lores that contains color code. (&a, &c, &7, etc...)
*
* @param player the player viewing the button.
* @param lore the lore of the item in the builder.
* @param lore the lore of the item in the builder.
* @return the ItemBuilder with updated info.
*/
public ItemBuilder setLore(Player player, List<String> lore) {
Expand Down Expand Up @@ -844,7 +841,7 @@ public ItemBuilder setLorePlaceholders(HashMap<String, String> placeholders) {
* Add a placeholder to the lore of the item.
*
* @param placeholder the placeholder you wish to replace.
* @param argument the argument that will replace the placeholder.
* @param argument the argument that will replace the placeholder.
* @return the ItemBuilder with updated info.
*/
public ItemBuilder addLorePlaceholder(String placeholder, String argument) {
Expand Down Expand Up @@ -993,7 +990,7 @@ public ItemBuilder setEnchantments(HashMap<Enchantment, Integer> enchantment) {
* Adds an enchantment to the item.
*
* @param enchantment the enchantment you wish to add.
* @param level the level of the enchantment ( Unsafe levels included )
* @param level the level of the enchantment ( Unsafe levels included )
* @return the ItemBuilder with updated enchantments.
*/
public ItemBuilder addEnchantments(Enchantment enchantment, int level) {
Expand Down Expand Up @@ -1181,7 +1178,7 @@ private static ItemBuilder set(ItemStack item, ItemBuilder itemBuilder) {
/**
* Converts a string to an ItemBuilder with a placeholder for errors.
*
* @param itemString the string you wish to convert.
* @param itemString the string you wish to convert.
* @param placeHolder the placeholder to use if there is an error.
* @return the string as an ItemBuilder.
*/
Expand Down

0 comments on commit 06ca291

Please sign in to comment.