Package net.minecraft.server.commands
Class BossBarCommands
java.lang.Object
net.minecraft.server.commands.BossBarCommands
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcreateBar(CommandSourceStack source, ResourceLocation id, Component displayName) static CustomBossEventgetBossBar(com.mojang.brigadier.context.CommandContext<CommandSourceStack> source) private static intgetMax(CommandSourceStack source, CustomBossEvent bossbar) private static intgetPlayers(CommandSourceStack source, CustomBossEvent bossbar) private static intgetValue(CommandSourceStack source, CustomBossEvent bossbar) private static intgetVisible(CommandSourceStack source, CustomBossEvent bossbar) private static intlistBars(CommandSourceStack source) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) private static intremoveBar(CommandSourceStack source, CustomBossEvent bossbar) private static intsetColor(CommandSourceStack source, CustomBossEvent bossbar, BossEvent.BossBarColor color) private static intsetMax(CommandSourceStack source, CustomBossEvent bossbar, int max) private static intsetName(CommandSourceStack source, CustomBossEvent bossbar, Component name) private static intsetPlayers(CommandSourceStack source, CustomBossEvent bossbar, Collection<ServerPlayer> players) private static intsetStyle(CommandSourceStack source, CustomBossEvent bossbar, BossEvent.BossBarOverlay style) private static intsetValue(CommandSourceStack source, CustomBossEvent bossbar, int value) private static intsetVisible(CommandSourceStack source, CustomBossEvent bossbar, boolean visible)
-
Field Details
-
ERROR_ALREADY_EXISTS
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_ALREADY_EXISTS -
ERROR_DOESNT_EXIST
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_DOESNT_EXIST -
ERROR_NO_PLAYER_CHANGE
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NO_PLAYER_CHANGE -
ERROR_NO_NAME_CHANGE
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NO_NAME_CHANGE -
ERROR_NO_COLOR_CHANGE
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NO_COLOR_CHANGE -
ERROR_NO_STYLE_CHANGE
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NO_STYLE_CHANGE -
ERROR_NO_VALUE_CHANGE
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NO_VALUE_CHANGE -
ERROR_NO_MAX_CHANGE
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NO_MAX_CHANGE -
ERROR_ALREADY_HIDDEN
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_ALREADY_HIDDEN -
ERROR_ALREADY_VISIBLE
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_ALREADY_VISIBLE -
SUGGEST_BOSS_BAR
public static final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack> SUGGEST_BOSS_BAR
-
-
Constructor Details
-
BossBarCommands
public BossBarCommands()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
getValue
-
getMax
-
getVisible
-
getPlayers
-
setVisible
private static int setVisible(CommandSourceStack source, CustomBossEvent bossbar, boolean visible) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setValue
private static int setValue(CommandSourceStack source, CustomBossEvent bossbar, int value) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setMax
private static int setMax(CommandSourceStack source, CustomBossEvent bossbar, int max) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setColor
private static int setColor(CommandSourceStack source, CustomBossEvent bossbar, BossEvent.BossBarColor color) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setStyle
private static int setStyle(CommandSourceStack source, CustomBossEvent bossbar, BossEvent.BossBarOverlay style) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setName
private static int setName(CommandSourceStack source, CustomBossEvent bossbar, Component name) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setPlayers
private static int setPlayers(CommandSourceStack source, CustomBossEvent bossbar, Collection<ServerPlayer> players) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listBars
-
createBar
private static int createBar(CommandSourceStack source, ResourceLocation id, Component displayName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
removeBar
-
getBossBar
public static CustomBossEvent getBossBar(com.mojang.brigadier.context.CommandContext<CommandSourceStack> source) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-