Class PlayerDataComponent
java.lang.Object
me.andreasmelone.glowingeyes.common.component.data.PlayerDataComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddTrackedBy(net.minecraft.world.entity.player.Player playerTracked, net.minecraft.world.entity.player.Player trackedBy) Adds a player to the list of players tracking the given playerstatic Set<net.minecraft.world.entity.player.Player>getTrackedBy(net.minecraft.world.entity.player.Player player) Gets the players that are tracking the given playerstatic booleanhasMod(net.minecraft.world.entity.player.Player player) Gets whether the player has the mod installedstatic voidremoveTrackedBy(net.minecraft.world.entity.player.Player playerTracked, net.minecraft.world.entity.player.Player trackedBy) Removes a player from the list of players tracking the given playerstatic voidsetHasMod(net.minecraft.world.entity.player.Player player, boolean hasMod) Sets whether the player has the mod installedstatic voidsetImplementation(IPlayerDataComponent instance)
-
Field Details
-
IDENTIFIER
public static final net.minecraft.resources.ResourceLocation IDENTIFIER
-
-
Method Details
-
hasMod
public static boolean hasMod(net.minecraft.world.entity.player.Player player) Gets whether the player has the mod installed- Parameters:
player- the player to check- Returns:
- whether the player has the mod installed
-
setHasMod
public static void setHasMod(net.minecraft.world.entity.player.Player player, boolean hasMod) Sets whether the player has the mod installed- Parameters:
player- the player to set the mod installed status for
-
getTrackedBy
public static Set<net.minecraft.world.entity.player.Player> getTrackedBy(net.minecraft.world.entity.player.Player player) Gets the players that are tracking the given player- Parameters:
player- the player to get the tracking players for
-
addTrackedBy
public static void addTrackedBy(net.minecraft.world.entity.player.Player playerTracked, net.minecraft.world.entity.player.Player trackedBy) Adds a player to the list of players tracking the given player- Parameters:
playerTracked- the player to add to the list of players trackingtrackedBy- the player tracking the other player
-
removeTrackedBy
public static void removeTrackedBy(net.minecraft.world.entity.player.Player playerTracked, net.minecraft.world.entity.player.Player trackedBy) Removes a player from the list of players tracking the given player- Parameters:
playerTracked- the player to remove from the list of players trackingtrackedBy- the player tracking the other player
-
setImplementation
-