@@ -0,0 +1,2390 @@
+/******************************************************************************%0A *                                                                            *%0A *                    Copyright 2017 Subterranean Security                    *%0A *                                                                            *%0A *  Licensed under the Apache License, Version 2.0 (the %22License%22);           *%0A *  you may not use this file except in compliance with the License.          *%0A *  You may obtain a copy of the License at                                   *%0A *                                                                            *%0A *      http://www.apache.org/licenses/LICENSE-2.0                            *%0A *                                                                            *%0A *  Unless required by applicable law or agreed to in writing, software       *%0A *  distributed under the License is distributed on an %22AS IS%22 BASIS,         *%0A *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  *%0A *  See the License for the specific language governing permissions and       *%0A *  limitations under the License.                                            *%0A *                                                                            *%0A *****************************************************************************/%0Apackage com.sandpolis.viewer.cmd;%0A%0Aimport static com.sandpolis.core.util.CryptoUtil.SHA256;%0Aimport static com.sandpolis.core.util.ProtoUtil.rq;%0A%0Aimport java.util.Objects;%0A%0Aimport com.sandpolis.core.net.future.ResponseFuture;%0Aimport com.sandpolis.core.net.store.network.NetworkStore;%0Aimport com.sandpolis.core.proto.net.MCLogin.RQ_Login;%0Aimport com.sandpolis.core.proto.util.Result.Outcome;%0Aimport com.sandpolis.core.util.CryptoUtil;%0A%0A/**%0A * Login commands.%0A * %0A * @author cilki%0A * @since 4.0.0%0A */%0Apublic final class LoginCmd %7B%0A%0A%09/**%0A%09 * Attempt to login to the Server.%0A%09 * %0A%09 * @param user The logon username%0A%09 * @param pass The logon password%0A%09 * @return%0A%09 */%0A%09public static ResponseFuture%3COutcome%3E login(String user, String pass) %7B%0A%09%09Objects.requireNonNull(user);%0A%09%09Objects.requireNonNull(pass);%0A%0A%09%09var rq = rq().setRqLogin(RQ_Login.newBuilder().setUsername(user).setPassword(CryptoUtil.hash(SHA256, pass)));%0A%09%09return new ResponseFuture%3C%3E(NetworkStore.route(rq, %22net.timeout.response.default%22));%0A%09%7D%0A%0A%09private LoginCmd() %7B%0A%09%7D%0A%7D%0A

Add LoginCmd