Package org.geysermc.geyser.item.custom
Record Class GeyserCustomItemBedrockOptions
java.lang.Object
java.lang.Record
org.geysermc.geyser.item.custom.GeyserCustomItemBedrockOptions
- All Implemented Interfaces:
org.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions
public record GeyserCustomItemBedrockOptions(@Nullable String icon, boolean allowOffhand, boolean displayHandheld, int protectionValue, @NonNull org.geysermc.geyser.api.util.CreativeCategory creativeCategory, @Nullable String creativeGroup, @NonNull Set<org.geysermc.geyser.api.util.Identifier> tags)
extends Record
implements org.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGeyserCustomItemBedrockOptions(@Nullable String icon, boolean allowOffhand, boolean displayHandheld, int protectionValue, @NonNull org.geysermc.geyser.api.util.CreativeCategory creativeCategory, @Nullable String creativeGroup, @NonNull Set<org.geysermc.geyser.api.util.Identifier> tags) Creates an instance of aGeyserCustomItemBedrockOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowOffhandrecord component.@NonNull org.geysermc.geyser.api.util.CreativeCategoryReturns the value of thecreativeCategoryrecord component.@Nullable StringReturns the value of thecreativeGrouprecord component.booleanReturns the value of thedisplayHandheldrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringicon()Returns the value of theiconrecord component.intReturns the value of theprotectionValuerecord component.intprotectionValue(CustomItemContext context) @NonNull Set<org.geysermc.geyser.api.util.Identifier>tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GeyserCustomItemBedrockOptions
public GeyserCustomItemBedrockOptions(@Nullable String icon, boolean allowOffhand, boolean displayHandheld, int protectionValue, @NonNull org.geysermc.geyser.api.util.CreativeCategory creativeCategory, @Nullable String creativeGroup, @NonNull Set<org.geysermc.geyser.api.util.Identifier> tags) Creates an instance of aGeyserCustomItemBedrockOptionsrecord class.- Parameters:
icon- the value for theiconrecord componentallowOffhand- the value for theallowOffhandrecord componentdisplayHandheld- the value for thedisplayHandheldrecord componentprotectionValue- the value for theprotectionValuerecord componentcreativeCategory- the value for thecreativeCategoryrecord componentcreativeGroup- the value for thecreativeGrouprecord componenttags- the value for thetagsrecord component
-
-
Method Details
-
protectionValue
public int protectionValue()Returns the value of theprotectionValuerecord component.- Specified by:
protectionValuein interfaceorg.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions- Returns:
- the value of the
protectionValuerecord component
-
protectionValue
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
icon
Returns the value of theiconrecord component.- Specified by:
iconin interfaceorg.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions- Returns:
- the value of the
iconrecord component
-
allowOffhand
public boolean allowOffhand()Returns the value of theallowOffhandrecord component.- Specified by:
allowOffhandin interfaceorg.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions- Returns:
- the value of the
allowOffhandrecord component
-
displayHandheld
public boolean displayHandheld()Returns the value of thedisplayHandheldrecord component.- Specified by:
displayHandheldin interfaceorg.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions- Returns:
- the value of the
displayHandheldrecord component
-
creativeCategory
public @NonNull org.geysermc.geyser.api.util.CreativeCategory creativeCategory()Returns the value of thecreativeCategoryrecord component.- Specified by:
creativeCategoryin interfaceorg.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions- Returns:
- the value of the
creativeCategoryrecord component
-
creativeGroup
Returns the value of thecreativeGrouprecord component.- Specified by:
creativeGroupin interfaceorg.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions- Returns:
- the value of the
creativeGrouprecord component
-
tags
Returns the value of thetagsrecord component.- Specified by:
tagsin interfaceorg.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions- Returns:
- the value of the
tagsrecord component
-