Created
February 5, 2016 00:03
-
-
Save vemacs/d0fcd5d6feba0de7c7f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.arkhamnnetwork.libs.item; | |
import net.minecraft.server.v1_8_R3.NBTTagCompound; | |
import net.minecraft.server.v1_8_R3.NBTTagList; | |
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack; | |
import org.bukkit.inventory.ItemStack; | |
public class Glow { | |
public static ItemStack addGlow(ItemStack item){ | |
net.minecraft.server.v1_8_R3.ItemStack nmsStack = CraftItemStack.asNMSCopy(item); | |
NBTTagCompound tag = null; | |
if (!nmsStack.hasTag()) { | |
tag = new NBTTagCompound(); | |
nmsStack.setTag(tag); | |
} | |
if (tag == null) tag = nmsStack.getTag(); | |
NBTTagList ench = new NBTTagList(); | |
tag.set("ench", ench); | |
nmsStack.setTag(tag); | |
return CraftItemStack.asCraftMirror(nmsStack); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment