Package io.github.jtwitch.command
Record Class FollowersCommand
java.lang.Object
java.lang.Record
io.github.jtwitch.command.FollowersCommand
- All Implemented Interfaces:
Command
This command allows you or your mods to restrict chat
to all or some of your followers, based on how long
they’ve followed — from 0 minutes (all followers) to 3 months.
-
Constructor Summary
ConstructorsConstructorDescriptionFollowersCommand(TimeUnit timeUnit)
Creates an instance of aFollowersCommand
record class. -
Method Summary
-
Constructor Details
-
FollowersCommand
Creates an instance of aFollowersCommand
record class.- Parameters:
timeUnit
- the value for thetimeUnit
record component
-
-
Method Details
-
getCommand
- Specified by:
getCommand
in interfaceCommand
- Returns:
- the command of the chat (like /ban or /info)
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
timeUnit
Returns the value of thetimeUnit
record component.- Returns:
- the value of the
timeUnit
record component
-