Record Class LifestealerUserController.BanSettings

java.lang.Object
java.lang.Record
dev.chicoferreira.lifestealer.user.LifestealerUserController.BanSettings
Record Components:
kickMessage - the message in MiniMessage format to send to the player when they are kicked
joinMessage - the message in MiniMessage format to send to the player when they join
commands - the commands to execute when the player is banned
external - 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 Details

    • BanSettings

      public BanSettings(String kickMessage, String joinMessage, List<String> commands, boolean external)
      Creates an instance of a BanSettings record class.
      Parameters:
      kickMessage - the value for the kickMessage record component
      joinMessage - the value for the joinMessage record component
      commands - the value for the commands record component
      external - the value for the external record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • kickMessage

      public String kickMessage()
      Returns the value of the kickMessage record component.
      Returns:
      the value of the kickMessage record component
    • joinMessage

      public String joinMessage()
      Returns the value of the joinMessage record component.
      Returns:
      the value of the joinMessage record component
    • commands

      public List<String> commands()
      Returns the value of the commands record component.
      Returns:
      the value of the commands record component
    • external

      public boolean external()
      Returns the value of the external record component.
      Returns:
      the value of the external record component