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

Get block id name

Comments in 'Plugin Development' started by Artide, Sep 29, 2015.

  1. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    How do I get the name of a block id? For example block id 2 is dirt, but how to make it return the name by getting the id?
  2. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    $block->getName() should return the name of most (but not all) blocks.
    Artide likes this.
  3. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    Thanks.

Share This Page

Advertisement