mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #3013
This commit is contained in:
parent
399359ae25
commit
7b615a66f2
@ -53,6 +53,7 @@
|
||||
* Fixed #2937
|
||||
* Fixed #3007
|
||||
* Fixed #3012
|
||||
* Fixed #3013
|
||||
|
||||
## Release Candidate 22 (18 Apr 2021)
|
||||
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#22
|
||||
|
@ -2,12 +2,14 @@ package io.github.thebusybiscuit.slimefun4.implementation.listeners;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
|
||||
import io.github.thebusybiscuit.slimefun4.api.events.ExplosiveToolBreakBlocksEvent;
|
||||
import io.github.thebusybiscuit.slimefun4.api.network.Network;
|
||||
import io.github.thebusybiscuit.slimefun4.core.networks.NetworkManager;
|
||||
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
|
||||
@ -39,4 +41,12 @@ public class NetworkListener implements Listener {
|
||||
public void onBlockPlace(BlockPlaceEvent e) {
|
||||
manager.updateAllNetworks(e.getBlock().getLocation());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onExplosiveToolUse(ExplosiveToolBreakBlocksEvent e) {
|
||||
// Fixes #3013 - Also update networks when using an explosive tool
|
||||
for (Block b : e.getAdditionalBlocks()) {
|
||||
manager.updateAllNetworks(b.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user