Explosions explode item frames.

Discussion in 'Plugin Development' started by DatCookiez, Nov 15, 2013.

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


    Hey Guys,
    I have the code:
    1. player.getLocation().getWorld().createExplosion(player.getLocation().getX(), player.getLocation().getY(), player.getLocation().getZ(), 4F, false, false);

    and for some reason, item frames still break. How is this possible?
  2. Offline


    Wait what? An item frame is a block? I'm not sure, let me check the javadocs

    Edit: Yeah, they're not blocks. You'd have to cancel HangingBreakEvemt
  3. Offline


    realiez Item frames are not blocks, they are entities. Simply setting the explosion to not deal block damage will not stop the item frames from taking damage then breaking. You will need to find another way to stop the frames from being destroyed.

    EDIT: Try was xTrollxDudex said.
Thread Status:
Not open for further replies.

Share This Page