Skip to content

Commit 144a7c7

Browse files
authored
Add missing deprecation for Material#getCreativeCategory (#13686)
1 parent 392e594 commit 144a7c7

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

paper-api/src/main/java/org/bukkit/Material.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3556,10 +3556,12 @@ public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(@NotN
35563556
/**
35573557
* Get the {@link CreativeCategory} to which this material belongs.
35583558
*
3559-
* @return the creative category. null if does not belong to a category
3559+
* @return the creative category. null if it does not belong to a category
3560+
* @deprecated items can belong to multiple creative categories and this is no
3561+
* longer implemented, will always be {@link CreativeCategory#BUILDING_BLOCKS} if not null
35603562
*/
3561-
@Nullable
3562-
public CreativeCategory getCreativeCategory() {
3563+
@Deprecated(since = "1.20.6", forRemoval = true)
3564+
public @Nullable CreativeCategory getCreativeCategory() {
35633565
ItemType type = asItemType();
35643566
return type == null ? null : type.getCreativeCategory();
35653567
}

paper-api/src/main/java/org/bukkit/inventory/ItemType.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3281,8 +3281,9 @@ private static <M extends ItemType> M getItemType(@KeyPattern.Value final String
32813281
/**
32823282
* Get the {@link CreativeCategory} to which this item type belongs.
32833283
*
3284-
* @return the creative category. null if does not belong to a category
3285-
<!-- * @deprecated use #getCreativeCategories() -->
3284+
* @return the creative category. null if it does not belong to a category
3285+
* @deprecated items can belong to multiple creative categories and this is no
3286+
* longer implemented, will always be {@link CreativeCategory#BUILDING_BLOCKS}
32863287
*/
32873288
@Deprecated(since = "1.20.6", forRemoval = true)
32883289
@Nullable CreativeCategory getCreativeCategory();

0 commit comments

Comments
 (0)