/FileExtraction/Java_unseen/Wind-Development_WindSpigot/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
package org.bukkit.craftbukkit.entity;

import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LightningStrike;

import net.minecraft.server.EntityLightning;

public class CraftLightningStrike extends CraftEntity implements LightningStrike {
	public CraftLightningStrike(final CraftServer server, final EntityLightning entity) {
		super(server, entity);
	}

	@Override
	public boolean isEffect() {
		return ((EntityLightning) super.getHandle()).isEffect;
	}

	@Override
	public EntityLightning getHandle() {
		return (EntityLightning) entity;
	}

	@Override
	public String toString() {
		return "CraftLightningStrike";
	}

	@Override
	public EntityType getType() {
		return EntityType.LIGHTNING;
	}

	// Spigot start
	private final LightningStrike.Spigot spigot = new LightningStrike.Spigot() {

		@Override
		public boolean isSilent() {
			return getHandle().isSilent;
		}
	};

	@Override
	public LightningStrike.Spigot spigot() {
		return spigot;
	}
	// Spigot end
}
