Make UtilEnt#GetMetadata actually return the field assigned to that metadata key and add a method to remove metadata from an entity

This commit is contained in:
AlexTheCoder 2017-04-15 16:52:48 -04:00
parent 76d5d3e896
commit c6bd00a811

View File

@ -1032,7 +1032,12 @@ public class UtilEnt
return null;
}
return entity.getMetadata(key).get(0);
return entity.getMetadata(key).get(0).value();
}
public static void removeMetadata(Entity entity, String key)
{
entity.removeMetadata(key, UtilServer.getPlugin());
}
public static void SetItemInHand(LivingEntity entity, ItemStack item)