public static void teleportPlayer( BSPlayer p, String type, String dest, boolean perm ) {
        if ( !perm ) {
            p.sendMessage( Messages.PORTAL_NO_PERMISSION );
            return;
        }
        if ( type.equalsIgnoreCase( "warp" ) ) {
            Warp w = WarpsManager.getWarp( dest );
            if ( w == null ) {
                p.sendMessage( Messages.PORTAL_DESTINATION_NOT_EXIST );
            } else {
                Location loc = w.getLocation();
                ByteArrayOutputStream b = new ByteArrayOutputStream();
                DataOutputStream out = new DataOutputStream( b );
                try {
                    out.writeUTF( "TeleportPlayer" );
                    out.writeUTF( p.getName() );
                    out.writeUTF( loc.getWorld() );
                    out.writeDouble( loc.getX() );
                    out.writeDouble( loc.getY() );
                    out.writeDouble( loc.getZ() );
                    out.writeFloat( loc.getYaw() );
                    out.writeFloat( loc.getPitch() );
                } catch ( IOException e ) {
                    e.printStackTrace();
                }
                sendPluginMessageTaskPortals( loc.getServer(), b );
                if ( !loc.getServer().equals( p.getServer().getInfo() ) ) {
                    p.sendToServer( loc.getServer().getName() );
                }
            }
        } else {
            if ( BungeeSuite.proxy.getServerInfo( dest ) == null ) {
                p.sendMessage( Messages.PORTAL_DESTINATION_NOT_EXIST );
                return;
            }
            ServerInfo s = BungeeSuite.proxy.getServerInfo( dest );
            if ( !s.equals( p.getServer().getInfo() ) ) {
                p.connectTo( s );
            }
        }

    }