Advertisement
SamWilko

Untitled

Jul 8th, 2022
1,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. package me.wilko.nms.command;
  2.  
  3. import net.minecraft.network.protocol.game.PacketPlayOutEntityEffect;
  4. import net.minecraft.world.effect.MobEffect;
  5. import net.minecraft.world.effect.MobEffectList;
  6. import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer;
  7. import org.mineacademy.fo.annotation.AutoRegister;
  8. import org.mineacademy.fo.command.SimpleCommand;
  9.  
  10. @AutoRegister
  11. public final class GlowCommand extends SimpleCommand {
  12.  
  13.     public GlowCommand() {
  14.         super("glow");
  15.     }
  16.  
  17.     @Override
  18.     protected void onCommand() {
  19.         PacketPlayOutEntityEffect packet = new PacketPlayOutEntityEffect(getPlayer().getEntityId(), new MobEffect(MobEffectList.a(24)));
  20.  
  21.         ((CraftPlayer) getPlayer()).getHandle().b.a(packet);
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement