Bukkit launchpad help - Detect blocks below player

Discussion in 'Plugin Development' started by jumbledProgram, Apr 11, 2020.

Thread Status:
Not open for further replies.
  1. Hey everyone! I'm trying to develop a simple launchpad plugin for a small server, but im really stuck! Im trying to detect if the player is standing on chiselled quartz block, and then detect if a redstone block is below that (i've got a lot of chiselled quartz in the lobby, so making sure a redstone block is below it is really important).
    Thanks -loz
     
  2. Offline

    Wick

    What have you got so far? What are you stuck on?
     
  3. well, i can launch the player with a command, but i want to detect the blocks below instead
     
  4. Offline

    KarimAKL

    @jumbledProgram You can listen to the PlayerMoveEvent, then check if PlayerMoveEvent#getTo()#getBlock()#getRelative(BlockFace#DOWN)#getType() is your required Material.

    Do note that unless you make another check, this will run a lot of times, causing the player to be launched much further.
     
Thread Status:
Not open for further replies.

Share This Page