package ru.beykerykt.lightsource.sources;

import org.bukkit.inventory.ItemStack;

import ru.beykerykt.lightsource.LightSourceAPI;
import ru.beykerykt.lightsource.items.Item;

public class EntityItemSource extends OwnedSource {

	public EntityItemSource(org.bukkit.entity.Item entity, Item item) {
		super(entity, item);
	}

	@Override
	public org.bukkit.entity.Item getOwner() {
		return (org.bukkit.entity.Item) super.getOwner();
	}

	public ItemStack getItemStack() {
		return getOwner().getItemStack();
	}

	@Override
	public boolean shouldExecute() {
		return super.shouldExecute() && LightSourceAPI.getItemManager().isItem(getItemStack());
	}
}

@@ -36,16 +36,44 @@
 urces;%0A%0A
+import org.bukkit.Location;%0A
 import o
@@ -528,24 +528,121 @@
 tack();%0A%09%7D%0A%0A
+%09@Override%0A%09public void setLocation(Location loc) %7B%0A%09%09super.setLocation(loc.add(0, 0.3, 0));%0A%09%7D%0A%0A
 %09@Override%0A%09

correct location