mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
Fix merge
This commit is contained in:
parent
7d3a91d3cf
commit
a1a974f0d8
3 changed files with 20 additions and 13 deletions
|
@ -2666,6 +2666,18 @@ public interface Material extends Keyed, Comparable<Material> {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(@NotNull EquipmentSlot slot);
|
Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(@NotNull EquipmentSlot slot);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the {@link CreativeCategory} to which this material belongs.
|
||||||
|
*
|
||||||
|
* @return the creative category. null if does not belong to a category
|
||||||
|
* @see Material#asItemType()
|
||||||
|
* @see ItemType#getCreativeCategory()
|
||||||
|
* @deprecated Can only get creative category from ItemType
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
@Deprecated
|
||||||
|
CreativeCategory getCreativeCategory();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param other to compare to.
|
* @param other to compare to.
|
||||||
* @return negative if this old enum is lower, zero if equal and positive if higher than the given old enum.
|
* @return negative if this old enum is lower, zero if equal and positive if higher than the given old enum.
|
||||||
|
@ -2689,14 +2701,4 @@ public interface Material extends Keyed, Comparable<Material> {
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public abstract int ordinal();
|
public abstract int ordinal();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the {@link CreativeCategory} to which this material belongs.
|
|
||||||
*
|
|
||||||
* @return the creative category. null if does not belong to a category
|
|
||||||
*/
|
|
||||||
@Nullable
|
|
||||||
public CreativeCategory getCreativeCategory() {
|
|
||||||
return Bukkit.getUnsafe().getCreativeCategory(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ package org.bukkit;
|
||||||
|
|
||||||
import org.bukkit.advancement.Advancement;
|
import org.bukkit.advancement.Advancement;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.inventory.CreativeCategory;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.material.MaterialData;
|
import org.bukkit.material.MaterialData;
|
||||||
import org.bukkit.plugin.InvalidPluginException;
|
import org.bukkit.plugin.InvalidPluginException;
|
||||||
|
@ -75,6 +74,4 @@ public interface UnsafeValues {
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
Material createLegacyMaterial(String name, int id, int maxStackSize, short maxDurability, Class<? extends MaterialData> materialData);
|
Material createLegacyMaterial(String name, int id, int maxStackSize, short maxDurability, Class<? extends MaterialData> materialData);
|
||||||
|
|
||||||
CreativeCategory getCreativeCategory(Material material);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1190,4 +1190,12 @@ public interface ItemType extends Material {
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(@NotNull EquipmentSlot slot);
|
Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(@NotNull EquipmentSlot slot);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the {@link CreativeCategory} to which this material belongs.
|
||||||
|
*
|
||||||
|
* @return the creative category. null if does not belong to a category
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
CreativeCategory getCreativeCategory();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue