Class ModPlayer
java.lang.Object
at.setup_studios.mc_milsim.gameplay.player.ModPlayer
Represents a player in the mod system with their associated data.
This class manages player information including their Minecraft player instance,
name, UUID, and team assignment.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
net.minecraft.world.entity.player.Player
getRole()
getTeam()
getUUID()
boolean
hasTeam()
void
setPlayer
(net.minecraft.world.entity.player.Player player) Updates the player instance and synchronizes the player's name.void
setRole
(PlayerRole role) void
toString()
Returns a string representation of the player, including the player's name, UUID, and associated team information, if applicable.
-
Constructor Details
-
ModPlayer
-
-
Method Details
-
setPlayer
public void setPlayer(net.minecraft.world.entity.player.Player player) Updates the player instance and synchronizes the player's name. This is useful when player data needs to be updated after reconnection.- Parameters:
player
- The new Minecraft player instance
-
toString
Returns a string representation of the player, including the player's name, UUID, and associated team information, if applicable. Each attribute is formatted using Minecraft's text formatting for better visual distinction in the output. -
setTeam
-
getTeam
-
hasTeam
public boolean hasTeam() -
getUUID
-
getName
-
getPlayer
public net.minecraft.world.entity.player.Player getPlayer() -
getRole
-
setRole
-