this was a failure i forgot to remove

This commit is contained in:
ZeroEpoch1969 2018-12-29 12:44:57 -07:00
parent 72db71b3cf
commit 2408054a49
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3

View File

@ -3,15 +3,8 @@ package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.MaterialGroup;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.block.Dispenser;
import org.bukkit.block.ShulkerBox;
import org.bukkit.event.block.BlockDispenseEvent;
import org.bukkit.event.block.BlockFormEvent;
import org.bukkit.event.block.EntityBlockFormEvent;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Tameable;
import org.bukkit.event.EventHandler;
@ -218,49 +211,4 @@ public class EventBlocker extends FreedomService
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onBlockDispense(BlockDispenseEvent event)
{
if (event.getBlock() instanceof ShulkerBox)
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onEntityBlockForm(EntityBlockFormEvent event)
{
FLog.info("block form by entity fired");
if (event.getBlock() instanceof Dispenser)
{
Dispenser dispenser = (Dispenser)event.getBlock();
ItemStack[] items = dispenser.getInventory().getContents();
for (ItemStack item : items)
{
if (item != null && MaterialGroup.SHULKER_BOXES.contains(item.getType()))
{
dispenser.getInventory().clear();
}
}
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onBlockForm(BlockFormEvent event)
{
FLog.info("block form fired");
if (event.getBlock() instanceof Dispenser)
{
Dispenser dispenser = (Dispenser)event.getBlock();
ItemStack[] items = dispenser.getInventory().getContents();
for (ItemStack item : items)
{
if (item != null && MaterialGroup.SHULKER_BOXES.contains(item.getType()))
{
dispenser.getInventory().clear();
}
}
}
}
}