Solved (fixed)

Discussion in 'Plugin Development' started by bob7, Nov 29, 2012.

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

    bob7

    So i've been working on logging some of the newer events like blockchange. Sadely, it seems blockchange only returns in a ID rather then a material like name ex:(STONE)

    I hope there is a simple way around this, i rather not change my entire entry just to accept a misplaced ID

    Code:
    public void onEntityBlockChange(EntityChangeBlockEvent event) {
    String en = event.getEntityType().getName();
    Block block = event.getBlock();
    DataManager.addEntry(new BlockEntry(en, DataType.BLOCK_CHANGE, block));
    }
     
  2. Offline

    CorrieKay

    Never heard of this event. Is it on a dev build past 1.4.5R-0.2?

    Scratch that, i mistyped the event name

    if you wanted the material, you can just Material.getMaterial(id);
     
  3. Offline

    bob7

    I think i may of found out the issue, it's not the event it's the fact that I'm getting an entity instead of a player (Not bukkit related, my plugin handles entities different)

    Issue fixed!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
Thread Status:
Not open for further replies.

Share This Page