Solved BlockPlaceEvent not updating items in hotbar

Discussion in 'Plugin Development' started by Yeowza, Feb 5, 2020.

  1. Offline

    Yeowza

    Hey guys, I made a youtube video of this weird bug I'm having.



    Here is my code,

    Code:
        public static void bpe(BlockPlaceEvent e)
        {
            if (!e.getPlayer().isOp())
            {
                e.setCancelled(true);
                e.getPlayer().updateInventory();
            }
        }
    I'm using BKCommonLib, Lightcleaner, and WorldEdit but it still happens without them. I'm thinking maybe worldedit or lightcleaner messed up my chunk data?
     
  2. Online

    timtower Moderator Moderator

    @Yeowza What is the spawn protection range?
    Tried updating the inventory a tick later?
     
  3. Offline

    Yeowza

    @timtower it was 16 :p set it to 0 and working fine now. I appreciate it man :cool:
     

Share This Page