Fixes an issue where items could be placed in item frames and then would
not be able to be retrieved.
This commit is contained in:
Sam 2016-06-01 23:40:03 +01:00
parent 6a423b571a
commit eaada4acaf

View File

@ -7,9 +7,11 @@ import java.util.List;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.F; import mineplex.core.common.util.F;
@ -210,6 +212,15 @@ public class DeathTag extends SoloGame
Manager.GetCondition().Factory().Speed("Haste", player, player, 1.9, 0, false, false, true); Manager.GetCondition().Factory().Speed("Haste", player, player, 1.9, 0, false, false, true);
} }
} }
@EventHandler
public void onPlayerInteractEntity(PlayerInteractEntityEvent event)
{
if(event.getRightClicked() instanceof ItemFrame)
{
event.setCancelled(true);
}
}
@EventHandler @EventHandler
public void UpdateChasers(UpdateEvent event) public void UpdateChasers(UpdateEvent event)