Package com.onarandombox.MultiversePortals

Examples of com.onarandombox.MultiversePortals.PortalPlayerSession


            player.sendMessage("Portal location has been set to your " + ChatColor.GREEN + "selection" + ChatColor.WHITE + "!");
        }
    }

    private MVPortal getUserSelectedPortal(Player player) {
        PortalPlayerSession ps = this.plugin.getPortalSession(player);
        return ps.getSelectedPortal();
    }
View Full Code Here


        if (!this.plugin.getCore().getMVWorldManager().isMVWorld(p.getWorld().getName())) {
            this.plugin.getCore().showNotMVWorldMessage(sender, p.getWorld().getName());
            return;
        }

        PortalPlayerSession ps = this.plugin.getPortalSession(p);
        if (args.size() == 1) {
            ps.setDebugMode(args.get(0).equalsIgnoreCase("on"));
            return;
        }
        ps.setDebugMode(!ps.isDebugModeOn());
    }
View Full Code Here

            this.plugin.getCore().showNotMVWorldMessage(sender, p.getWorld().getName());
            return;
        }
        MultiverseWorld world = this.plugin.getCore().getMVWorldManager().getMVWorld(p.getWorld().getName());

        PortalPlayerSession ps = this.plugin.getPortalSession(p);

        MultiverseRegion r = ps.getSelectedRegion();
        if (r == null) {
            return;
        }
        MVPortal portal = this.plugin.getPortalManager().getPortal(args.get(0));
        PortalLocation location = new PortalLocation(r.getMinimumPoint(), r.getMaximumPoint(), world);
        if (this.plugin.getPortalManager().addPortal(world, args.get(0), p.getName(), location)) {
            sender.sendMessage("New portal(" + ChatColor.DARK_AQUA + args.get(0) + ChatColor.WHITE + ") created and selected!");
            // If the portal did not exist, ie: we're creating it.
            // we have to re select it, because it would be null
            portal = this.plugin.getPortalManager().getPortal(args.get(0));

        } else {
            sender.sendMessage("New portal(" + ChatColor.DARK_AQUA + args.get(0) + ChatColor.WHITE + ") was NOT created!");
            sender.sendMessage("It already existed and has been selected.");
        }

        ps.selectPortal(portal);

        if (args.size() > 1 && portal != null) {
            String dest = args.get(1);
            if (dest.equalsIgnoreCase("here")) {
                MVPortal standingIn = ps.getUncachedStandingInPortal();
                if (standingIn != null) {
                    // If they're standing in a portal. treat it differently, niftily you might say...
                    String cardinal = LocationManipulation.getDirection(p.getLocation());
                    portal.setDestination("p:" + standingIn.getName() + ":" + cardinal);
                } else {
View Full Code Here

TOP

Related Classes of com.onarandombox.MultiversePortals.PortalPlayerSession

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.