Skip to content

Commit

Permalink
Silenceable Lightning API
Browse files Browse the repository at this point in the history
  • Loading branch information
mcy authored and SpigotMC committed Sep 4, 2014
1 parent 3eb6c5f commit b3b4107
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/main/java/org/bukkit/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,30 @@ public void playEffect(Location location, Effect effect, int id, int data, float
{
throw new UnsupportedOperationException( "Not supported yet." );
}

/**
* Strikes lightning at the given {@link Location} and possibly without sound
*
* @param loc The location to strike lightning
* @param isSilent Whether this strike makes no sound
* @return The lightning entity.
*/
public LightningStrike strikeLightning(Location loc, boolean isSilent)
{
throw new UnsupportedOperationException( "Not supported yet." );
}

/**
* Strikes lightning at the given {@link Location} without doing damage and possibly without sound
*
* @param loc The location to strike lightning
* @param isSilent Whether this strike makes no sound
* @return The lightning entity.
*/
public LightningStrike strikeLightningEffect(Location loc, boolean isSilent)
{
throw new UnsupportedOperationException( "Not supported yet." );
}
}

Spigot spigot();
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/org/bukkit/entity/LightningStrike.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,21 @@ public interface LightningStrike extends Weather {
*/
public boolean isEffect();


public class Spigot extends Entity.Spigot
{

/*
* Returns whether the strike is silent.
*
* @return whether the strike is silent.
*/
public boolean isSilent()
{
throw new UnsupportedOperationException( "Not supported yet." );
}

}

Spigot spigot();
}

0 comments on commit b3b4107

Please sign in to comment.