29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: lexikiq <noellekiq@gmail.com>
|
|
Date: Fri, 18 Jun 2021 03:18:47 -0400
|
|
Subject: [PATCH] Add UnsafeValues#canPlaceItemOn
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
|
index f59030893eba2bf653207b040a5f54fdf7b7b50f..02c78e80a0e30aaeebc441fde9b27e3563011a0f 100644
|
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
|
@@ -225,4 +225,17 @@ public interface UnsafeValues {
|
|
*/
|
|
boolean isCollidable(@org.jetbrains.annotations.NotNull Material material);
|
|
// Paper end
|
|
+
|
|
+ // Parchment start
|
|
+ /**
|
|
+ * Determines if this item can be placed on a block. Must be run synchronously.
|
|
+ * Factors in player location, blocking events, hitboxes, and more.
|
|
+ * @param item item to test
|
|
+ * @param player optional player placing the block
|
|
+ * @param block block that is being placed against
|
|
+ * @param face cardinal direction
|
|
+ * @return if the item can be placed
|
|
+ */
|
|
+ java.util.concurrent.CompletableFuture<Boolean> canPlaceItemOn(@org.jetbrains.annotations.NotNull ItemStack item, @org.jetbrains.annotations.Nullable gg.projecteden.parchment.OptionalHumanEntity player, @org.jetbrains.annotations.NotNull org.bukkit.block.Block block, @org.jetbrains.annotations.NotNull org.bukkit.block.BlockFace face);
|
|
+ // Parchment end
|
|
}
|