Package com.onarandombox.MultiversePortals

Examples of com.onarandombox.MultiversePortals.MultiversePortals


    }

    @Override
    public boolean isThisType(JavaPlugin plugin, String dest) {
        // If this class exists, then this plugin MUST exist!
        MultiversePortals portalPlugin = (MultiversePortals) plugin.getServer().getPluginManager().getPlugin("Multiverse-Portals");
        String[] split = dest.split(":");
        if (split.length > 3 || split.length < 2) {
            return false;
        }
        if (split[0].equalsIgnoreCase("p")) {
            if (portalPlugin.getPortalManager().isPortal(split[1])) {
                return true;
            }
        }
        return false;
    }
View Full Code Here


    }

    @Override
    public void setDestination(JavaPlugin plugin, String dest) {
        // If this class exists, then this plugin MUST exist!
        MultiversePortals portalPlugin = (MultiversePortals) plugin.getServer().getPluginManager().getPlugin("Multiverse-Portals");
        String[] split = dest.split(":");
        if (split.length > 3) {
            this.isValid = false;
            return;
        }
        if (split.length >= 2 && split[0].equalsIgnoreCase("p")) {
            if (!portalPlugin.getPortalManager().isPortal(split[1])) {
                this.isValid = false;
                return;
            }
            this.isValid = true;
            this.portal = portalPlugin.getPortalManager().getPortal(split[1]);
            if (split.length == 3) {
                this.orientationString = split[2];
            }
        }
    }
View Full Code Here

    @Override
    public void setDestination(JavaPlugin plugin, String dest) {
        this.portals = new ArrayList<MVPortal>();
        // If this class exists, then this plugin MUST exist!
        MultiversePortals portalPlugin = (MultiversePortals) plugin.getServer().getPluginManager().getPlugin("Multiverse-Portals");
        String[] split = dest.split(":");
        // iterate over splits, split[0] = getIdentifier()
        MVPortal portal;
        for (int i = 1; i < split.length; i++)
            if ((portal = portalPlugin.getPortalManager().getPortal(split[i])) != null)
                this.portals.add(portal);
    }
View Full Code Here

TOP

Related Classes of com.onarandombox.MultiversePortals.MultiversePortals

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.