Record Class LifestealerUserController.BanSettings
java.lang.Object
java.lang.Record
dev.chicoferreira.lifestealer.user.LifestealerUserController.BanSettings
- Record Components:
kickMessage- the message inMiniMessageformat to send to the player when they are kickedjoinMessage- the message inMiniMessageformat 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 aBanSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommands()Returns the value of thecommandsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanexternal()Returns the value of theexternalrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thejoinMessagerecord component.Returns the value of thekickMessagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BanSettings
Creates an instance of aBanSettingsrecord class.- Parameters:
kickMessage- the value for thekickMessagerecord componentjoinMessage- the value for thejoinMessagerecord componentcommands- the value for thecommandsrecord componentexternal- the value for theexternalrecord 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 thekickMessagerecord component.- Returns:
- the value of the
kickMessagerecord component
-
joinMessage
Returns the value of thejoinMessagerecord component.- Returns:
- the value of the
joinMessagerecord component
-
commands
Returns the value of thecommandsrecord component.- Returns:
- the value of the
commandsrecord component
-
external
public boolean external()Returns the value of theexternalrecord component.- Returns:
- the value of the
externalrecord component
-