Package com.bergerkiller.bukkit.mw

Examples of com.bergerkiller.bukkit.mw.Portal


  @Override
  public void execute(SignActionEvent info) {
    if (!info.isAction(SignActionType.GROUP_ENTER, SignActionType.REDSTONE_ON) || !info.hasGroup() || !info.isPowered()) {
      return;
    }
    Portal portal = Portal.get(info.getLocation());
    if (portal == null) {
      return;
    }
    String destname = portal.getDestinationName();
    Location dest = Portal.getPortalLocation(destname, info.getGroup().getWorld().getName());
    if (dest != null) {
      //Teleport the ENTIRE train to the destination...
      Block sign = dest.getBlock();
      sign.getChunk(); //load the chunk
View Full Code Here


        World world = targets[0].getWorld();
        if (player != null) world = player.getWorld();
        //Get portal
        Location tele = Portal.getPortalLocation(dest, world.getName(), true);
        if (tele != null) {
          Portal portal = Portal.getNear(tele, 3);
          if (portal != null) {
            //Perform portal teleports
            int succcount = 0;
            for (Player target : targets) {
              if (portal.teleportSelf(target)) {
                //Success
                succcount++;
              }
            }
            if (targets.length > 1 || targets[0] != sender) {
View Full Code Here

TOP

Related Classes of com.bergerkiller.bukkit.mw.Portal

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.