IDEA Refractoring

This commit is contained in:
Gravit 2018-11-08 19:28:31 +07:00
parent 6377f9f287
commit f9b8bd2947
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
56 changed files with 180 additions and 242 deletions

View file

@ -31,7 +31,6 @@
import java.util.zip.CRC32;
import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.launcher.serialize.config.entry.*;
import ru.gravit.launchserver.manangers.MirrorManager;

View file

@ -2,8 +2,6 @@
import java.io.IOException;
import ru.gravit.launcher.LauncherAPI;
public final class AuthException extends IOException {
private static final long serialVersionUID = -2586107832847245863L;

View file

@ -2,7 +2,6 @@
import java.util.HashMap;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.NeedGarbageCollection;
import ru.gravit.launchserver.LaunchServer;

View file

@ -10,7 +10,7 @@ public ClientPermissions() {
canServer = false;
}
public ClientPermissions(long data) {
canAdmin = (data & (1 << 0)) != 0;
canAdmin = (data & (1)) != 0;
canServer = (data & (1 << 1)) != 0;
}
public static ClientPermissions getSuperuserAccount()

View file

@ -9,7 +9,6 @@
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.LogHelper;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.serialize.config.ConfigObject;

View file

@ -6,7 +6,6 @@
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.serialize.config.ConfigObject;
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;

View file

@ -6,7 +6,6 @@
import java.util.Objects;
import java.util.UUID;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.NeedGarbageCollection;
import ru.gravit.launcher.managers.GarbageManager;
import ru.gravit.launcher.serialize.config.entry.BooleanConfigEntry;

View file

@ -10,7 +10,6 @@
import java.util.UUID;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.CommonHelper;
import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.LogHelper;

View file

@ -4,7 +4,6 @@
import java.util.Objects;
import java.util.UUID;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
import ru.gravit.launchserver.auth.provider.AuthProviderResult;

View file

@ -5,7 +5,6 @@
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.serialize.config.ConfigObject;
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;

View file

@ -1,7 +1,6 @@
package ru.gravit.launchserver.auth.provider;
import ru.gravit.launcher.serialize.config.entry.BooleanConfigEntry;
import ru.gravit.launcher.serialize.config.entry.StringConfigEntry;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.utils.helper.SecurityHelper;
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;

View file

@ -5,7 +5,6 @@
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.handler.AuthHandler;
import ru.gravit.utils.helper.VerifyHelper;

View file

@ -1,6 +1,5 @@
package ru.gravit.launchserver.auth.provider;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.utils.helper.SecurityHelper;
import ru.gravit.utils.helper.SecurityHelper.DigestAlgorithm;

View file

@ -3,7 +3,6 @@
import java.io.IOException;
import java.util.Objects;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;

View file

@ -4,7 +4,6 @@
import java.nio.file.Path;
import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.LogHelper;
import ru.gravit.launchserver.LaunchServer;

View file

@ -3,10 +3,8 @@
import java.io.IOException;
import java.nio.file.Path;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.serialize.signed.DigestBytesHolder;
import ru.gravit.utils.helper.IOHelper;
import ru.gravit.launcher.serialize.signed.SignedBytesHolder;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.utils.helper.SecurityHelper;

View file

@ -2,7 +2,6 @@
import java.util.UUID;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launchserver.LaunchServer;

View file

@ -1,7 +1,5 @@
package ru.gravit.launchserver.command;
import ru.gravit.launcher.LauncherAPI;
public final class CommandException extends Exception {
private static final long serialVersionUID = -6588814993972117772L;

View file

@ -3,7 +3,6 @@
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.command.Command;
import ru.gravit.launchserver.socket.NettyServerSocketHandler;
import ru.gravit.launchserver.socket.websocket.WebSocketService;
import ru.gravit.utils.helper.CommonHelper;
public class TestCommand extends Command {

View file

@ -11,7 +11,6 @@
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launchserver.command.basic.*;
import ru.gravit.utils.helper.LogHelper;
import ru.gravit.utils.helper.VerifyHelper;

View file

@ -1,6 +1,5 @@
package ru.gravit.launchserver.command.hash;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;

View file

@ -3,7 +3,6 @@
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;

View file

@ -13,7 +13,6 @@
import com.eclipsesource.json.JsonObject;
import com.eclipsesource.json.WriterConfig;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.LogHelper;
import ru.gravit.utils.helper.SecurityHelper;

View file

@ -23,7 +23,6 @@
import io.netty.handler.ssl.SslHandler;
import io.netty.handler.stream.ChunkedFile;
import io.netty.util.CharsetUtil;
import io.netty.util.internal.SystemPropertyUtil;
import javax.activation.MimetypesFileTypeMap;
import java.io.File;

View file

@ -3,7 +3,6 @@
import java.util.HashSet;
import java.util.Set;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.NeedGarbageCollection;
import ru.gravit.launchserver.socket.Client;

View file

@ -3,7 +3,6 @@
import java.io.IOException;
import java.util.UUID;
import ru.gravit.launchserver.socket.Client;
import ru.gravit.utils.helper.LogHelper;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.serialize.HInput;

View file

@ -6,7 +6,6 @@
import ru.gravit.launcher.serialize.SerializeLimits;
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.AuthException;
import ru.gravit.launchserver.response.Response;
import ru.gravit.launchserver.socket.Client;

View file

@ -1,21 +1,14 @@
package ru.gravit.launchserver.response.update;
import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.launcher.serialize.signed.DigestBytesHolder;
import ru.gravit.launcher.serialize.signed.SignedBytesHolder;
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.manangers.SessionManager;
import ru.gravit.launchserver.response.Response;
import ru.gravit.launchserver.socket.Client;
import ru.gravit.utils.helper.SecurityHelper;
import java.io.IOException;
import java.security.SignatureException;
import java.util.Arrays;
import java.util.Collection;
public final class LauncherResponse extends Response {

View file

@ -1,16 +1,11 @@
package ru.gravit.launchserver.response.update;
import java.io.IOException;
import java.util.Collection;
import ru.gravit.launcher.serialize.signed.DigestBytesHolder;
import ru.gravit.launchserver.binary.LauncherBinary;
import ru.gravit.utils.helper.SecurityHelper;
import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.launcher.serialize.signed.SignedBytesHolder;
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.response.Response;

View file

@ -12,17 +12,14 @@
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.codec.json.JsonObjectDecoder;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.ssl.LauncherKeyStore;
import ru.gravit.launcher.ssl.LauncherTrustManager;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.fileserver.FileServerHandler;
import ru.gravit.launchserver.response.Response;
import ru.gravit.launchserver.socket.websocket.WebSocketFrameHandler;
import ru.gravit.launchserver.socket.websocket.WebSocketIndexPageHandler;
import ru.gravit.utils.helper.CommonHelper;
import ru.gravit.utils.helper.LogHelper;
import ru.gravit.utils.helper.VerifyHelper;

View file

@ -10,7 +10,6 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.CommonHelper;
import ru.gravit.utils.helper.LogHelper;
import ru.gravit.launcher.managers.GarbageManager;

View file

@ -13,6 +13,7 @@ public JsonResponseAdapter(WebSocketService service) {
this.service = service;
}
@SuppressWarnings("unchecked")
@Override
public JsonResponseInterface deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
String typename = json.getAsJsonObject().getAsJsonPrimitive(PROP_NAME).getAsString();

View file

@ -1,7 +1,6 @@
package ru.gravit.launchserver.socket.websocket.json;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.websocketx.WebSocketFrame;
import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.socket.websocket.WebSocketService;

View file

@ -2,7 +2,6 @@
import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.command.handler.CommandHandler;
import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.socket.websocket.WebSocketService;
import ru.gravit.launchserver.socket.websocket.json.JsonResponseInterface;

View file

@ -8,8 +8,6 @@
import ru.gravit.launchserver.socket.websocket.json.JsonResponseInterface;
import ru.gravit.utils.helper.LogHelper;
import java.util.UUID;
public class JoinServerResponse implements JsonResponseInterface {
public String serverID;
public String accessToken;

View file

@ -4,7 +4,6 @@
import java.util.Objects;
import java.util.UUID;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.profiles.Texture;
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;

View file

@ -6,7 +6,6 @@
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.profiles.Texture;
import ru.gravit.launcher.serialize.config.ConfigObject;

View file

@ -12,28 +12,31 @@
<!-- DrLeonardo Design -->
<Pane fx:id="layout" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" visible="true" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane fx:id="layout" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"
prefHeight="400.0" prefWidth="600.0"
xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<stylesheets>
<URL value="@login.css"/>
</stylesheets>
<ImageView id="background" fitHeight="400.0" fitWidth="600.0">
<image>
<Image preserveRatio="true" smooth="true" url="@images/background.png" />
</image>
<Image preserveRatio="true" smooth="true" url="@images/background.png"/>
</ImageView>
<Pane id="authPane" layoutX="1.0" layoutY="2.0" prefHeight="400.0" prefWidth="600.0">
<children>
<TextField id="login" alignment="CENTER" layoutX="175.0" layoutY="144.0" prefHeight="45.0" prefWidth="233.0" promptText="Логин" />
<PasswordField id="password" alignment="CENTER" layoutX="175.0" layoutY="197.0" prefHeight="45.0" prefWidth="233.0" promptText="Пароль" />
<Button id="goAuth" layoutX="159.0" layoutY="319.0" mnemonicParsing="false" opacity="1.0" prefHeight="45.0" prefWidth="267.0" styleClass="btn" text="ВОЙТИ" visible="true" />
<CheckBox id="rememberchb" fx:id="savePassword" contentDisplay="CENTER" layoutX="224.0" layoutY="291.0" prefHeight="17.0" prefWidth="137.0" text="Сохранить пароль" textFill="#dadada" />
<Hyperlink id="link" fx:id="link" layoutY="371.0" prefHeight="30.0" prefWidth="158.0" textAlignment="CENTER" />
<Button id="discord_url" layoutX="278.0" layoutY="373.0" minHeight="16.0" minWidth="28.0" mnemonicParsing="false" prefHeight="16.0" prefWidth="28.0" text="" />
</children>
<TextField id="login" alignment="CENTER" layoutX="175.0" layoutY="144.0" prefHeight="45.0" prefWidth="233.0"
promptText="Логин"/>
<PasswordField id="password" alignment="CENTER" layoutX="175.0" layoutY="197.0" prefHeight="45.0"
prefWidth="233.0" promptText="Пароль"/>
<Button id="goAuth" layoutX="159.0" layoutY="319.0" mnemonicParsing="false" prefHeight="45.0" prefWidth="267.0"
styleClass="btn" text="ВОЙТИ"/>
<CheckBox id="rememberchb" fx:id="savePassword" contentDisplay="CENTER" layoutX="224.0" layoutY="291.0"
prefHeight="17.0" prefWidth="137.0" text="Сохранить пароль" textFill="#dadada"/>
<Hyperlink id="link" fx:id="link" layoutY="371.0" prefHeight="30.0" prefWidth="158.0" textAlignment="CENTER"/>
<Button id="discord_url" layoutX="278.0" layoutY="373.0" minHeight="16.0" minWidth="28.0" mnemonicParsing="false"
prefHeight="16.0" prefWidth="28.0"/>
</Pane>
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false" />
<Button id="hidebtn" focusTraversable="false" layoutX="535.0" layoutY="2.0" minHeight="25.0" minWidth="35.0" prefHeight="25.0" prefWidth="25.0" />
<Button id="exitbtn" focusTraversable="false" layoutX="574.0" layoutY="2.0" minHeight="25.0" minWidth="20.0" prefHeight="25.0" prefWidth="20.0" />
</children>
<stylesheets>
<URL value="@login.css" />
</stylesheets>
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false"/>
<Button id="hidebtn" focusTraversable="false" layoutX="535.0" layoutY="2.0" minHeight="25.0" minWidth="35.0"
prefHeight="25.0" prefWidth="25.0"/>
<Button id="exitbtn" focusTraversable="false" layoutX="574.0" layoutY="2.0" minHeight="25.0" minWidth="20.0"
prefHeight="25.0" prefWidth="20.0"/>
</Pane>

View file

@ -13,74 +13,79 @@
<!-- DrLeonardo Design -->
<Pane fx:id="layout" maxHeight="-1.0" maxWidth="-1.0" prefHeight="400.0" prefWidth="600.0" visible="true" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane fx:id="layout" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
xmlns:fx="http://javafx.com/fxml/1">
<stylesheets>
<URL value="@mainmenu.css"/>
</stylesheets>
<ImageView id="sl_background" fitHeight="400.0" fitWidth="600.0">
<image>
<Image preserveRatio="true" smooth="true" url="@images/mainmenu/background.png" />
</image>
<Image preserveRatio="true" smooth="true" url="@images/mainmenu/background.png"/>
</ImageView>
<Pane id="serverPane" prefHeight="400.0" prefWidth="600.0">
<children>
<Button id="hidebtn" focusTraversable="false" layoutX="545.0" layoutY="2.0" minHeight="25.0" minWidth="20.0" prefHeight="25.0" prefWidth="25.0" textAlignment="CENTER" />
<Button id="exitbtn" alignment="CENTER" contentDisplay="CENTER" focusTraversable="false" layoutX="572.0" layoutY="2.0" minHeight="25.0" minWidth="20.0" prefHeight="25.0" prefWidth="25.0" rotate="360.0" textAlignment="CENTER" translateX="0.0" />
<ScrollPane id="serverlist" hbarPolicy="NEVER" layoutX="0.0" layoutY="27.0" prefHeight="306.0" prefWidth="171.0" visible="true">
<content>
<FlowPane id="servercontainer" alignment="TOP_LEFT" columnHalignment="LEFT" focusTraversable="false" hgap="0.0" maxHeight="0.0" maxWidth="0.0" orientation="HORIZONTAL" prefHeight="-1.0" prefWidth="161.0" prefWrapLength="0.0" rowValignment="TOP" vgap="7.0" visible="true">
<Button id="hidebtn" focusTraversable="false" layoutX="545.0" layoutY="2.0" minHeight="25.0" minWidth="20.0"
prefHeight="25.0" prefWidth="25.0" textAlignment="CENTER"/>
<Button id="exitbtn" alignment="CENTER" contentDisplay="CENTER" focusTraversable="false" layoutX="572.0"
layoutY="2.0" minHeight="25.0" minWidth="20.0" prefHeight="25.0" prefWidth="25.0" rotate="360.0"
textAlignment="CENTER"/>
<ScrollPane id="serverlist" hbarPolicy="NEVER" layoutY="27.0" prefHeight="306.0" prefWidth="171.0">
<FlowPane id="servercontainer" maxHeight="0.0" maxWidth="0.0" prefWidth="161.0" prefWrapLength="0.0"
rowValignment="TOP" vgap="7.0">
<padding>
<Insets top="10.0" />
<Insets top="10.0"/>
</padding>
</FlowPane>
</content>
</ScrollPane>
<ScrollPane id="serverinfo" hbarPolicy="NEVER" layoutX="170.0" layoutY="71.0" pannable="true" prefHeight="234.0" prefWidth="432.0" visible="true">
<content>
<FlowPane id="" focusTraversable="false" orientation="HORIZONTAL" prefHeight="234.0" prefWidth="428.0" rowValignment="TOP" visible="true">
<ScrollPane id="serverinfo" hbarPolicy="NEVER" layoutX="170.0" layoutY="71.0" pannable="true"
prefHeight="234.0" prefWidth="432.0">
<FlowPane id="" prefHeight="234.0" prefWidth="428.0" rowValignment="TOP">
<padding>
<Insets bottom="10.0" left="15.0" top="7.0" />
<Insets bottom="10.0" left="15.0" top="7.0"/>
</padding>
<children>
<Label id="serverDescription" alignment="TOP_LEFT" contentDisplay="LEFT" nodeOrientation="LEFT_TO_RIGHT" prefHeight="213.0" prefWidth="407.0" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis magna tellus, in bibendum tortor dignissim non. Phasellus vel tincidunt nulla, eu convallis ligula. Suspendisse ut diam vestibulum, tincidunt neque ut, posuere risus. Pellentesque posuere molestie eros, quis laoreet ante ornare quis. Morbi eu tortor fermentum, iaculis risus sit amet, fringilla augue. Aenean nulla purus, rutrum non sapien et, convallis tincidunt purus. Vivamus a eros pulvinar, dignissim leo lacinia, sodales nulla. Aliquam tortor augue, cursus a rutrum viverra, consequat non tellus. Donec porta nisl sed quam dictum commodo. Sed et vulputate dolor. Morbi ultrices justo vitae convallis semper. Donec sodales velit vel velit faucibus, et scelerisque felis finibus. Sed rutrum lacinia mauris, porta cursus mauris tempor eu. Duis turpis nulla, dictum vitae commodo rhoncus, pretium in turpis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos." textFill="#d3d3d3" wrapText="true">
<Label id="serverDescription" alignment="TOP_LEFT" nodeOrientation="LEFT_TO_RIGHT" prefHeight="213.0"
prefWidth="407.0"
text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis magna tellus, in bibendum tortor dignissim non. Phasellus vel tincidunt nulla, eu convallis ligula. Suspendisse ut diam vestibulum, tincidunt neque ut, posuere risus. Pellentesque posuere molestie eros, quis laoreet ante ornare quis. Morbi eu tortor fermentum, iaculis risus sit amet, fringilla augue. Aenean nulla purus, rutrum non sapien et, convallis tincidunt purus. Vivamus a eros pulvinar, dignissim leo lacinia, sodales nulla. Aliquam tortor augue, cursus a rutrum viverra, consequat non tellus. Donec porta nisl sed quam dictum commodo. Sed et vulputate dolor. Morbi ultrices justo vitae convallis semper. Donec sodales velit vel velit faucibus, et scelerisque felis finibus. Sed rutrum lacinia mauris, porta cursus mauris tempor eu. Duis turpis nulla, dictum vitae commodo rhoncus, pretium in turpis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos."
textFill="#d3d3d3" wrapText="true">
<font>
<Font size="14.0" fx:id="x3" />
<Font size="14.0" fx:id="x3"/>
</font>
</Label>
</children>
</FlowPane>
</content>
</ScrollPane>
<Pane id="serverentrance" layoutX="170.0" layoutY="27.0" prefHeight="372.0" prefWidth="430.0">
<children>
<Button id="serverLaunch" layoutX="180.0" layoutY="294.0" mnemonicParsing="false" prefHeight="60.0" prefWidth="182.0" text="ИГРАТЬ">
<Button id="serverLaunch" layoutX="180.0" layoutY="294.0" mnemonicParsing="false" prefHeight="60.0"
prefWidth="182.0" text="ИГРАТЬ">
<font>
<Font size="22.0" />
<Font size="22.0"/>
</font>
</Button>
<Button id="clientbtn" layoutX="363.0" layoutY="294.0" mnemonicParsing="false" prefHeight="60.0" prefWidth="50.0" text="" />
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="14.0" layoutY="312.0" opacity="0.61" prefHeight="25.0" prefWidth="153.0" text="12/100" textAlignment="RIGHT" textFill="WHITE">
<Button id="clientbtn" layoutX="363.0" layoutY="294.0" mnemonicParsing="false" prefHeight="60.0"
prefWidth="50.0"/>
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="14.0" layoutY="312.0"
opacity="0.61" prefHeight="25.0" prefWidth="153.0" text="12/100" textAlignment="RIGHT"
textFill="WHITE">
<font>
<Font name="System Bold" size="16.0" />
<Font name="System Bold" size="16.0"/>
</font>
</Label>
<Label id="serverLabel" layoutX="2.0" layoutY="11.0" prefHeight="40.0" prefWidth="274.0" text="СЕРВЕР IFARM">
<Label id="serverLabel" layoutX="2.0" layoutY="11.0" prefHeight="40.0" prefWidth="274.0"
text="СЕРВЕР IFARM">
<font>
<Font name="System Bold" size="18.0" />
<Font name="System Bold" size="18.0"/>
</font>
<padding>
<Insets left="14.0" />
<Insets left="14.0"/>
</padding>
</Label>
<Button id="discord_url" alignment="BOTTOM_CENTER" contentDisplay="CENTER" layoutX="386.0" layoutY="23.0" minHeight="16.0" minWidth="28.0" mnemonicParsing="false" prefHeight="16.0" prefWidth="28.0" text="" textAlignment="CENTER" />
</children>
<Button id="discord_url" alignment="BOTTOM_CENTER" contentDisplay="CENTER" layoutX="386.0" layoutY="23.0"
minHeight="16.0" minWidth="28.0" mnemonicParsing="false" prefHeight="16.0" prefWidth="28.0"
textAlignment="CENTER"/>
</Pane>
<Button id="logoutbtn" layoutX="19.0" layoutY="350.0" mnemonicParsing="false" prefHeight="31.0" prefWidth="133.0" styleClass="logoutbtn" text="Выйти" />
<Button id="settingsbtn" alignment="CENTER" contentDisplay="CENTER" layoutX="518.0" layoutY="2.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="25.0" text="" textAlignment="CENTER" />
</children>
<Button id="logoutbtn" layoutX="19.0" layoutY="350.0" mnemonicParsing="false" prefHeight="31.0"
prefWidth="133.0" styleClass="logoutbtn" text="Выйти"/>
<Button id="settingsbtn" alignment="CENTER" contentDisplay="CENTER" layoutX="518.0" layoutY="2.0"
mnemonicParsing="false" prefHeight="25.0" prefWidth="25.0"
textAlignment="CENTER"/>
</Pane>
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false" />
</children>
<stylesheets>
<URL value="@mainmenu.css" />
</stylesheets>
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false"/>
</Pane>

View file

@ -9,19 +9,15 @@
<!-- DrLeonardo Design -->
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane id="holder" layoutX="171.0" layoutY="28.0" prefHeight="372.0" prefWidth="429.0">
<children>
<Button fx:id="apply" defaultButton="true" layoutX="315.0" layoutY="333.0" prefHeight="25.0" prefWidth="100.0" text="Применить" />
<FlowPane id="holderpane" orientation="HORIZONTAL">
<children>
</children>
</FlowPane>
</children>
</Pane>
</children>
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
xmlns:fx="http://javafx.com/fxml/1">
<stylesheets>
<URL value="@options.css" />
<URL value="@options.css"/>
</stylesheets>
<Pane id="holder" layoutX="171.0" layoutY="28.0" prefHeight="372.0" prefWidth="429.0">
<Button fx:id="apply" defaultButton="true" layoutX="315.0" layoutY="333.0" prefHeight="25.0"
prefWidth="100.0" text="Применить"/>
<FlowPane id="holderpane">
</FlowPane>
</Pane>
</Pane>

View file

@ -8,23 +8,20 @@
<!-- DrLeonardo Design -->
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
xmlns:fx="http://javafx.com/fxml/1">
<stylesheets>
<URL value="@processing.css"/>
</stylesheets>
<ImageView fitHeight="161.0" fitWidth="161.0" layoutX="220.0" layoutY="94.0" y="-6.0">
<image>
<Image url="@../../images/icons/loading.gif" />
</image>
<Image url="@../../images/icons/loading.gif"/>
</ImageView>
<!-- Icon image -->
<ImageView id="spinner" fx:id="spinner" blendMode="COLOR_BURN" fitHeight="79.0" fitWidth="79.0" layoutX="261.0" layoutY="116.0" preserveRatio="true">
<image>
<Image url="@error.png" />
</image>
<ImageView id="spinner" fx:id="spinner" blendMode="COLOR_BURN" fitHeight="79.0" fitWidth="79.0" layoutX="261.0"
layoutY="116.0" preserveRatio="true">
<Image url="@error.png"/>
</ImageView>
<!-- Description -->
<Label fx:id="description" alignment="CENTER" contentDisplay="CENTER" layoutX="159.0" layoutY="249.0" prefHeight="64.0" prefWidth="283.0" text="..." textAlignment="CENTER" />
</children>
<stylesheets>
<URL value="@processing.css" />
</stylesheets>
<Label fx:id="description" alignment="CENTER" contentDisplay="CENTER" layoutX="159.0" layoutY="249.0"
prefHeight="64.0" prefWidth="283.0" text="..." textAlignment="CENTER"/>
</Pane>

View file

@ -14,36 +14,46 @@
<!-- DrLeonardo Design -->
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane id="holder" layoutY="28.0" prefHeight="372.0" prefWidth="600.0">
<children>
<CheckBox fx:id="autoEnter" layoutX="14.0" layoutY="80.0" text="Автовход на сервер" />
<CheckBox fx:id="fullScreen" layoutX="13.0" layoutY="185.0" text="Клиент в полный экран" />
<!-- RAM settings -->
<TextFlow layoutX="20.0" layoutY="70.0" />
<Slider fx:id="ramSlider" layoutX="18.0" layoutY="36.0" prefHeight="3.0" prefWidth="563.0" />
<Separator layoutY="65.0" prefHeight="1.0" prefWidth="600.0" />
<Label id="" alignment="CENTER_LEFT" layoutX="18.0" layoutY="16.0" prefHeight="17.0" prefWidth="217.0" text="Лимит памяти для клиента ОЗУ (RAM)" textFill="#2f2f2f" />
<!-- RAM settings -->
<Button fx:id="deleteDir" layoutX="15.0" layoutY="333.0" prefHeight="25.0" prefWidth="245.0" text="Очистить данные игровых клиентов" textAlignment="CENTER" wrapText="true">
<font>
<Font name="System Bold" size="12.0" />
</font></Button>
<Button fx:id="changeDir" layoutX="14.0" layoutY="229.0" prefHeight="25.0" prefWidth="200.0" text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true" />
<Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="215.0" layoutY="230.0" prefHeight="23.0" prefWidth="371.0" text="C:/Users" wrapText="true" />
<Button fx:id="apply" defaultButton="true" layoutX="486.0" layoutY="335.0" prefHeight="23.0" prefWidth="100.0" text="Применить" />
<CheckBox id="debug" layoutX="13.0" layoutY="124.0" text="Режим Откладки" />
<Text fill="#8c8c8c" layoutX="38.0" layoutY="95.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер" wrappingWidth="533.0000102519989" y="15.0" />
<Text fill="#8c8c8c" layoutX="38.0" layoutY="139.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации" wrappingWidth="533.0000016447157" y="15.0" />
<Text fill="#8c8c8c" layoutX="38.0" layoutY="200.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме" wrappingWidth="533.0000102519989" y="15.0" />
<Label fx:id="ramLabel" alignment="CENTER_RIGHT" layoutX="481.0" layoutY="17.0" prefWidth="100.0" text="RAM" />
</children>
</Pane>
</children>
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
xmlns:fx="http://javafx.com/fxml/1">
<stylesheets>
<URL value="@settings.css" />
<URL value="@settings.css"/>
</stylesheets>
<Pane id="holder" layoutY="28.0" prefHeight="372.0" prefWidth="600.0">
<CheckBox fx:id="autoEnter" layoutX="14.0" layoutY="80.0" text="Автовход на сервер"/>
<CheckBox fx:id="fullScreen" layoutX="13.0" layoutY="185.0" text="Клиент в полный экран"/>
<!-- RAM settings -->
<TextFlow layoutX="20.0" layoutY="70.0"/>
<Slider fx:id="ramSlider" layoutX="18.0" layoutY="36.0" prefHeight="3.0" prefWidth="563.0"/>
<Separator layoutY="65.0" prefHeight="1.0" prefWidth="600.0"/>
<Label id="" layoutX="18.0" layoutY="16.0" prefHeight="17.0" prefWidth="217.0"
text="Лимит памяти для клиента ОЗУ (RAM)" textFill="#2f2f2f"/>
<!-- RAM settings -->
<Button fx:id="deleteDir" layoutX="15.0" layoutY="333.0" prefHeight="25.0" prefWidth="245.0"
text="Очистить данные игровых клиентов" textAlignment="CENTER" wrapText="true">
<font>
<Font name="System Bold" size="12.0"/>
</font>
</Button>
<Button fx:id="changeDir" layoutX="14.0" layoutY="229.0" prefHeight="25.0" prefWidth="200.0"
text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true"/>
<Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="215.0" layoutY="230.0" prefHeight="23.0"
prefWidth="371.0" text="C:/Users" wrapText="true"/>
<Button fx:id="apply" defaultButton="true" layoutX="486.0" layoutY="335.0" prefHeight="23.0"
prefWidth="100.0" text="Применить"/>
<CheckBox id="debug" layoutX="13.0" layoutY="124.0" text="Режим Откладки"/>
<Text fill="#8c8c8c" layoutX="38.0" layoutY="95.0" strokeType="OUTSIDE" strokeWidth="0.0"
text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер"
wrappingWidth="533.0000102519989" y="15.0"/>
<Text fill="#8c8c8c" layoutX="38.0" layoutY="139.0" strokeType="OUTSIDE" strokeWidth="0.0"
text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации"
wrappingWidth="533.0000016447157" y="15.0"/>
<Text fill="#8c8c8c" layoutX="38.0" layoutY="200.0" strokeType="OUTSIDE" strokeWidth="0.0"
text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме"
wrappingWidth="533.0000102519989" y="15.0"/>
<Label fx:id="ramLabel" alignment="CENTER_RIGHT" layoutX="481.0" layoutY="17.0" prefWidth="100.0"
text="RAM"/>
</Pane>
</Pane>

View file

@ -10,28 +10,25 @@
<!-- DrLeonardo Design -->
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
xmlns:fx="http://javafx.com/fxml/1">
<stylesheets>
<URL value="@update.css"/>
</stylesheets>
<ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../images/downloader/background.png" />
</image>
<Image url="@../../images/downloader/background.png"/>
</ImageView>
<Label fx:id="description" layoutX="12.0" layoutY="267.0" prefHeight="98.0" prefWidth="576.0" text="..." textFill="WHITE" />
<ProgressBar fx:id="progress" disable="false" layoutX="-1.0" layoutY="376.0" opacity="1.0" prefHeight="24.0" prefWidth="600.0" progress="1.0" style="" />
<Label fx:id="description" layoutX="12.0" layoutY="267.0" prefHeight="98.0" prefWidth="576.0" text="..."
textFill="WHITE"/>
<ProgressBar fx:id="progress" layoutX="-1.0" layoutY="376.0" prefHeight="24.0" prefWidth="600.0" progress="1.0"/>
<!-- Update controls -->
<Label fx:id="utitle" alignment="TOP_LEFT" layoutX="15.0" layoutY="236.0" prefHeight="30.0" prefWidth="470.0" text="Обновление..." textFill="WHITE">
<Label fx:id="utitle" alignment="TOP_LEFT" layoutX="15.0" layoutY="236.0" prefHeight="30.0" prefWidth="470.0"
text="Обновление..." textFill="WHITE">
<font>
<Font name="System Bold" size="20.0" />
<Font name="System Bold" size="20.0"/>
</font>
</Label>
<ImageView fitHeight="160.0" fitWidth="160.0" layoutX="219.0" layoutY="70.0" y="-6.0">
<image>
<Image url="@../../images/icons/loading.gif" />
</image>
<Image url="@../../images/icons/loading.gif"/>
</ImageView>
</children>
<stylesheets>
<URL value="@update.css" />
</stylesheets>
</Pane>

View file

@ -1,10 +1,8 @@
package ru.gravit.launcher;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import cpw.mods.fml.SafeExitJVMLegacy;
import net.minecraftforge.fml.SafeExitJVM;
@ -12,7 +10,6 @@
import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.utils.NativeJVMHalt;
import ru.gravit.utils.helper.*;
import ru.gravit.utils.helper.SecurityHelper.DigestAlgorithm;
import ru.zaxar163.GuardBind;
public class AvanguardStarter {

View file

@ -5,7 +5,6 @@
import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.LauncherConfig;
import ru.gravit.utils.helper.JVMHelper;
import ru.gravit.utils.helper.SecurityHelper;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.profiles.PlayerProfile;

View file

@ -1,12 +1,10 @@
package ru.gravit.launcher.request.auth;
import jdk.nashorn.internal.ir.RuntimeNode;
import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.request.Request;
import ru.gravit.launcher.request.RequestType;
import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.utils.helper.IOHelper;
import java.net.InetSocketAddress;

View file

@ -3,12 +3,10 @@
import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.LauncherConfig;
import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launcher.request.Request;
import ru.gravit.launcher.request.RequestType;
import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.JVMHelper;
import ru.gravit.utils.helper.LogHelper;
@ -17,7 +15,6 @@
import java.io.IOException;
import java.nio.file.Path;
import java.security.SignatureException;
import java.security.interfaces.RSAPublicKey;
import java.util.ArrayList;
import java.util.List;

View file

@ -9,8 +9,6 @@
import javax.websocket.OnOpen;
import javax.websocket.Session;
import ru.gravit.utils.helper.LogHelper;
/*
* public class Client {
*

View file

@ -12,6 +12,7 @@ public JsonRequestAdapter(ClientWebSocketService service) {
this.service = service;
}
@SuppressWarnings("unchecked")
@Override
public RequestInterface deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
String typename = json.getAsJsonObject().getAsJsonPrimitive(PROP_NAME).getAsString();

View file

@ -1,6 +1,5 @@
package ru.gravit.launcher.server;
import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.LogHelper;
import java.io.IOException;

View file

@ -1,6 +1,5 @@
package ru.gravit.launcher.modules;
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.utils.PublicURLClassLoader;
import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.LogHelper;

View file

@ -8,8 +8,6 @@
import java.io.IOException;
import java.security.SignatureException;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.util.Arrays;
public class DigestBytesHolder extends StreamObject {

View file

@ -21,8 +21,8 @@
public class Downloader implements Runnable {
@FunctionalInterface
public static interface Handler {
public void check(Certificate[] certs) throws IOException;
public interface Handler {
void check(Certificate[] certs) throws IOException;
}
public static final Map<String, String> requestClient = Collections.singletonMap("User-Agent",

View file

@ -19,7 +19,6 @@ public Downloader getDownloader() {
public void interrupt() {
runnable.interrupt.set(true);
while (!runnable.interrupted.get()) {
;
}
super.interrupt();
}

View file

@ -1,10 +1,7 @@
package ru.gravit.utils.helper;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.regex.Pattern;
public class EnvHelper {
public static final String[] toTest;

View file

@ -7,8 +7,6 @@
import java.lang.management.RuntimeMXBean;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.file.Path;
import java.security.cert.Certificate;
import java.util.Arrays;
import java.util.Locale;
import java.util.Map;