Solved Help with maps in frames

Discussion in 'Plugin Development' started by wizzinangel, Apr 1, 2014.

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

    wizzinangel

    Hi guys. Need some help.

    How would I get a map that is in an itemframe mounted on a block.
     
  2. Offline

    wizzinangel

    Anyone? how would you get an item frame that is attached to a fence or block?

    I have this:

    Code:java
    1. Block block = player.getLocation().getBlock();
    2. ArrayList<Location> blockLocs = new ArrayList<Location>();
    3. for(int x = block.getX() - 1; x <= block.getX() + 1; x++){
    4. for(int z = block.getZ() - 1; z <= block.getZ() + 1; z++){
    5. Location loc = new Location(block.getWorld(), x, player.getLocation().getY(), z);
    6. if(loc.getBlock() != player.getLocation().getBlock())
    7. Bukkit.getServer().getConsoleSender().sendMessage("Blocks: " + loc.getBlock().getType());
    8. }
    9. }


    But it will list all the blocks except for the item frame? seems it cannot see the item frame at all?
     
  3. Offline

    uyghtiDEV

    Not sure if this helps, but I believe an Item Frame is an entity, not a block.
     
  4. Offline

    wizzinangel

    uyghtiDEV hmm...kk ill look into that.

    uyghtiDEV ur right it was an entity...thanks for that.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  5. Offline

    uyghtiDEV

    No problem :)
     
Thread Status:
Not open for further replies.

Share This Page