Record Class CustomFlag
java.lang.Object
java.lang.Record
io.github.lijinhong11.protector.api.flag.CustomFlag
- Record Components:
plugin
- the pluginnamespace
- the namespace for verifyid
- the flag IDdefaultValue
- the default valuedisplayName
- the display name of the flag (optional)description
- the description about the flag (optional)
public record CustomFlag(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull String namespace, @NotNull String id, boolean defaultValue, @Nullable String displayName, @Nullable String description)
extends Record
The custom flag object
-
Constructor Summary
ConstructorsConstructorDescriptionCustomFlag
(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull String namespace, @NotNull String id, boolean defaultValue, @Nullable String displayName, @Nullable String description) Creates an instance of aCustomFlag
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of thedefaultValue
record component.@Nullable String
Returns the value of thedescription
record component.@Nullable String
Returns the value of thedisplayName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull String
id()
Returns the value of theid
record component.@NotNull String
Returns the value of thenamespace
record component.@NotNull org.bukkit.plugin.Plugin
plugin()
Returns the value of theplugin
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CustomFlag
public CustomFlag(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull String namespace, @NotNull @NotNull String id, boolean defaultValue, @Nullable @Nullable String displayName, @Nullable @Nullable String description) Creates an instance of aCustomFlag
record class.- Parameters:
plugin
- the value for theplugin
record componentnamespace
- the value for thenamespace
record componentid
- the value for theid
record componentdefaultValue
- the value for thedefaultValue
record componentdisplayName
- the value for thedisplayName
record componentdescription
- the value for thedescription
record 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
plugin
@NotNull public @NotNull org.bukkit.plugin.Plugin plugin()Returns the value of theplugin
record component.- Returns:
- the value of the
plugin
record component
-
namespace
Returns the value of thenamespace
record component.- Returns:
- the value of the
namespace
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
defaultValue
public boolean defaultValue()Returns the value of thedefaultValue
record component.- Returns:
- the value of the
defaultValue
record component
-
displayName
Returns the value of thedisplayName
record component.- Returns:
- the value of the
displayName
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-