[ANY] Optimize imports

This commit is contained in:
Gravit 2019-04-20 05:14:02 +07:00
parent d266fe8b74
commit caaccadd83
68 changed files with 53 additions and 181 deletions

View file

@ -1,7 +1,5 @@
package ru.gravit.launchserver; package ru.gravit.launchserver;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import ru.gravit.launcher.Launcher; import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.LauncherConfig; import ru.gravit.launcher.LauncherConfig;
import ru.gravit.launcher.NeedGarbageCollection; import ru.gravit.launcher.NeedGarbageCollection;
@ -22,21 +20,19 @@
import ru.gravit.launchserver.auth.protect.ProtectHandler; import ru.gravit.launchserver.auth.protect.ProtectHandler;
import ru.gravit.launchserver.auth.provider.AuthProvider; import ru.gravit.launchserver.auth.provider.AuthProvider;
import ru.gravit.launchserver.auth.provider.RejectAuthProvider; import ru.gravit.launchserver.auth.provider.RejectAuthProvider;
import ru.gravit.launchserver.auth.texture.RequestTextureProvider;
import ru.gravit.launchserver.auth.texture.TextureProvider;
import ru.gravit.launchserver.binary.*; import ru.gravit.launchserver.binary.*;
import ru.gravit.launchserver.components.AuthLimiterComponent; import ru.gravit.launchserver.components.AuthLimiterComponent;
import ru.gravit.launchserver.components.Component; import ru.gravit.launchserver.components.Component;
import ru.gravit.launchserver.config.LaunchServerRuntimeConfig; import ru.gravit.launchserver.config.LaunchServerRuntimeConfig;
import ru.gravit.launchserver.config.adapter.*; import ru.gravit.launchserver.legacy.Response;
import ru.gravit.launchserver.manangers.*; import ru.gravit.launchserver.manangers.*;
import ru.gravit.launchserver.manangers.hook.AuthHookManager; import ru.gravit.launchserver.manangers.hook.AuthHookManager;
import ru.gravit.launchserver.manangers.hook.BuildHookManager; import ru.gravit.launchserver.manangers.hook.BuildHookManager;
import ru.gravit.launchserver.manangers.hook.SocketHookManager; import ru.gravit.launchserver.manangers.hook.SocketHookManager;
import ru.gravit.launchserver.legacy.Response;
import ru.gravit.launchserver.websocket.NettyServerSocketHandler;
import ru.gravit.launchserver.socket.ServerSocketHandler; import ru.gravit.launchserver.socket.ServerSocketHandler;
import ru.gravit.launchserver.auth.texture.RequestTextureProvider; import ru.gravit.launchserver.websocket.NettyServerSocketHandler;
import ru.gravit.launchserver.auth.texture.TextureProvider;
import ru.gravit.utils.UniversalJsonAdapter;
import ru.gravit.utils.command.CommandHandler; import ru.gravit.utils.command.CommandHandler;
import ru.gravit.utils.command.JLineCommandHandler; import ru.gravit.utils.command.JLineCommandHandler;
import ru.gravit.utils.command.StdCommandHandler; import ru.gravit.utils.command.StdCommandHandler;
@ -601,7 +597,7 @@ public static void initGson() {
private LauncherBinary binary() { private LauncherBinary binary() {
if (launcherEXEBinaryClass != null) { if (launcherEXEBinaryClass != null) {
try { try {
return (LauncherBinary)launcherEXEBinaryClass.getConstructor(LaunchServer.class).newInstance(this); return launcherEXEBinaryClass.getConstructor(LaunchServer.class).newInstance(this);
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException } catch (InstantiationException | IllegalAccessException | IllegalArgumentException
| InvocationTargetException | NoSuchMethodException | SecurityException e) { | InvocationTargetException | NoSuchMethodException | SecurityException e) {
LogHelper.error(e); LogHelper.error(e);

View file

@ -3,13 +3,9 @@
import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.auth.AuthException;
import ru.gravit.launchserver.auth.provider.AuthProviderResult; import ru.gravit.launchserver.auth.provider.AuthProviderResult;
import ru.gravit.utils.ProviderMap; import ru.gravit.utils.ProviderMap;
import ru.gravit.utils.helper.VerifyHelper;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
import java.util.Objects;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
public abstract class AuthHandler implements AutoCloseable { public abstract class AuthHandler implements AutoCloseable {
public static ProviderMap<AuthHandler> providers = new ProviderMap<>(); public static ProviderMap<AuthHandler> providers = new ProviderMap<>();

View file

@ -1,7 +1,6 @@
package ru.gravit.launchserver.auth.handler; package ru.gravit.launchserver.auth.handler;
import ru.gravit.launcher.Launcher; import ru.gravit.launcher.Launcher;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.utils.HTTPRequest; import ru.gravit.utils.HTTPRequest;
import java.io.IOException; import java.io.IOException;
@ -75,7 +74,7 @@ protected boolean updateServerID(UUID uuid, String serverID) throws IOException
} }
@Override @Override
public void close() throws IOException { public void close() {
} }
} }

View file

@ -2,12 +2,8 @@
import ru.gravit.launcher.HWID; import ru.gravit.launcher.HWID;
import ru.gravit.utils.ProviderMap; import ru.gravit.utils.ProviderMap;
import ru.gravit.utils.helper.VerifyHelper;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
public abstract class HWIDHandler implements AutoCloseable { public abstract class HWIDHandler implements AutoCloseable {
public static ProviderMap<HWIDHandler> providers = new ProviderMap<>(); public static ProviderMap<HWIDHandler> providers = new ProviderMap<>();

View file

@ -3,7 +3,6 @@
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import ru.gravit.launcher.HWID; import ru.gravit.launcher.HWID;
import ru.gravit.launcher.Launcher; import ru.gravit.launcher.Launcher;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
@ -46,7 +45,7 @@ public int hashCode() {
public String banMessage = "You banned"; public String banMessage = "You banned";
@Override @Override
public void ban(List<HWID> hwid) throws HWIDException { public void ban(List<HWID> hwid) {
for (Entry e : list) { for (Entry e : list) {
for (HWID banHWID : hwid) { for (HWID banHWID : hwid) {
if (e.hwid.equals(banHWID)) e.isBanned = true; if (e.hwid.equals(banHWID)) e.isBanned = true;
@ -89,7 +88,7 @@ public void close() throws Exception {
} }
@Override @Override
public List<HWID> getHwid(String username) throws HWIDException { public List<HWID> getHwid(String username) {
LinkedList<HWID> hwids = new LinkedList<>(); LinkedList<HWID> hwids = new LinkedList<>();
for (Entry e : list) { for (Entry e : list) {
if (e.username.equals(username)) hwids.add(e.hwid); if (e.username.equals(username)) hwids.add(e.hwid);
@ -98,7 +97,7 @@ public List<HWID> getHwid(String username) throws HWIDException {
} }
@Override @Override
public void unban(List<HWID> hwid) throws HWIDException { public void unban(List<HWID> hwid) {
for (Entry e : list) { for (Entry e : list) {
for (HWID banHWID : hwid) { for (HWID banHWID : hwid) {
if (e.hwid.equals(banHWID)) e.isBanned = false; if (e.hwid.equals(banHWID)) e.isBanned = false;

View file

@ -34,7 +34,7 @@ public int hashCode() {
public String banMessage = "You banned"; public String banMessage = "You banned";
@Override @Override
public void ban(List<HWID> hwid) throws HWIDException { public void ban(List<HWID> hwid) {
for (Entry e : list) { for (Entry e : list) {
for (HWID banHWID : hwid) { for (HWID banHWID : hwid) {
if (e.hwid.equals(banHWID)) e.isBanned = true; if (e.hwid.equals(banHWID)) e.isBanned = true;
@ -57,7 +57,7 @@ public void check0(HWID hwid, String username) throws HWIDException {
} }
@Override @Override
public void close() throws Exception { public void close() {
} }
@ -67,7 +67,7 @@ public void init() {
} }
@Override @Override
public List<HWID> getHwid(String username) throws HWIDException { public List<HWID> getHwid(String username) {
LinkedList<HWID> hwids = new LinkedList<>(); LinkedList<HWID> hwids = new LinkedList<>();
for (Entry e : list) { for (Entry e : list) {
if (e.username.equals(username)) hwids.add(e.hwid); if (e.username.equals(username)) hwids.add(e.hwid);
@ -76,7 +76,7 @@ public List<HWID> getHwid(String username) throws HWIDException {
} }
@Override @Override
public void unban(List<HWID> hwid) throws HWIDException { public void unban(List<HWID> hwid) {
for (Entry e : list) { for (Entry e : list) {
for (HWID banHWID : hwid) { for (HWID banHWID : hwid) {
if (e.hwid.equals(banHWID)) e.isBanned = false; if (e.hwid.equals(banHWID)) e.isBanned = false;

View file

@ -19,7 +19,7 @@ public void setPermissions(String username, ClientPermissions permissions) {
} }
@Override @Override
public void close() throws Exception { public void close() {
} }
} }

View file

@ -34,7 +34,7 @@ public void reload() {
} }
@Override @Override
public void close() throws Exception { public void close() {
} }

View file

@ -35,7 +35,7 @@ public void reload() {
} }
@Override @Override
public void close() throws Exception { public void close() {
} }

View file

@ -2,11 +2,6 @@
import ru.gravit.launcher.ClientPermissions; import ru.gravit.launcher.ClientPermissions;
import ru.gravit.utils.ProviderMap; import ru.gravit.utils.ProviderMap;
import ru.gravit.utils.helper.VerifyHelper;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
public abstract class PermissionsHandler implements AutoCloseable { public abstract class PermissionsHandler implements AutoCloseable {
public static ProviderMap<PermissionsHandler> providers = new ProviderMap<>(); public static ProviderMap<PermissionsHandler> providers = new ProviderMap<>();

View file

@ -2,11 +2,6 @@
import ru.gravit.launchserver.websocket.json.auth.AuthResponse; import ru.gravit.launchserver.websocket.json.auth.AuthResponse;
import ru.gravit.utils.ProviderMap; import ru.gravit.utils.ProviderMap;
import ru.gravit.utils.helper.VerifyHelper;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
public abstract class ProtectHandler { public abstract class ProtectHandler {
public static ProviderMap<ProtectHandler> providers = new ProviderMap<>(); public static ProviderMap<ProtectHandler> providers = new ProviderMap<>();

View file

@ -2,12 +2,8 @@
import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.auth.AuthException;
import ru.gravit.utils.ProviderMap; import ru.gravit.utils.ProviderMap;
import ru.gravit.utils.helper.VerifyHelper;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
public abstract class AuthProvider implements AutoCloseable { public abstract class AuthProvider implements AutoCloseable {
public static ProviderMap<AuthProvider> providers = new ProviderMap<>(); public static ProviderMap<AuthProvider> providers = new ProviderMap<>();
@ -32,7 +28,7 @@ public static void registerProviders() {
public abstract AuthProviderResult auth(String login, String password, String ip) throws Exception; public abstract AuthProviderResult auth(String login, String password, String ip) throws Exception;
public void preAuth(String login, String password, String customText, String ip) throws Exception { public void preAuth(String login, String password, String customText, String ip) {
return; return;
} }

View file

@ -2,13 +2,9 @@
import ru.gravit.launcher.profiles.Texture; import ru.gravit.launcher.profiles.Texture;
import ru.gravit.utils.ProviderMap; import ru.gravit.utils.ProviderMap;
import ru.gravit.utils.helper.VerifyHelper;
import java.io.IOException; import java.io.IOException;
import java.util.Map;
import java.util.Objects;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
public abstract class TextureProvider implements AutoCloseable { public abstract class TextureProvider implements AutoCloseable {
public static ProviderMap<TextureProvider> providers = new ProviderMap<>(); public static ProviderMap<TextureProvider> providers = new ProviderMap<>();

View file

@ -30,7 +30,7 @@ public void postInit(LaunchServer launchServer) {
} }
@Override @Override
public void close() throws Exception { public void close() {
for (Map.Entry<String, Command> e : commandsList.entrySet()) { for (Map.Entry<String, Command> e : commandsList.entrySet()) {
LaunchServer.server.commandHandler.registerCommand(e.getKey(), e.getValue()); LaunchServer.server.commandHandler.registerCommand(e.getKey(), e.getValue());
} }

View file

@ -2,11 +2,6 @@
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.utils.ProviderMap; import ru.gravit.utils.ProviderMap;
import ru.gravit.utils.helper.VerifyHelper;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
public abstract class Component { public abstract class Component {
public static ProviderMap<Component> providers = new ProviderMap<>(); public static ProviderMap<Component> providers = new ProviderMap<>();

View file

@ -5,9 +5,9 @@
import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.legacy.Response;
import ru.gravit.launchserver.manangers.SessionManager; import ru.gravit.launchserver.manangers.SessionManager;
import ru.gravit.launchserver.manangers.hook.SocketHookManager; import ru.gravit.launchserver.manangers.hook.SocketHookManager;
import ru.gravit.launchserver.legacy.Response;
import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
import ru.gravit.utils.helper.SecurityHelper; import ru.gravit.utils.helper.SecurityHelper;

View file

@ -53,7 +53,7 @@ public ChannelFuture bind(InetSocketAddress address)
} }
@Override @Override
public void close() throws Exception { public void close() {
workerGroup.shutdownGracefully(); workerGroup.shutdownGracefully();
bossGroup.shutdownGracefully(); bossGroup.shutdownGracefully();
} }

View file

@ -1,25 +1,9 @@
package ru.gravit.launchserver.websocket; package ru.gravit.launchserver.websocket;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.http.HttpObjectAggregator;
import io.netty.handler.codec.http.HttpServerCodec;
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
import ru.gravit.launcher.ssl.LauncherKeyStore; import ru.gravit.launcher.ssl.LauncherKeyStore;
import ru.gravit.launcher.ssl.LauncherTrustManager; import ru.gravit.launcher.ssl.LauncherTrustManager;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.websocket.fileserver.FileServerHandler;
import ru.gravit.launchserver.legacy.Response; import ru.gravit.launchserver.legacy.Response;
import ru.gravit.utils.helper.CommonHelper;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.utils.helper.VerifyHelper;
@ -32,17 +16,12 @@
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.ServerSocket; import java.net.ServerSocket;
import java.net.Socket; import java.net.Socket;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.security.*; import java.security.*;
import java.security.cert.CertificateException; import java.security.cert.CertificateException;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;

View file

@ -3,7 +3,6 @@
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.EchoRequestEvent; import ru.gravit.launcher.events.request.EchoRequestEvent;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
public class EchoResponse extends SimpleResponse { public class EchoResponse extends SimpleResponse {

View file

@ -2,7 +2,6 @@
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
public interface JsonResponseInterface { public interface JsonResponseInterface {
String getType(); String getType();

View file

@ -3,7 +3,6 @@
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.events.request.ErrorRequestEvent; import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService; import ru.gravit.launchserver.websocket.WebSocketService;

View file

@ -1,10 +1,8 @@
package ru.gravit.launchserver.websocket.json.admin; package ru.gravit.launchserver.websocket.json.admin;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.LogEvent; import ru.gravit.launcher.events.request.LogEvent;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
@ -17,7 +15,7 @@ public String getType() {
} }
@Override @Override
public void execute(ChannelHandlerContext ctx, Client client) throws Exception { public void execute(ChannelHandlerContext ctx, Client client) {
if (!client.isAuth) { if (!client.isAuth) {
sendError("Access denied"); sendError("Access denied");
return; return;

View file

@ -1,12 +1,9 @@
package ru.gravit.launchserver.websocket.json.admin; package ru.gravit.launchserver.websocket.json.admin;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.ExecCommandRequestEvent; import ru.gravit.launcher.events.request.ExecCommandRequestEvent;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
public class ExecCommandResponse extends SimpleResponse { public class ExecCommandResponse extends SimpleResponse {

View file

@ -3,7 +3,6 @@
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.OshiHWID; import ru.gravit.launcher.OshiHWID;
import ru.gravit.launcher.events.request.AuthRequestEvent; import ru.gravit.launcher.events.request.AuthRequestEvent;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.auth.AuthException;
@ -12,8 +11,6 @@
import ru.gravit.launchserver.auth.provider.AuthProvider; import ru.gravit.launchserver.auth.provider.AuthProvider;
import ru.gravit.launchserver.auth.provider.AuthProviderResult; import ru.gravit.launchserver.auth.provider.AuthProviderResult;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import ru.gravit.launchserver.websocket.json.profile.ProfileByUUIDResponse; import ru.gravit.launchserver.websocket.json.profile.ProfileByUUIDResponse;
import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.IOHelper;

View file

@ -2,12 +2,9 @@
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.CheckServerRequestEvent; import ru.gravit.launcher.events.request.CheckServerRequestEvent;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.auth.AuthException;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import ru.gravit.launchserver.websocket.json.profile.ProfileByUUIDResponse; import ru.gravit.launchserver.websocket.json.profile.ProfileByUUIDResponse;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -5,8 +5,6 @@
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.AuthProviderPair; import ru.gravit.launchserver.auth.AuthProviderPair;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import java.util.ArrayList; import java.util.ArrayList;
@ -19,7 +17,7 @@ public String getType() {
} }
@Override @Override
public void execute(ChannelHandlerContext ctx, Client client) throws Exception { public void execute(ChannelHandlerContext ctx, Client client) {
List<GetAvailabilityAuthRequestEvent.AuthAvailability> list = new ArrayList<>(); List<GetAvailabilityAuthRequestEvent.AuthAvailability> list = new ArrayList<>();
for(AuthProviderPair pair : LaunchServer.server.config.auth) for(AuthProviderPair pair : LaunchServer.server.config.auth)
{ {

View file

@ -1,13 +1,10 @@
package ru.gravit.launchserver.websocket.json.auth; package ru.gravit.launchserver.websocket.json.auth;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.JoinServerRequestEvent; import ru.gravit.launcher.events.request.JoinServerRequestEvent;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.auth.AuthException;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -3,15 +3,10 @@
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.ErrorRequestEvent; import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.ProfilesRequestEvent; import ru.gravit.launcher.events.request.ProfilesRequestEvent;
import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import java.util.List;
public class ProfilesResponse extends SimpleResponse { public class ProfilesResponse extends SimpleResponse {
@Override @Override
public String getType() { public String getType() {
@ -19,7 +14,7 @@ public String getType() {
} }
@Override @Override
public void execute(ChannelHandlerContext ctx, Client client) throws Exception { public void execute(ChannelHandlerContext ctx, Client client) {
if (!client.checkSign && !client.isAuth) { if (!client.checkSign && !client.isAuth) {
service.sendObject(ctx, new ErrorRequestEvent("Access denied")); service.sendObject(ctx, new ErrorRequestEvent("Access denied"));
return; return;

View file

@ -2,13 +2,10 @@
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.RestoreSessionRequestEvent; import ru.gravit.launcher.events.request.RestoreSessionRequestEvent;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketFrameHandler; import ru.gravit.launchserver.websocket.WebSocketFrameHandler;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
public class RestoreSessionResponse extends SimpleResponse { public class RestoreSessionResponse extends SimpleResponse {
@ -20,7 +17,7 @@ public String getType() {
} }
@Override @Override
public void execute(ChannelHandlerContext ctx, Client client) throws Exception { public void execute(ChannelHandlerContext ctx, Client client) {
Client rClient = LaunchServer.server.sessionManager.getClient(session); Client rClient = LaunchServer.server.sessionManager.getClient(session);
if(rClient == null) if(rClient == null)
{ {

View file

@ -1,13 +1,10 @@
package ru.gravit.launchserver.websocket.json.auth; package ru.gravit.launchserver.websocket.json.auth;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.SetProfileRequestEvent; import ru.gravit.launcher.events.request.SetProfileRequestEvent;
import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import java.util.Collection; import java.util.Collection;
@ -21,7 +18,7 @@ public String getType() {
} }
@Override @Override
public void execute(ChannelHandlerContext ctx, Client client) throws Exception { public void execute(ChannelHandlerContext ctx, Client client) {
if (!client.isAuth) { if (!client.isAuth) {
sendError("Access denied"); sendError("Access denied");
return; return;

View file

@ -5,8 +5,6 @@
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -5,10 +5,8 @@
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launcher.profiles.Texture; import ru.gravit.launcher.profiles.Texture;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.auth.texture.TextureProvider; import ru.gravit.launchserver.auth.texture.TextureProvider;
import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -4,8 +4,6 @@
import ru.gravit.launcher.events.request.ProfileByUsernameRequestEvent; import ru.gravit.launcher.events.request.ProfileByUsernameRequestEvent;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -4,8 +4,6 @@
import ru.gravit.launcher.events.request.GetSecureTokenRequestEvent; import ru.gravit.launcher.events.request.GetSecureTokenRequestEvent;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
public class GetSecureTokenResponse extends SimpleResponse { public class GetSecureTokenResponse extends SimpleResponse {
@ -15,7 +13,7 @@ public String getType() {
} }
@Override @Override
public void execute(ChannelHandlerContext ctx, Client client) throws Exception { public void execute(ChannelHandlerContext ctx, Client client) {
String secureToken = LaunchServer.server.config.protectHandler.generateClientSecureToken(); String secureToken = LaunchServer.server.config.protectHandler.generateClientSecureToken();
client.verifyToken = secureToken; client.verifyToken = secureToken;
sendResult(new GetSecureTokenRequestEvent(secureToken)); sendResult(new GetSecureTokenRequestEvent(secureToken));

View file

@ -4,8 +4,6 @@
import ru.gravit.launcher.events.request.VerifySecureTokenRequestEvent; import ru.gravit.launcher.events.request.VerifySecureTokenRequestEvent;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
public class VerifySecureTokenResponse extends SimpleResponse { public class VerifySecureTokenResponse extends SimpleResponse {
@ -17,7 +15,7 @@ public String getType() {
} }
@Override @Override
public void execute(ChannelHandlerContext ctx, Client client) throws Exception { public void execute(ChannelHandlerContext ctx, Client client) {
boolean success = LaunchServer.server.config.protectHandler.verifyClientSecureToken(secureToken, client.verifyToken); boolean success = LaunchServer.server.config.protectHandler.verifyClientSecureToken(secureToken, client.verifyToken);
if(success) client.isSecure = true; if(success) client.isSecure = true;
sendResult(new VerifySecureTokenRequestEvent(success)); sendResult(new VerifySecureTokenRequestEvent(success));

View file

@ -1,12 +1,9 @@
package ru.gravit.launchserver.websocket.json.update; package ru.gravit.launchserver.websocket.json.update;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.LauncherRequestEvent; import ru.gravit.launcher.events.request.LauncherRequestEvent;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import ru.gravit.utils.Version; import ru.gravit.utils.Version;

View file

@ -1,14 +1,11 @@
package ru.gravit.launchserver.websocket.json.update; package ru.gravit.launchserver.websocket.json.update;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.UpdateListRequestEvent; import ru.gravit.launcher.events.request.UpdateListRequestEvent;
import ru.gravit.launcher.hasher.HashedDir; import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.launcher.serialize.signed.SignedObjectHolder; import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
import java.util.HashSet; import java.util.HashSet;

View file

@ -8,8 +8,6 @@
import ru.gravit.launcher.serialize.signed.SignedObjectHolder; import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.websocket.WebSocketService;
import ru.gravit.launchserver.websocket.json.JsonResponseInterface;
import ru.gravit.launchserver.websocket.json.SimpleResponse; import ru.gravit.launchserver.websocket.json.SimpleResponse;
public class UpdateResponse extends SimpleResponse { public class UpdateResponse extends SimpleResponse {
@ -21,7 +19,7 @@ public String getType() {
} }
@Override @Override
public void execute(ChannelHandlerContext ctx, Client client) throws Exception { public void execute(ChannelHandlerContext ctx, Client client) {
if (!client.isAuth || client.type != Client.Type.USER || client.profile == null) { if (!client.isAuth || client.type != Client.Type.USER || client.profile == null) {
sendError("Access denied"); sendError("Access denied");
return; return;

View file

@ -1,5 +1,12 @@
package ru.gravit.launcher; package ru.gravit.launcher;
import cpw.mods.fml.SafeExitJVMLegacy;
import net.minecraftforge.fml.SafeExitJVM;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.InsnNode;
import org.objectweb.asm.tree.MethodNode;
import ru.gravit.utils.NativeJVMHalt; import ru.gravit.utils.NativeJVMHalt;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
@ -11,15 +18,6 @@
import java.util.List; import java.util.List;
import java.util.jar.JarFile; import java.util.jar.JarFile;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.InsnNode;
import org.objectweb.asm.tree.MethodNode;
import cpw.mods.fml.SafeExitJVMLegacy;
import net.minecraftforge.fml.SafeExitJVM;
import static org.objectweb.asm.Opcodes.*; import static org.objectweb.asm.Opcodes.*;
@LauncherAPI @LauncherAPI

View file

@ -1,14 +1,11 @@
package ru.gravit.launcher; package ru.gravit.launcher;
import com.google.gson.GsonBuilder;
import ru.gravit.launcher.client.ClientModuleManager; import ru.gravit.launcher.client.ClientModuleManager;
import ru.gravit.launcher.client.DirBridge; import ru.gravit.launcher.client.DirBridge;
import ru.gravit.launcher.client.FunctionalBridge; import ru.gravit.launcher.client.FunctionalBridge;
import ru.gravit.launcher.guard.LauncherGuardManager; import ru.gravit.launcher.guard.LauncherGuardManager;
import ru.gravit.launcher.gui.JSRuntimeProvider; import ru.gravit.launcher.gui.JSRuntimeProvider;
import ru.gravit.launcher.gui.RuntimeProvider; import ru.gravit.launcher.gui.RuntimeProvider;
import ru.gravit.launcher.hasher.HashedEntry;
import ru.gravit.launcher.hasher.HashedEntryAdapter;
import ru.gravit.launcher.managers.ClientGsonManager; import ru.gravit.launcher.managers.ClientGsonManager;
import ru.gravit.launcher.request.Request; import ru.gravit.launcher.request.Request;
import ru.gravit.launcher.request.websockets.StandartClientWebSocketService; import ru.gravit.launcher.request.websockets.StandartClientWebSocketService;

View file

@ -4,7 +4,9 @@
import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.ClientProfile;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.*; import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
public class NewLauncherSettings { public class NewLauncherSettings {
@LauncherAPI @LauncherAPI

View file

@ -1,11 +1,11 @@
package ru.gravit.launcher.client; package ru.gravit.launcher.client;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import ru.gravit.launcher.*; import ru.gravit.launcher.*;
import ru.gravit.launcher.guard.LauncherGuardManager; import ru.gravit.launcher.guard.LauncherGuardManager;
import ru.gravit.launcher.gui.JSRuntimeProvider; import ru.gravit.launcher.gui.JSRuntimeProvider;
import ru.gravit.launcher.hasher.*; import ru.gravit.launcher.hasher.DirWatcher;
import ru.gravit.launcher.hasher.FileNameMatcher;
import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.launcher.managers.ClientGsonManager; import ru.gravit.launcher.managers.ClientGsonManager;
import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;

View file

@ -1,7 +1,10 @@
package ru.gravit.launcher.gui; package ru.gravit.launcher.gui;
import ru.gravit.launcher.*; import ru.gravit.launcher.*;
import ru.gravit.launcher.client.*; import ru.gravit.launcher.client.ClientLauncher;
import ru.gravit.launcher.client.DirBridge;
import ru.gravit.launcher.client.FunctionalBridge;
import ru.gravit.launcher.client.ServerPinger;
import ru.gravit.launcher.hasher.FileNameMatcher; import ru.gravit.launcher.hasher.FileNameMatcher;
import ru.gravit.launcher.hasher.HashedDir; import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.launcher.hasher.HashedEntry; import ru.gravit.launcher.hasher.HashedEntry;

View file

@ -10,11 +10,9 @@
import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.IOHelper;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.nio.file.*; import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.BasicFileAttributes;
import java.util.Map;
public class SettingsManager extends JsonConfigurable<NewLauncherSettings> { public class SettingsManager extends JsonConfigurable<NewLauncherSettings> {
public class StoreFileVisitor extends SimpleFileVisitor<Path> { public class StoreFileVisitor extends SimpleFileVisitor<Path> {

View file

@ -9,7 +9,9 @@
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
import java.io.IOException; import java.io.IOException;
import java.util.concurrent.*; import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
public class StandartClientWebSocketService extends ClientWebSocketService { public class StandartClientWebSocketService extends ClientWebSocketService {
public WaitEventHandler waitEventHandler = new WaitEventHandler(); public WaitEventHandler waitEventHandler = new WaitEventHandler();

View file

@ -1,7 +1,5 @@
package ru.gravit.launcher.server; package ru.gravit.launcher.server;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import ru.gravit.launcher.ClientPermissions; import ru.gravit.launcher.ClientPermissions;
import ru.gravit.launcher.Launcher; import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.LauncherConfig; import ru.gravit.launcher.LauncherConfig;

View file

@ -1,7 +1,5 @@
package ru.gravit.launcher; package ru.gravit.launcher;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import ru.gravit.launcher.managers.GsonManager; import ru.gravit.launcher.managers.GsonManager;
import ru.gravit.launcher.modules.ModulesManager; import ru.gravit.launcher.modules.ModulesManager;
import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.ClientProfile;

View file

@ -1,7 +1,5 @@
package ru.gravit.launcher.events; package ru.gravit.launcher.events;
import ru.gravit.launcher.events.RequestEvent;
public class ExceptionEvent extends RequestEvent { public class ExceptionEvent extends RequestEvent {
public ExceptionEvent(Exception e) { public ExceptionEvent(Exception e) {
this.message = e.getMessage(); this.message = e.getMessage();

View file

@ -4,7 +4,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -3,7 +3,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -3,7 +3,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.request.ResultInterface;
public class ExecCommandRequestEvent extends RequestEvent { public class ExecCommandRequestEvent extends RequestEvent {
@Override @Override

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.request.ResultInterface;
import java.util.List; import java.util.List;

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.request.ResultInterface;
public class GetSecureTokenRequestEvent extends RequestEvent { public class GetSecureTokenRequestEvent extends RequestEvent {
@LauncherNetworkAPI @LauncherNetworkAPI

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -3,7 +3,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -3,7 +3,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -3,7 +3,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.List; import java.util.List;

View file

@ -3,7 +3,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.UUID; import java.util.UUID;

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.request.ResultInterface;
import ru.gravit.utils.event.EventInterface; import ru.gravit.utils.event.EventInterface;
import java.util.HashSet; import java.util.HashSet;

View file

@ -3,7 +3,6 @@
import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.LauncherNetworkAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.hasher.HashedDir; import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.launcher.request.ResultInterface;
public class UpdateRequestEvent extends RequestEvent { public class UpdateRequestEvent extends RequestEvent {
@LauncherNetworkAPI @LauncherNetworkAPI

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.events.RequestEvent; import ru.gravit.launcher.events.RequestEvent;
import ru.gravit.launcher.request.ResultInterface;
public class VerifySecureTokenRequestEvent extends RequestEvent { public class VerifySecureTokenRequestEvent extends RequestEvent {
@LauncherAPI @LauncherAPI

View file

@ -4,7 +4,9 @@
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public abstract class CommandHandler implements Runnable { public abstract class CommandHandler implements Runnable {
private final List<Category> categories = new ArrayList<>(); private final List<Category> categories = new ArrayList<>();

View file

@ -2,7 +2,6 @@
import ru.gravit.launcher.Launcher; import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.Version;
import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.IOHelper;
import java.io.BufferedReader; import java.io.BufferedReader;

View file

@ -10,8 +10,8 @@
import java.net.*; import java.net.*;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystem;
import java.nio.file.*; import java.nio.file.*;
import java.nio.file.FileSystem;
import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.BasicFileAttributes;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;