mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2024-11-21 20:56:14 +00:00
49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
From 83469e140686a27b098082cd6d8379b676074e5b Mon Sep 17 00:00:00 2001
|
|
From: drXor <mcyoungsota@gmail.com>
|
|
Date: Sun, 23 Feb 2014 16:16:59 -0400
|
|
Subject: [PATCH] Implement Silenceable Lightning API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
index 5fc6924dfa..4e44deea08 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -2096,6 +2096,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
// Spigot start
|
|
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
|
|
{
|
|
+
|
|
+ @Override
|
|
+ public LightningStrike strikeLightning(Location loc, boolean isSilent)
|
|
+ {
|
|
+ return CraftWorld.this.strikeLightning(loc);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public LightningStrike strikeLightningEffect(Location loc, boolean isSilent)
|
|
+ {
|
|
+ return CraftWorld.this.strikeLightningEffect(loc);
|
|
+ }
|
|
};
|
|
|
|
public org.bukkit.World.Spigot spigot()
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
|
|
index 3a68e1cf5c..6c44dfa1cb 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
|
|
@@ -54,6 +54,11 @@ public class CraftLightningStrike extends CraftEntity implements LightningStrike
|
|
// Spigot start
|
|
private final LightningStrike.Spigot spigot = new LightningStrike.Spigot() {
|
|
|
|
+ @Override
|
|
+ public boolean isSilent()
|
|
+ {
|
|
+ return false;
|
|
+ }
|
|
};
|
|
|
|
@Override
|
|
--
|
|
2.47.0
|
|
|