Class TeamCommand
java.lang.Object
net.minecraft.server.commands.TeamCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcreateTeam(CommandSourceStack source, String name) private static intcreateTeam(CommandSourceStack source, String name, Component displayName) private static intdeleteTeam(CommandSourceStack source, PlayerTeam team) private static intemptyTeam(CommandSourceStack source, PlayerTeam team) private static ComponentgetFirstMemberName(Collection<ScoreHolder> members) private static intjoinTeam(CommandSourceStack source, PlayerTeam team, Collection<ScoreHolder> members) private static intleaveTeam(CommandSourceStack source, Collection<ScoreHolder> members) private static intlistMembers(CommandSourceStack source, PlayerTeam team) private static intlistTeams(CommandSourceStack source) static voidregister(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) private static intsetCollision(CommandSourceStack source, PlayerTeam team, Team.CollisionRule collision) private static intsetColor(CommandSourceStack source, PlayerTeam team, ChatFormatting color) private static intsetDeathMessageVisibility(CommandSourceStack source, PlayerTeam team, Team.Visibility visibility) private static intsetDisplayName(CommandSourceStack source, PlayerTeam team, Component displayName) private static intsetFriendlyFire(CommandSourceStack source, PlayerTeam team, boolean allowed) private static intsetFriendlySight(CommandSourceStack source, PlayerTeam team, boolean allowed) private static intsetNametagVisibility(CommandSourceStack source, PlayerTeam team, Team.Visibility visibility) private static intsetPrefix(CommandSourceStack source, PlayerTeam team, Component prefix) private static intsetSuffix(CommandSourceStack source, PlayerTeam team, Component suffix)
-
Field Details
-
ERROR_TEAM_ALREADY_EXISTS
-
ERROR_TEAM_ALREADY_EMPTY
-
ERROR_TEAM_ALREADY_NAME
-
ERROR_TEAM_ALREADY_COLOR
-
ERROR_TEAM_ALREADY_FRIENDLYFIRE_ENABLED
-
ERROR_TEAM_ALREADY_FRIENDLYFIRE_DISABLED
-
ERROR_TEAM_ALREADY_FRIENDLYINVISIBLES_ENABLED
-
ERROR_TEAM_ALREADY_FRIENDLYINVISIBLES_DISABLED
-
ERROR_TEAM_NAMETAG_VISIBLITY_UNCHANGED
-
ERROR_TEAM_DEATH_MESSAGE_VISIBLITY_UNCHANGED
-
ERROR_TEAM_COLLISION_UNCHANGED
-
-
Constructor Details
-
TeamCommand
public TeamCommand()
-
-
Method Details
-
register
public static void register(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
getFirstMemberName
-
leaveTeam
-
joinTeam
private static int joinTeam(CommandSourceStack source, PlayerTeam team, Collection<ScoreHolder> members) -
setNametagVisibility
private static int setNametagVisibility(CommandSourceStack source, PlayerTeam team, Team.Visibility visibility) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setDeathMessageVisibility
private static int setDeathMessageVisibility(CommandSourceStack source, PlayerTeam team, Team.Visibility visibility) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setCollision
private static int setCollision(CommandSourceStack source, PlayerTeam team, Team.CollisionRule collision) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setFriendlySight
private static int setFriendlySight(CommandSourceStack source, PlayerTeam team, boolean allowed) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setFriendlyFire
private static int setFriendlyFire(CommandSourceStack source, PlayerTeam team, boolean allowed) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setDisplayName
private static int setDisplayName(CommandSourceStack source, PlayerTeam team, Component displayName) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setColor
private static int setColor(CommandSourceStack source, PlayerTeam team, ChatFormatting color) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
emptyTeam
private static int emptyTeam(CommandSourceStack source, PlayerTeam team) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
deleteTeam
-
createTeam
- Throws:
CommandSyntaxException
-
createTeam
private static int createTeam(CommandSourceStack source, String name, Component displayName) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
listMembers
-
listTeams
-
setPrefix
-
setSuffix
-