This commit is contained in:
Telesphoreo 2022-06-05 22:27:25 -05:00
commit 65b8188b37
2 changed files with 11 additions and 2 deletions

View File

@ -13,7 +13,6 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.block.BlockRedstoneEvent;
public class BlockListener extends PlexListener public class BlockListener extends PlexListener
{ {

View File

@ -4,13 +4,23 @@ import dev.plex.listener.PlexListener;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockFromToEvent; import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockRedstoneEvent; import org.bukkit.event.block.BlockRedstoneEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.ExplosionPrimeEvent; import org.bukkit.event.entity.ExplosionPrimeEvent;
import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerDropItemEvent;
public class TogglesListener extends PlexListener public class TogglesListener extends PlexListener
{ {
@EventHandler @EventHandler
public void onEntityExplode(ExplosionPrimeEvent event) public void onBlockExplode(ExplosionPrimeEvent event)
{
if (!plugin.toggles.getBoolean("explosions"))
{
event.setCancelled(true);
}
}
@EventHandler
public void onEntityExplode(EntityExplodeEvent event)
{ {
if (!plugin.toggles.getBoolean("explosions")) if (!plugin.toggles.getBoolean("explosions"))
{ {