Record Class VoiceItemContext
java.lang.Object
java.lang.Record
fr.dreamin.dreamvoice.api.item.VoiceItemContext
public record VoiceItemContext(@NotNull fr.dreamin.dreamapi.api.item.ItemContext context)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionVoiceItemContext(@NotNull fr.dreamin.dreamapi.api.item.ItemContext context) Creates an instance of aVoiceItemContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanconnectRadio(@NotNull String frequency) @NotNull fr.dreamin.dreamapi.api.item.ItemContextcontext()Returns the value of thecontextrecord component.booleanfinal booleanIndicates whether some other object is "equal to" this one.@NotNull org.bukkit.event.Eventevent()@Nullable VoiceFilterServicebooleanfinal inthashCode()Returns a hash code value for this object.@NotNull org.bukkit.inventory.ItemStackitem()@NotNull org.bukkit.entity.Playerplayer()@Nullable VoiceRadioServicebooleanremoveFilter(@NotNull String filterId) booleantimedFilter(@NotNull String filterId, @NotNull Duration duration) booleantoggleFilter(@NotNull String filterId) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VoiceItemContext
public VoiceItemContext(@NotNull @NotNull fr.dreamin.dreamapi.api.item.ItemContext context) Creates an instance of aVoiceItemContextrecord class.- Parameters:
context- the value for thecontextrecord component
-
-
Method Details
-
player
@NotNull public @NotNull org.bukkit.entity.Player player() -
item
@NotNull public @NotNull org.bukkit.inventory.ItemStack item() -
event
@NotNull public @NotNull org.bukkit.event.Event event() -
filterService
-
radioService
-
addFilter
-
removeFilter
-
hasFilter
-
toggleFilter
-
timedFilter
-
connectRadio
-
disconnectRadio
public boolean disconnectRadio() -
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
context
@NotNull public @NotNull fr.dreamin.dreamapi.api.item.ItemContext context()Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-