Record Class PluginRegistry.RegisteredComponents
java.lang.Object
java.lang.Record
com.github.pinont.singularitylib.api.registry.PluginRegistry.RegisteredComponents
- Enclosing class:
PluginRegistry
public static record PluginRegistry.RegisteredComponents(@NotNull List<SimpleCommand> commands, @NotNull List<org.bukkit.event.Listener> listeners, @NotNull List<CustomItem> customItems)
extends Record
Immutable snapshot of a plugin's registered components.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRegisteredComponents(@NotNull List<SimpleCommand> commands, @NotNull List<org.bukkit.event.Listener> listeners, @NotNull List<CustomItem> customItems) Creates an instance of aRegisteredComponentsrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull List<SimpleCommand> commands()Returns the value of thecommandsrecord component.@NotNull List<CustomItem> Returns the value of thecustomItemsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull List<org.bukkit.event.Listener> Returns the value of thelistenersrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
RegisteredComponents
public RegisteredComponents(@NotNull @NotNull List<SimpleCommand> commands, @NotNull @NotNull List<org.bukkit.event.Listener> listeners, @NotNull @NotNull List<CustomItem> customItems) Creates an instance of aRegisteredComponentsrecord class.- Parameters:
commands- the value for thecommandsrecord componentlisteners- the value for thelistenersrecord componentcustomItems- the value for thecustomItemsrecord component
-
-
Method Details
-
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). -
commands
Returns the value of thecommandsrecord component.- Returns:
- the value of the
commandsrecord component
-
listeners
Returns the value of thelistenersrecord component.- Returns:
- the value of the
listenersrecord component
-
customItems
Returns the value of thecustomItemsrecord component.- Returns:
- the value of the
customItemsrecord component
-