Package net.minecraft.server.network
Record Class FilteredText
java.lang.Object
java.lang.Record
net.minecraft.server.network.FilteredText
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FilteredText
private final FilterMask
The field for themask
record component.private final String
The field for theraw
record component. -
Constructor Summary
ConstructorsConstructorDescriptionFilteredText
(String raw, FilterMask mask) Creates an instance of aFilteredText
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.filtered()
static FilteredText
fullyFiltered
(String p_243261_) final int
hashCode()
Returns a hash code value for this object.boolean
mask()
Returns the value of themask
record component.static FilteredText
passThrough
(String p_243257_) raw()
Returns the value of theraw
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
raw
The field for theraw
record component. -
mask
The field for themask
record component. -
EMPTY
-
-
Constructor Details
-
FilteredText
Creates an instance of aFilteredText
record class.- Parameters:
raw
- the value for theraw
record componentmask
- the value for themask
record component
-
-
Method Details
-
passThrough
-
fullyFiltered
-
filtered
-
filteredOrEmpty
-
isFiltered
public boolean isFiltered() -
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)
. -
raw
Returns the value of theraw
record component.- Returns:
- the value of the
raw
record component
-
mask
Returns the value of themask
record component.- Returns:
- the value of the
mask
record component
-