Sending fake blocks, not working?

Discussion in 'Plugin Development' started by -_Husky_-, Mar 27, 2013.

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

    -_Husky_-

    Hey guys, My sendBlockChange, isn't working at all, I've tried logging it's all valid info, it just will not send the change.

    Code:
    ListIterator<Location> li = blocks.listIterator();
    while(li.hasNext()) {
    Material m = Material.getMaterial(config.getInt("FakeBlock-ID"));
    System.out.println("Sending blocks!");
    p.sendBlockChange(li.next(), m, (byte) 0);
    p.sendBlockChange(li.next(), Material.STONE, (byte) 0);
    System.out.println(li.next());
    }
    Any ideas?

    Just tried
    Code:
    p.sendBlockChange(new Location(p.getWorld(), 4, 69, 264), Material.STONE, (byte) 0);
    Logging after it went, but it didn't send.

    Boop

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  2. Offline

    GodzOfMadness

    -_Husky_- I don't see why sendBlockChange is messing up for you. Try downloading the latest version if you haven't already, and download the latest craftbukkit for your test server. Then just re-export your project
     
  3. Offline

    Tirelessly

    Don't call iterator.next() more than once per iteration. Assign it to a variable.
     
  4. Has this been solved? If so, how-so?
     
  5. Offline

    -_Husky_-

    I waited 3 seconds before sending the block updates, they were overlapping with the actual blocks being sent.
     
    KingFaris11 likes this.
Thread Status:
Not open for further replies.

Share This Page