mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-26 02:57:42 +01:00
Don't check metadata on Blocks in Cause.
We don't track causes on Blocks. There's no need for the performance hit.
This commit is contained in:
parent
41fb8a0722
commit
3ca147e405
@ -21,6 +21,7 @@
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.sk89q.worldguard.bukkit.util.WGMetadata;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
@ -123,7 +124,7 @@ private static void expand(List<Object> list, @Nullable Object ... element) {
|
||||
// Add manually tracked parent causes
|
||||
Object source = o;
|
||||
int index = list.size();
|
||||
while (source instanceof Metadatable) {
|
||||
while (source instanceof Metadatable && !(source instanceof Block)) {
|
||||
source = WGMetadata.getIfPresent((Metadatable) source, CAUSE_KEY, Object.class);
|
||||
if (source != null) {
|
||||
list.add(index, source);
|
||||
|
Loading…
Reference in New Issue
Block a user