java.lang.Object
petrolpark.mc.library.core.world.entity.player.team.AbstractTeam
petrolpark.mc.library.core.world.entity.player.team.everybody.EverybodyTeam
All Implemented Interfaces:
net.minecraft.core.component.DataComponentHolder, net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension, net.neoforged.neoforge.common.MutableDataComponentHolder, ITeam

@ParametersAreNonnullByDefault public class EverybodyTeam extends AbstractTeam
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface petrolpark.mc.library.core.world.entity.player.team.ITeam

    ITeam.ProviderType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final net.minecraft.world.level.Level
     

    Fields inherited from class petrolpark.mc.library.core.world.entity.player.team.AbstractTeam

    components
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    EverybodyTeam(net.minecraft.world.level.Level level, net.minecraft.core.component.DataComponentPatch components)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
    The name of this Team, without necessarily referring to any members.
    The ITeam.Provider that provides this exact Team instance.
    boolean
    isAdmin(net.minecraft.world.entity.player.Player player)
    What this means will be different for every system that uses Teams.
    boolean
    isMember(net.minecraft.world.entity.player.Player player)
    Whether the given Player is in this Team, meaning they have access client-side to the Team's Data Components, and have any non-admin abilities.
    int
    The number of members of this Team.
    void
    renderIcon(net.minecraft.client.gui.GuiGraphics graphics)
    Render an icon for this ITeam.
    void
    setChanged(net.minecraft.core.component.DataComponentPatch patch)
    Called if any Data Components actually change.
    The unique username of every member of this Team, in no particular order.
    Stream<net.minecraft.server.level.ServerPlayer>
    Every member of this Team, with no guarantee of order.

    Methods inherited from class petrolpark.mc.library.core.world.entity.player.team.AbstractTeam

    applyComponents, applyComponents, getComponents, getDataComponentPatch, isNone, remove, set, writeDataComponentsTag

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.core.component.DataComponentHolder

    get, getOrDefault, has

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension

    addToTooltip, addToTooltip, get, getOrDefault, has

    Methods inherited from interface petrolpark.mc.library.core.world.entity.player.team.ITeam

    getRenderedMemberList, sendToAllMembers

    Methods inherited from interface net.neoforged.neoforge.common.MutableDataComponentHolder

    copyFrom, copyFrom, remove, set, update, update, update, update
  • Field Details

    • level

      public final net.minecraft.world.level.Level level
  • Constructor Details

    • EverybodyTeam

      protected EverybodyTeam(net.minecraft.world.level.Level level, net.minecraft.core.component.DataComponentPatch components)
  • Method Details

    • isMember

      public boolean isMember(net.minecraft.world.entity.player.Player player)
      Description copied from interface: ITeam
      Whether the given Player is in this Team, meaning they have access client-side to the Team's Data Components, and have any non-admin abilities.
      Parameters:
      player -
    • getProvider

      public EverybodyTeam.Provider getProvider()
      Description copied from interface: ITeam
      The ITeam.Provider that provides this exact Team instance.
    • memberCount

      public int memberCount()
      Description copied from interface: ITeam
      The number of members of this Team.
      Returns:
      Positive integer almost always greater than 0.
    • streamMemberUsernames

      public Stream<String> streamMemberUsernames()
      Description copied from interface: ITeam
      The unique username of every member of this Team, in no particular order. For ScoreboardTeams in particular, this method is faster than ITeam.streamOnlineMembers() and should be used in preference to calling that method and then getting the usernames.
    • streamOnlineMembers

      public Stream<net.minecraft.server.level.ServerPlayer> streamOnlineMembers()
      Description copied from interface: ITeam
      Every member of this Team, with no guarantee of order. It is faster to use ITeam.streamMemberUsernames() unless having the Player itself is vital. On the client side, that is the only way to know the members of the Team.
    • isAdmin

      public boolean isAdmin(net.minecraft.world.entity.player.Player player)
      Description copied from interface: ITeam
      What this means will be different for every system that uses Teams. It could mean the ability to change the name of a Restaurant, for example. It has nothing to do with operator permissions. If called, it is assumed that ITeam.isMember(Player) has already passed.
      Parameters:
      player -
    • getName

      public net.minecraft.network.chat.Component getName()
      Description copied from interface: ITeam
      The name of this Team, without necessarily referring to any members.
      See Also:
    • renderIcon

      public void renderIcon(net.minecraft.client.gui.GuiGraphics graphics)
      Description copied from interface: ITeam
      Render an icon for this ITeam. The icon should occupy (0, 0) -> (16, 16) of the given PoseStack.
      Parameters:
      graphics -
    • setChanged

      public void setChanged(@Nullable net.minecraft.core.component.DataComponentPatch patch)
      Description copied from class: AbstractTeam
      Called if any Data Components actually change. Use this to sync changes to the clients of members of this Team.
      Specified by:
      setChanged in class AbstractTeam
      Parameters:
      patch -