0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/spigot.git synced 2024-11-21 19:46:14 +00:00
spigot/Bukkit-Patches/0007-Silenceable-Lightning-API.patch
2024-10-23 02:15:00 +11:00

71 lines
2.6 KiB
Diff

From 463bd99feef79e68ec7e9f832c0eeca208b54122 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 53cb50e63..c0479a8da 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2831,6 +2831,35 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
// Spigot start
public class Spigot {
+ /**
+ * 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.
+ * @deprecated sound is now client side and cannot be removed
+ * @see World#strikeLightning(org.bukkit.Location)
+ */
+ @NotNull
+ @Deprecated
+ public LightningStrike strikeLightning(@NotNull 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.
+ * @deprecated sound is now client side and cannot be removed
+ * @see World#strikeLightningEffect(org.bukkit.Location)
+ */
+ @NotNull
+ @Deprecated
+ public LightningStrike strikeLightningEffect(@NotNull Location loc, boolean isSilent) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}
@NotNull
diff --git a/src/main/java/org/bukkit/entity/LightningStrike.java b/src/main/java/org/bukkit/entity/LightningStrike.java
index d913298ea..b27447d7a 100644
--- a/src/main/java/org/bukkit/entity/LightningStrike.java
+++ b/src/main/java/org/bukkit/entity/LightningStrike.java
@@ -86,6 +86,16 @@ public interface LightningStrike extends Entity {
// Spigot start
public class Spigot extends Entity.Spigot {
+ /**
+ * Returns whether the strike is silent.
+ *
+ * @return whether the strike is silent.
+ * @deprecated sound is now client side and cannot be removed
+ */
+ @Deprecated
+ public boolean isSilent() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}
@NotNull
--
2.47.0