Skip to content

Instantly share code, notes, and snippets.

View NahuLD's full-sized avatar
:shipit:

Nahuel Dolores NahuLD

:shipit:
View GitHub Profile
@aadnk
aadnk / EntityHider.java
Last active April 25, 2024 22:47
Hide or show entities
package com.comphenix.example;
import static com.comphenix.protocol.PacketType.Play.Server.*;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.Map;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@aadnk
aadnk / CancellationDetector.java
Last active March 30, 2024 15:23
A class that allows you to detect which plugin cancelled a given event.
package com.comphenix.example;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.Iterator;
import java.util.List;
import org.bukkit.event.Cancellable;
@aadnk
aadnk / GlowWithEnchanting.java
Created January 20, 2013 18:06
Apply an enchanting glow without actually adding any enchantments.
package com.comphenix.example;
import java.lang.reflect.Field;
import net.minecraft.server.v1_4_R1.ItemStack;
import net.minecraft.server.v1_4_R1.NBTTagCompound;
import net.minecraft.server.v1_4_R1.NBTTagList;
import org.bukkit.Material;
import org.bukkit.command.Command;