From d53929a1b9fa532a2bd905c298481a1f2644f7ae Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Sun, 22 Sep 2013 13:02:53 +0200 Subject: [PATCH] BlockState for breaking blocks by Water --- .../minecraft/limitedcreative/ModBlockStates.java | 6 +++--- .../minecraft/limitedcreative/ModCreativeLimits.java | 6 +++--- .../minecraft/limitedcreative/blockstate/BlockListener.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModBlockStates.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModBlockStates.java index 80a49dd..b901bf0 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModBlockStates.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModBlockStates.java @@ -2,7 +2,7 @@ package de.jaschastarke.minecraft.limitedcreative; import de.jaschastarke.bukkit.lib.CoreModule; import de.jaschastarke.bukkit.lib.commands.AliasHelpedCommand; -import de.jaschastarke.bukkit.lib.modules.AttachedBlocksDestroy; +import de.jaschastarke.bukkit.lib.modules.AdditionalBlockBreaks; import de.jaschastarke.minecraft.limitedcreative.blockstate.BlockListener; import de.jaschastarke.minecraft.limitedcreative.blockstate.BlockStateCommand; import de.jaschastarke.minecraft.limitedcreative.blockstate.BlockStateConfig; @@ -42,8 +42,8 @@ public class ModBlockStates extends CoreModule { config = new BlockStateConfig(this, entry); plugin.getPluginConfig().registerSection(config); - if (plugin.getModule(AttachedBlocksDestroy.class) == null) { - plugin.addModule(new AttachedBlocksDestroy(plugin)); + if (plugin.getModule(AdditionalBlockBreaks.class) == null) { + plugin.addModule(new AdditionalBlockBreaks(plugin)); } listeners.addListener(new BlockListener(this)); diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModCreativeLimits.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModCreativeLimits.java index 8cad51a..d0918cf 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModCreativeLimits.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/ModCreativeLimits.java @@ -5,7 +5,7 @@ import java.util.WeakHashMap; import org.bukkit.entity.Entity; import de.jaschastarke.bukkit.lib.CoreModule; -import de.jaschastarke.bukkit.lib.modules.AttachedBlocksDestroy; +import de.jaschastarke.bukkit.lib.modules.AdditionalBlockBreaks; import de.jaschastarke.minecraft.limitedcreative.limits.BlockListener; import de.jaschastarke.minecraft.limitedcreative.limits.EntityListener; import de.jaschastarke.minecraft.limitedcreative.limits.LimitConfig; @@ -41,8 +41,8 @@ public class ModCreativeLimits extends CoreModule { if (blockDrops == null) blockDrops = plugin.addModule(new FeatureBlockItemSpawn(plugin)).getModule(); - if (plugin.getModule(AttachedBlocksDestroy.class) == null) { - plugin.addModule(new AttachedBlocksDestroy(plugin)); + if (plugin.getModule(AdditionalBlockBreaks.class) == null) { + plugin.addModule(new AdditionalBlockBreaks(plugin)); } if (!config.getEnabled()) { diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockListener.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockListener.java index 94aceed..3470b27 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockListener.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockListener.java @@ -19,7 +19,7 @@ import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.metadata.FixedMetadataValue; -import de.jaschastarke.bukkit.lib.events.AttachedBlockDestroyedEvent; +import de.jaschastarke.bukkit.lib.events.BlockDestroyedEvent; import de.jaschastarke.minecraft.limitedcreative.ModBlockStates; public class BlockListener implements Listener { @@ -52,7 +52,7 @@ public class BlockListener implements Listener { } @EventHandler - public void onAttachedBlockBreak(AttachedBlockDestroyedEvent event) { + public void onOtherBlockDestroy(BlockDestroyedEvent event) { try { BlockState s = mod.getModel().getState(event.getBlock()); if (s != null) {