Package org.spout.vanilla.event.material.network

Examples of org.spout.vanilla.event.material.network.SignUpdateEvent


    for (int i = 0; i < MAX_LINES; i++) {
      if (text[i].length() > CHARS_PER_LINE) {
        text[i] = text[i].substring(0, CHARS_PER_LINE);
      }
    }
    SignUpdateEvent event = new SignUpdateEvent(this, text, cause);
    //Call event to plugins, allow them to alter it
    VanillaPlugin.getInstance().getEngine().getEventManager().callEvent(event);
    //Send event to protocol
    if (!event.isCancelled()) {
      for (Player p : this.getOwner().getBlock().getChunk().getObservingPlayers()) {
        p.getNetwork().callProtocolEvent(event);
      }
      getData().put(VanillaData.SIGN_TEXT, event.getLines());
    }
  }
View Full Code Here


  @Override
  public ProtocolEvent getUpdate(World world, int x, int y, int z, BlockComponentOwner owner) {
    Sign sign = owner.get(Sign.class);
    if (sign != null) {
      return new SignUpdateEvent(sign, sign.getText(), null);
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.event.material.network.SignUpdateEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.