Class NoTeam

java.lang.Object
com.petrolpark.team.NoTeam
All Implemented Interfaces:
ITeam<NoTeam>

public final class NoTeam extends Object implements ITeam<NoTeam>
  • Field Details

    • INSTANCE

      public static final NoTeam INSTANCE
  • Constructor Details

    • NoTeam

      public NoTeam()
  • Method Details

    • getType

      public ITeam.ITeamType<NoTeam> getType()
      Specified by:
      getType in interface ITeam<NoTeam>
    • isNone

      public boolean isNone()
      Specified by:
      isNone in interface ITeam<NoTeam>
    • isMember

      public boolean isMember(net.minecraft.world.entity.player.Player player)
      Specified by:
      isMember in interface ITeam<NoTeam>
    • streamMemberUsernames

      public Stream<String> streamMemberUsernames(net.minecraft.world.level.Level level)
      Specified by:
      streamMemberUsernames in interface ITeam<NoTeam>
    • isAdmin

      public boolean isAdmin(net.minecraft.world.entity.player.Player player)
      Description copied from interface: ITeam
      If called, it is assumed that ITeam.isMember(Player) has already passed.
      Specified by:
      isAdmin in interface ITeam<NoTeam>
      Returns:
      Whether this Player can manage this Team
    • getName

      public net.minecraft.network.chat.Component getName(net.minecraft.world.level.Level level)
      Specified by:
      getName in interface ITeam<NoTeam>
    • getTeamData

      public <DATA> DATA getTeamData(ITeamDataType<? super DATA> dataType)
      Description copied from interface: ITeam
      Returns the Team Data associated with the given ITeamDataType. Implementations must not return null for missing Data, but a blank instance.
      Specified by:
      getTeamData in interface ITeam<NoTeam>
      Type Parameters:
      DATA - Class of the Team Data
      Returns:
      Non-null instance of the Team Data
    • setChanged

      public void setChanged(net.minecraft.world.level.Level level, ITeamDataType<?> dataType)
      Specified by:
      setChanged in interface ITeam<NoTeam>
    • 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.
      Specified by:
      renderIcon in interface ITeam<NoTeam>
    • getRenderedMemberList

      public net.minecraft.network.chat.Component getRenderedMemberList(int maxTextWidth)
      Specified by:
      getRenderedMemberList in interface ITeam<NoTeam>