Record Class IntegrationStatus
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.platform.IntegrationStatus
- Record Components:
name- the plugin's name, such as"PlaceholderAPI"installed- whether the plugin is present on the server at allversion- its installed version, ornullwhen it is not installedminimumVersion- the oldest version Zentrix hooks into, ornullwhen any will dostate-CapabilityState.AVAILABLEwhen Zentrix's hook is activereason- why the hook is not active;nullwhen it is
public record IntegrationStatus(@NotNull String name, boolean installed, @Nullable String version, @Nullable String minimumVersion, @NotNull CapabilityState state, @Nullable String reason)
extends Record
One optional plugin Zentrix integrates with, as Zentrix found it.
Reading this never loads the integrated plugin's classes, so an addon can decide on its own prerequisites without linking against them.
- Since:
- 1.8.0
-
Constructor Summary
ConstructorsConstructorDescriptionIntegrationStatus(@NotNull String name, boolean installed, @Nullable String version, @Nullable String minimumVersion, @NotNull CapabilityState state, @Nullable String reason) Creates an instance of aIntegrationStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinstalledrecord component.booleanisHooked()Whether Zentrix's hook into this plugin is active.@Nullable StringReturns the value of theminimumVersionrecord component.@NotNull Stringname()Returns the value of thenamerecord component.@Nullable Stringreason()Returns the value of thereasonrecord component.@NotNull CapabilityStatestate()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringversion()Returns the value of theversionrecord component.
-
Constructor Details
-
IntegrationStatus
public IntegrationStatus(@NotNull @NotNull String name, boolean installed, @Nullable @Nullable String version, @Nullable @Nullable String minimumVersion, @NotNull @NotNull CapabilityState state, @Nullable @Nullable String reason) Creates an instance of aIntegrationStatusrecord class.- Parameters:
name- the value for thenamerecord componentinstalled- the value for theinstalledrecord componentversion- the value for theversionrecord componentminimumVersion- the value for theminimumVersionrecord componentstate- the value for thestaterecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
isHooked
public boolean isHooked()Whether Zentrix's hook into this plugin is active. -
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
installed
public boolean installed()Returns the value of theinstalledrecord component.- Returns:
- the value of the
installedrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
minimumVersion
Returns the value of theminimumVersionrecord component.- Returns:
- the value of the
minimumVersionrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-