Class BossBarCommands
java.lang.Object
net.minecraft.server.commands.BossBarCommands
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DynamicCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final DynamicCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypestatic final SuggestionProvider<CommandSourceStack> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcreateBar(CommandSourceStack source, Identifier id, Component name) static CustomBossEventgetBossBar(CommandContext<CommandSourceStack> context) 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(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 value) private static intsetName(CommandSourceStack source, CustomBossEvent bossBar, Component name) private static intsetPlayers(CommandSourceStack source, CustomBossEvent bossBar, Collection<ServerPlayer> targets) 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
-
ERROR_DOESNT_EXIST
-
ERROR_NO_PLAYER_CHANGE
-
ERROR_NO_NAME_CHANGE
-
ERROR_NO_COLOR_CHANGE
-
ERROR_NO_STYLE_CHANGE
-
ERROR_NO_VALUE_CHANGE
-
ERROR_NO_MAX_CHANGE
-
ERROR_ALREADY_HIDDEN
-
ERROR_ALREADY_VISIBLE
-
SUGGEST_BOSS_BAR
-
-
Constructor Details
-
BossBarCommands
public BossBarCommands()
-
-
Method Details
-
register
public static void register(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
getValue
-
getMax
-
getVisible
-
getPlayers
-
setVisible
private static int setVisible(CommandSourceStack source, CustomBossEvent bossBar, boolean visible) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setValue
private static int setValue(CommandSourceStack source, CustomBossEvent bossBar, int value) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setMax
private static int setMax(CommandSourceStack source, CustomBossEvent bossBar, int value) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setColor
private static int setColor(CommandSourceStack source, CustomBossEvent bossBar, BossEvent.BossBarColor color) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setStyle
private static int setStyle(CommandSourceStack source, CustomBossEvent bossBar, BossEvent.BossBarOverlay style) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setName
private static int setName(CommandSourceStack source, CustomBossEvent bossBar, Component name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
setPlayers
private static int setPlayers(CommandSourceStack source, CustomBossEvent bossBar, Collection<ServerPlayer> targets) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
listBars
-
createBar
private static int createBar(CommandSourceStack source, Identifier id, Component name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
removeBar
-
getBossBar
public static CustomBossEvent getBossBar(CommandContext<CommandSourceStack> context) throws CommandSyntaxException - Throws:
CommandSyntaxException
-