Class EffectCommands

java.lang.Object
net.minecraft.server.commands.EffectCommands

public class EffectCommands extends Object
  • Field Details

  • 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

      private static int computeDurationInTicks(@Nullable Integer seconds, MobEffect effect)
    • 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