More compile fixes
This commit is contained in:
parent
8d3759d4a5
commit
ed790385ed
361 changed files with 69 additions and 380 deletions
55
patches/api/0285-Attributes-API-for-item-defaults.patch
Normal file
55
patches/api/0285-Attributes-API-for-item-defaults.patch
Normal file
|
@ -0,0 +1,55 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Sat, 8 May 2021 15:02:00 -0700
|
||||
Subject: [PATCH] Attributes API for item defaults
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index b58383b5e3077cbd5df65b8147693aa9543493ef..d5bdd25f6243d99b6b8c0acd6980db977f75c7e4 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4758,6 +4758,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
public io.papermc.paper.inventory.ItemRarity getItemRarity() {
|
||||
return Bukkit.getUnsafe().getItemRarity(this);
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Returns an immutable multimap of attributes for the slot.
|
||||
+ * {@link #isItem()} must be true for this material.
|
||||
+ *
|
||||
+ * @param equipmentSlot the slot to get the attributes for
|
||||
+ * @throws IllegalArgumentException if {@link #isItem()} is false
|
||||
+ * @return an immutable multimap of attributes
|
||||
+ * @deprecated use {@link #getDefaultAttributeModifiers(EquipmentSlot)}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Deprecated
|
||||
+ public Multimap<Attribute, AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) {
|
||||
+ return Bukkit.getUnsafe().getItemAttributes(this, equipmentSlot);
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 057f4db9cb6b686ab941ec5d3e6ca23dcfbd845f..db8ffa9b303b9128be175f383fdf838a4e0719e5 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -197,6 +197,18 @@ public interface UnsafeValues {
|
||||
*/
|
||||
public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);
|
||||
|
||||
+ /**
|
||||
+ * Returns an immutable multimap of attributes for the material and slot.
|
||||
+ * {@link Material#isItem()} must be true for this material.
|
||||
+ *
|
||||
+ * @param material the material
|
||||
+ * @param equipmentSlot the slot to get the attributes for
|
||||
+ * @throws IllegalArgumentException if {@link Material#isItem()} is false
|
||||
+ * @return an immutable multimap of attributes
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.NotNull
|
||||
+ public Multimap<Attribute, AttributeModifier> getItemAttributes(@org.jetbrains.annotations.NotNull Material material, @org.jetbrains.annotations.NotNull EquipmentSlot equipmentSlot);
|
||||
+
|
||||
/**
|
||||
* Returns the server's protocol version.
|
||||
*
|
Loading…
Add table
Add a link
Reference in a new issue