Paper/Bukkit-Patches/0020-Silenceable-Lightning-API.patch
2016-03-18 23:00:50 -05:00

71 lines
2.3 KiB
Diff

From 839fc96a5f387bb4d5e17f916df25b60e42f20a5 Mon Sep 17 00:00:00 2001
From: drXor <mcyoungsota@gmail.com>
Date: Sun, 23 Feb 2014 16:16:29 -0400
Subject: [PATCH] Silenceable Lightning API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index f59bdd3..d088c3c 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1234,6 +1234,30 @@ public interface World extends PluginMessageRecipient, Metadatable {
{
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();
diff --git a/src/main/java/org/bukkit/entity/LightningStrike.java b/src/main/java/org/bukkit/entity/LightningStrike.java
index c8b5154..1ed4ac9 100644
--- a/src/main/java/org/bukkit/entity/LightningStrike.java
+++ b/src/main/java/org/bukkit/entity/LightningStrike.java
@@ -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();
}
--
2.5.0