[1.8] Item Frame maps disappearing

Discussion in 'Plugin Development' started by SrPattif, Jul 5, 2021.

Thread Status:
Not open for further replies.
  1. Offline

    SrPattif

    Hi.
    I'm using Frame Picture to draw a image in Item Frames, but when I Right Click the frame, it disappears. But if I go far away and come back, the frames are back.

    I'm using this events to try to cancel:
    Code:
    @EventHandler(priority = EventPriority.HIGH)
        public void onHangingBreak(HangingBreakEvent e) {
            if (e.getEntity() instanceof ItemFrame) {
                e.setCancelled(true);
            }
        }
    
        @EventHandler
        public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
            if (!event.isCancelled() && event.getRightClicked() instanceof ItemFrame && !((ItemFrame) event.getRightClicked()).getItem().getType().equals(Material.AIR)) {
                event.setCancelled(true);
            }
        }
    Normal itens aren't removed from ItemFrame, but the FramePicture maps (I think it is made with maps) disappears when I Right Click.
     
    Last edited by a moderator: Jul 5, 2021
Thread Status:
Not open for further replies.

Share This Page