diff --git a/Emulator/pom.xml b/Emulator/pom.xml index d22d122e..360458bf 100644 --- a/Emulator/pom.xml +++ b/Emulator/pom.xml @@ -10,39 +10,27 @@ UTF-8 - - -Xdoclint:none + 21 + 21 - - - java8-doclint-disabled - - [1.8,) - - - -Xdoclint:none - - - - - org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.13.0 - 16 - 16 + 19 + 19 + 21 org.apache.maven.plugins maven-assembly-plugin - 3.3.0 + 3.7.1 jar-with-dependencies @@ -67,9 +55,9 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.10.1 - -Xdoclint:none + none public @@ -81,10 +69,6 @@ central https://repo1.maven.org/maven2/ - - mvnrepo - https://mvnrepository.com/ - @@ -92,21 +76,21 @@ io.netty netty-all - 4.1.49.Final + 4.1.115.Final com.google.code.gson gson - 2.8.6 + 2.11.0 - mysql - mysql-connector-java - 8.0.22 + com.mysql + mysql-connector-j + 9.1.0 runtime @@ -118,21 +102,23 @@ compile - + com.zaxxer HikariCP - 3.4.3 + 6.2.1 compile + org.apache.commons commons-lang3 - 3.10 + 3.17.0 compile + org.apache.commons commons-math3 @@ -140,30 +126,41 @@ compile + org.jsoup jsoup - 1.13.1 + 1.18.3 compile + + + org.slf4j + slf4j-api + 2.0.16 + + + ch.qos.logback logback-classic - 1.2.3 + 1.5.15 compile + org.fusesource.jansi jansi - 1.18 + 2.4.1 + joda-time joda-time - 2.10.6 + 2.13.0 \ No newline at end of file diff --git a/Emulator/src/main/java/com/eu/habbo/Emulator.java b/Emulator/src/main/java/com/eu/habbo/Emulator.java index c8c0c995..7a3883af 100644 --- a/Emulator/src/main/java/com/eu/habbo/Emulator.java +++ b/Emulator/src/main/java/com/eu/habbo/Emulator.java @@ -97,7 +97,7 @@ public final class Emulator { appender.start(); } - Locale.setDefault(new Locale("en")); + Locale.setDefault(Locale.of("en")); setBuild(); Emulator.stopped = false; ConsoleCommand.load(); diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java index 9e21c1fc..55a6a120 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java @@ -53,7 +53,7 @@ public class CommandHandler { public static void addCommand(Class command) { try { //command.getConstructor().setAccessible(true); - addCommand(command.newInstance()); + addCommand(command.getDeclaredConstructor().newInstance()); LOGGER.debug("Added command: {}", command.getName()); } catch (Exception e) { LOGGER.error("Caught exception", e); diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/items/YoutubeManager.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/items/YoutubeManager.java index e710c207..0ca98b54 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/items/YoutubeManager.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/items/YoutubeManager.java @@ -14,6 +14,7 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.net.URI; import java.net.URL; import java.sql.Connection; import java.sql.PreparedStatement; @@ -130,7 +131,7 @@ public class YoutubeManager { if(apiKey.isEmpty()) return null; YoutubePlaylist playlist; - URL playlistInfo = new URL("https://youtube.googleapis.com/youtube/v3/playlists?part=snippet&id=" + playlistId + "&maxResults=1&key=" + apiKey); + URL playlistInfo = URI.create("https://youtube.googleapis.com/youtube/v3/playlists?part=snippet&id=" + playlistId + "&maxResults=1&key=" + apiKey).toURL(); HttpsURLConnection playlistCon = (HttpsURLConnection) playlistInfo.openConnection(); if (playlistCon.getResponseCode() != 200) { InputStream errorInputStream = playlistCon.getErrorStream(); @@ -164,9 +165,9 @@ public class YoutubeManager { URL playlistItems; if (nextPageToken.isEmpty()) { - playlistItems = new URL("https://youtube.googleapis.com/youtube/v3/playlistItems?part=snippet%2Cstatus&playlistId=" + playlistId + "&maxResults=50&key=" + apiKey); + playlistItems = URI.create("https://youtube.googleapis.com/youtube/v3/playlistItems?part=snippet%2Cstatus&playlistId=" + playlistId + "&maxResults=50&key=" + apiKey).toURL(); } else { - playlistItems = new URL("https://youtube.googleapis.com/youtube/v3/playlistItems?part=snippet%2Cstatus&playlistId=" + playlistId + "&pageToken=" + nextPageToken + "&maxResults=50&key=" + apiKey); + playlistItems = URI.create("https://youtube.googleapis.com/youtube/v3/playlistItems?part=snippet%2Cstatus&playlistId=" + playlistId + "&pageToken=" + nextPageToken + "&maxResults=50&key=" + apiKey).toURL(); } HttpsURLConnection con = (HttpsURLConnection) playlistItems.openConnection(); @@ -190,7 +191,7 @@ public class YoutubeManager { String commaSeparatedVideos = String.join(",", videoIds); - VideoItems = new URL("https://youtube.googleapis.com/youtube/v3/videos?part=contentDetails&id=" + commaSeparatedVideos + "&maxResults=50&key=" + apiKey); + VideoItems = URI.create("https://youtube.googleapis.com/youtube/v3/videos?part=contentDetails&id=" + commaSeparatedVideos + "&maxResults=50&key=" + apiKey).toURL(); HttpsURLConnection con1 = (HttpsURLConnection) VideoItems.openConnection(); InputStream is1 = con1.getInputStream(); InputStreamReader isr1 = new InputStreamReader(is1); diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/wired/highscores/WiredHighscoreManager.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/wired/highscores/WiredHighscoreManager.java index 40e73d7a..f00380ff 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/wired/highscores/WiredHighscoreManager.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/wired/highscores/WiredHighscoreManager.java @@ -29,7 +29,7 @@ public class WiredHighscoreManager { private final static String locale = (System.getProperty("user.language") != null ? System.getProperty("user.language") : "en"); private final static String country = (System.getProperty("user.country") != null ? System.getProperty("user.country") : "US"); - private final static DayOfWeek firstDayOfWeek = WeekFields.of(new Locale(locale, country)).getFirstDayOfWeek(); + private final static DayOfWeek firstDayOfWeek = WeekFields.of(Locale.of(locale, country)).getFirstDayOfWeek(); private final static DayOfWeek lastDayOfWeek = DayOfWeek.of(((firstDayOfWeek.getValue() + 5) % DayOfWeek.values().length) + 1); private final static ZoneId zoneId = ZoneId.systemDefault(); diff --git a/Emulator/src/main/java/com/eu/habbo/messages/PacketManager.java b/Emulator/src/main/java/com/eu/habbo/messages/PacketManager.java index 47077542..ab803f7c 100644 --- a/Emulator/src/main/java/com/eu/habbo/messages/PacketManager.java +++ b/Emulator/src/main/java/com/eu/habbo/messages/PacketManager.java @@ -179,7 +179,7 @@ public class PacketManager { return; } - final MessageHandler handler = handlerClass.newInstance(); + final MessageHandler handler = handlerClass.getDeclaredConstructor().newInstance(); if (handler.getRatelimit() > 0) { if (client.messageTimestamps.containsKey(handlerClass) && System.currentTimeMillis() - client.messageTimestamps.get(handlerClass) < handler.getRatelimit()) { diff --git a/Emulator/src/main/resources/logback.xml b/Emulator/src/main/resources/logback.xml index 6b298c13..7c9f1ce7 100644 --- a/Emulator/src/main/resources/logback.xml +++ b/Emulator/src/main/resources/logback.xml @@ -1,9 +1,8 @@ - false - %d{HH:mm:ss.SSS} [%-14thread] %highlight(%-5level) %cyan(%-36logger{36}) - %msg%n + %d{HH:mm:ss.SSS} [%-14thread] %-5level %-36logger{36} - %msg%n @@ -54,15 +53,11 @@ - - - + - - - + - + diff --git a/Latest_Compiled_Version/Habbo-3.6.0-jar-with-dependencies.jar b/Latest_Compiled_Version/Habbo-3.6.0-jar-with-dependencies.jar index b9c95cf5..20d61548 100644 Binary files a/Latest_Compiled_Version/Habbo-3.6.0-jar-with-dependencies.jar and b/Latest_Compiled_Version/Habbo-3.6.0-jar-with-dependencies.jar differ