Record Class ScoreboardTeam.Provider
java.lang.Object
java.lang.Record
com.petrolpark.core.team.scoreboard.ScoreboardTeam.Provider
- All Implemented Interfaces:
ITeam.Provider
- Enclosing class:
ScoreboardTeam
public static record ScoreboardTeam.Provider(String teamName)
extends Record
implements ITeam.Provider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ScoreboardTeam.Provider> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, ScoreboardTeam.Provider> Fields inherited from interface com.petrolpark.core.team.ITeam.Provider
TYPED_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.provideTeam(net.minecraft.world.level.Level level) teamName()Returns the value of theteamNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,ScoreboardTeam.Provider> STREAM_CODEC
-
-
Constructor Details
-
Provider
Creates an instance of aProviderrecord class.- Parameters:
teamName- the value for theteamNamerecord component
-
-
Method Details
-
provideTeam
- Specified by:
provideTeamin interfaceITeam.Provider
-
getProviderType
- Specified by:
getProviderTypein interfaceITeam.Provider
-
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). -
teamName
Returns the value of theteamNamerecord component.- Returns:
- the value of the
teamNamerecord component
-