Package org.spout.vanilla.component.block.material

Examples of org.spout.vanilla.component.block.material.Beacon


  public void handleServer(ServerSession session, BeaconMessage msg) {
    Window window = session.getPlayer().get(WindowHolder.class).getActiveWindow();
    if (!(window instanceof BeaconWindow)) {
      throw new IllegalStateException("Player tried to change Beacon but does not have an opened Beacon.");
    }
    Beacon beacon = ((BeaconWindow) window).getBeacon();
    beacon.setPrimaryEffect(EntityEffectType.get(msg.getPrimaryEffect()));
    beacon.setSecondaryEffect(EntityEffectType.get(msg.getSecondaryEffect()));
    for (InventoryConverter converter : window.getInventoryConverters()) {
      if (converter.getInventory() instanceof BeaconInventory) {
        converter.getInventory().clear();
      }
    }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.component.block.material.Beacon

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.