Paper/Bukkit-Patches/0022-Silenceable-Lightning-API.patch
Zach Brown cab333b217 Rebase (Update) from upstream SpigotMC
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e
Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c
Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66
Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b
Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
2014-11-28 14:19:07 -06:00

71 lines
2.3 KiB
Diff

From 08bae09498e4734f7e5e18a2f0c6099f221cfd87 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 6cf3ff0..ab73174 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1200,6 +1200,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();
}
--
1.9.1