Class EffectCommands
java.lang.Object
net.minecraft.server.commands.EffectCommands
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final CommandResponseTracker.Messages<Entity> private static final CommandResponseTracker.MessagesWithArg<Entity, MobEffect> private static final CommandResponseTracker.MessagesWithArgs<LivingEntity, MobEffect, Integer> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intclearEffect(CommandSourceStack source, Collection<? extends Entity> entities, Holder<MobEffect> effectHolder) private static intclearEffects(CommandSourceStack source, Collection<? extends Entity> entities) private static intcomputeDurationInTicks(@Nullable Integer seconds, MobEffect effect) private static intgiveEffect(CommandSourceStack source, Collection<? extends Entity> entities, Holder<MobEffect> effectHolder, @Nullable Integer seconds, int amplifier, boolean particles) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context)
-
Field Details
-
ERROR_GIVE_FAILED
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_GIVE_FAILED -
ERROR_CLEAR_EVERYTHING_FAILED
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_CLEAR_EVERYTHING_FAILED -
ERROR_CLEAR_SPECIFIC_FAILED
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_CLEAR_SPECIFIC_FAILED -
RESPONSE_GIVE
private static final CommandResponseTracker.MessagesWithArgs<LivingEntity, MobEffect, Integer> RESPONSE_GIVE -
RESPONSE_CLEAR_ALL
-
RESPONSE_CLEAR_SINGLE
private static final CommandResponseTracker.MessagesWithArg<Entity, MobEffect> RESPONSE_CLEAR_SINGLE
-
-
Constructor Details
-
EffectCommands
public EffectCommands()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
giveEffect
private static int giveEffect(CommandSourceStack source, Collection<? extends Entity> entities, Holder<MobEffect> effectHolder, @Nullable Integer seconds, int amplifier, boolean particles) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
computeDurationInTicks
-
clearEffects
private static int clearEffects(CommandSourceStack source, Collection<? extends Entity> entities) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
clearEffect
private static int clearEffect(CommandSourceStack source, Collection<? extends Entity> entities, Holder<MobEffect> effectHolder) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-