Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting block under

Comments in 'Plugin Development' started by CookieSteve, May 29, 2015.

  1. CookieSteve
    Offline

    CookieSteve Active Member

    Joined:
    Apr 22, 2014
    Posts:
    132
    Minecraft User:
    iStrqfeChris
    How do I get what block that they are standing on using the PlayerMoveEvent
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Don't do that in PlayerMoveEvent. Use a scheduled task to check instead.

    To get the block below a player $player:
    PHP:
    $block $player->getLevel()->getBlock($player->floor()->subtract(01));
  3. CookieSteve
    Offline

    CookieSteve Active Member

    Joined:
    Apr 22, 2014
    Posts:
    132
    Minecraft User:
    iStrqfeChris
    Thxz for the code and the tip :)

Share This Page

Advertisement