Package org.spout.vanilla.inventory.window.block

Examples of org.spout.vanilla.inventory.window.block.HopperWindow


  @Override
  public boolean open(Player player) {
    HopperOpenEvent event = player.getEngine().getEventManager().callEvent(new HopperOpenEvent(this, player));
    if (!event.isCancelled()) {
      player.get(WindowHolder.class).openWindow(new HopperWindow(player, getInventory()));
    }
    return false;
  }
View Full Code Here


    if (event instanceof PlayerInteractEntityEvent) {
      final PlayerInteractEntityEvent pie = (PlayerInteractEntityEvent) event;
      final Player player = (Player) pie.getEntity();
      switch (pie.getAction()) {
        case RIGHT_CLICK:
          player.add(WindowHolder.class).openWindow(new HopperWindow(player, getInventory(), "Minecart"));
      }
    }
    super.onInteract(event);
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.inventory.window.block.HopperWindow

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.