Record Class LifestealerUserController.BanSettings
java.lang.Object
java.lang.Record
dev.chicoferreira.lifestealer.user.LifestealerUserController.BanSettings
- Record Components:
kickMessage
- the message inMiniMessage
format to send to the player when they are kickedjoinMessage
- the message inMiniMessage
format to send to the player when they joincommands
- the commands to execute when the player is bannedexternal
- if the player should be kicked and not let be joined when they are banned
- Enclosing class:
LifestealerUserController
@ConfigSerializable
public static record LifestealerUserController.BanSettings(String kickMessage, String joinMessage, List<String> commands, boolean external)
extends Record
The settings for the ban feature.
If the external flag is enabled, the player won't be kicked, and he can still join the server even if he is banned. The plugin still registers the ban internally and executes the ban commands.
-
Constructor Summary
ConstructorsConstructorDescriptionBanSettings
(String kickMessage, String joinMessage, List<String> commands, boolean external) Creates an instance of aBanSettings
record class. -
Method Summary
Modifier and TypeMethodDescriptioncommands()
Returns the value of thecommands
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
external()
Returns the value of theexternal
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thejoinMessage
record component.Returns the value of thekickMessage
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
BanSettings
Creates an instance of aBanSettings
record class.- Parameters:
kickMessage
- the value for thekickMessage
record componentjoinMessage
- the value for thejoinMessage
record componentcommands
- the value for thecommands
record componentexternal
- the value for theexternal
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 '=='. -
kickMessage
Returns the value of thekickMessage
record component.- Returns:
- the value of the
kickMessage
record component
-
joinMessage
Returns the value of thejoinMessage
record component.- Returns:
- the value of the
joinMessage
record component
-
commands
Returns the value of thecommands
record component.- Returns:
- the value of the
commands
record component
-
external
public boolean external()Returns the value of theexternal
record component.- Returns:
- the value of the
external
record component
-