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 {