BlockState for breaking blocks by Water

This commit is contained in:
Jascha Starke 2013-09-22 13:02:53 +02:00
parent c2ac988439
commit d53929a1b9
3 changed files with 8 additions and 8 deletions

View file

@ -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<LimitedCreative> {
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));

View file

@ -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<LimitedCreative> {
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()) {

View file

@ -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) {