Package net.okocraft.box.api.feature
Record Class FeatureContext.Registration
java.lang.Object
java.lang.Record
net.okocraft.box.api.feature.FeatureContext.Registration
- Record Components:
dataDirectory- a plugin's data directorydefaultMessageCollector- aDefaultMessageCollectorto collect default messageseventCaller- aEventCallerlistenerSubscriber- aListenerSubscriber
- Enclosing class:
FeatureContext
public static record FeatureContext.Registration(@NotNull Path dataDirectory, @NotNull DefaultMessageCollector defaultMessageCollector, @NotNull EventCaller<BoxEvent> eventCaller, @NotNull ListenerSubscriber<net.kyori.adventure.key.Key,BoxEvent,Priority> listenerSubscriber)
extends Record
A context on registration.
-
Constructor Summary
ConstructorsConstructorDescriptionRegistration(@NotNull Path dataDirectory, @NotNull DefaultMessageCollector defaultMessageCollector, @NotNull EventCaller<BoxEvent> eventCaller, @NotNull ListenerSubscriber<net.kyori.adventure.key.Key, BoxEvent, Priority> listenerSubscriber) Creates an instance of aRegistrationrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull PathReturns the value of thedataDirectoryrecord component.@NotNull DefaultMessageCollectorReturns the value of thedefaultMessageCollectorrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull EventCaller<BoxEvent> Returns the value of theeventCallerrecord component.final inthashCode()Returns a hash code value for this object.@NotNull ListenerSubscriber<net.kyori.adventure.key.Key, BoxEvent, Priority> Returns the value of thelistenerSubscriberrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Registration
public Registration(@NotNull @NotNull Path dataDirectory, @NotNull @NotNull DefaultMessageCollector defaultMessageCollector, @NotNull @NotNull EventCaller<BoxEvent> eventCaller, @NotNull @NotNull ListenerSubscriber<net.kyori.adventure.key.Key, BoxEvent, Priority> listenerSubscriber) Creates an instance of aRegistrationrecord class.- Parameters:
dataDirectory- the value for thedataDirectoryrecord componentdefaultMessageCollector- the value for thedefaultMessageCollectorrecord componenteventCaller- the value for theeventCallerrecord componentlistenerSubscriber- the value for thelistenerSubscriberrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
dataDirectory
Returns the value of thedataDirectoryrecord component.- Returns:
- the value of the
dataDirectoryrecord component
-
defaultMessageCollector
Returns the value of thedefaultMessageCollectorrecord component.- Returns:
- the value of the
defaultMessageCollectorrecord component
-
eventCaller
Returns the value of theeventCallerrecord component.- Returns:
- the value of the
eventCallerrecord component
-
listenerSubscriber
@NotNull public @NotNull ListenerSubscriber<net.kyori.adventure.key.Key,BoxEvent, listenerSubscriber()Priority> Returns the value of thelistenerSubscriberrecord component.- Returns:
- the value of the
listenerSubscriberrecord component
-