Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention
import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask

plugins {
Expand All @@ -13,7 +12,7 @@ if (!project.hasProperty(ARTIFACTORY_CONTEXT_URL)) ext[ARTIFACTORY_CONTEXT_URL]
if (!project.hasProperty(ARTIFACTORY_USER)) ext[ARTIFACTORY_USER] = "guest"
if (!project.hasProperty(ARTIFACTORY_PASSWORD)) ext[ARTIFACTORY_PASSWORD] = ""

configure<ArtifactoryPluginConvention> {
artifactory {
setContextUrl("${project.property(ARTIFACTORY_CONTEXT_URL)}")
clientConfig.publisher.run {
repoKey = when {
Expand Down
3 changes: 3 additions & 0 deletions build-logic/src/main/kotlin/buildlogic.libs.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ tasks.register<Jar>("sourcesJar") {
it.replaceFirst(textPattern, to)
}
path = path.replaceFirst(filePattern, "$1${to.replace('.', '/')}$2")
permissions {
unix("rw-r--r--")
}
}
}
archiveClassifier.set("sources")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,19 @@
import org.bukkit.entity.Entity;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.concurrent.CompletableFuture;

/**
* This class is mainly here to replace PaperLib, as it no longer fully functions on MC 26.1+.
*/
public class PaperInterop {

private PaperInterop() {
}

public static @Nullable InventoryHolder getHolder(@Nonnull Inventory inventory, boolean useSnapshot) {
if (PaperLib.isPaper()) {
return inventory.getHolder(useSnapshot);
Expand All @@ -45,15 +47,15 @@ public class PaperInterop {
return inventory.getHolder();
}

public static @NotNull BlockState getBlockState(@Nonnull Block block, boolean useSnapshot) {
public static @Nonnull BlockState getBlockState(@Nonnull Block block, boolean useSnapshot) {
if (PaperLib.isPaper()) {
return block.getState(useSnapshot);
}

return block.getState();
}

public static @NotNull CompletableFuture<Boolean> teleportAsync(@Nonnull Entity entity, @Nonnull Location location) {
public static @Nonnull CompletableFuture<Boolean> teleportAsync(@Nonnull Entity entity, @Nonnull Location location) {
if (PaperLib.isPaper()) {
return entity.teleportAsync(location);
}
Expand Down