Make sure that the Shulkerbox-Filter is only active with MC 1.11 or higher

This commit is contained in:
GeorgH93 2017-03-06 00:38:35 +01:00
parent 462ab1b680
commit 231b398b66
2 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,7 @@
package at.pcgamingfreaks.Minepacks.Bukkit.Listener;
import at.pcgamingfreaks.Bukkit.MCVersion;
import at.pcgamingfreaks.Bukkit.Message.Message;
import at.pcgamingfreaks.Bukkit.MinecraftMaterial;
import at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack;
@ -43,7 +44,7 @@ public ItemFilter(final Minepacks plugin)
{
super(plugin);
if(plugin.getConfiguration().isShulkerboxesPreventInBackpackEnabled())
if(MCVersion.isNewerOrEqualThan(MCVersion.MC_1_11) && plugin.getConfiguration().isShulkerboxesPreventInBackpackEnabled())
{
for(Material mat : DisableShulkerboxes.SHULKER_BOX_MATERIALS)
{

View File

@ -109,7 +109,7 @@ public void onEnable()
pluginManager.registerEvents(new EventListener(this), this);
if(config.getDropOnDeath()) pluginManager.registerEvents(new DropOnDeath(this), this);
if(config.isItemFilterEnabled()) pluginManager.registerEvents(new ItemFilter(this), this);
if(config.isShulkerboxesDisable()) pluginManager.registerEvents(new DisableShulkerboxes(this), this);
if(MCVersion.isNewerOrEqualThan(MCVersion.MC_1_11) && config.isShulkerboxesDisable()) pluginManager.registerEvents(new DisableShulkerboxes(this), this);
//endregion
if(config.getFullInvCollect())
{