Skip to content

Commit

Permalink
Add support for 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinecraft committed Jan 12, 2024
1 parent 7c709bb commit 085bf4c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
12 changes: 6 additions & 6 deletions pom.xml
Expand Up @@ -6,7 +6,7 @@

<groupId>Minetrax</groupId>
<artifactId>Minetrax</artifactId>
<version>3.3.1</version>
<version>3.5.0</version>
<packaging>jar</packaging>

<name>Minetrax</name>
Expand Down Expand Up @@ -95,7 +95,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.0.23.Final</version>
<version>4.1.86.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -106,8 +106,8 @@
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.18.2-R0.1-SNAPSHOT</version>
<artifactId>spigot-api</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -127,14 +127,14 @@
<artifactId>venturechat</artifactId>
<version>2.23.2</version>
<scope>system</scope>
<systemPath>C:/Users/zisha/Desktop/Wurky/MineTrax/Plugin Development/Plugins/VentureChat-2.23.2.jar</systemPath>
<systemPath>D:/Wurky/MineTrax/Plugin Development/Plugins/VentureChat-2.23.2.jar</systemPath>
</dependency>
<dependency>
<groupId>io.signality</groupId>
<artifactId>EpicCore</artifactId>
<version>1.6</version>
<scope>system</scope>
<systemPath>C:/Users/zisha/Desktop/Wurky/MineTrax/Plugin Development/Plugins/EpicCore-1.6.jar</systemPath>
<systemPath>D:/Wurky/MineTrax/Plugin Development/Plugins/EpicCore-1.6.jar</systemPath>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/xinecraft/Minetrax.java
Expand Up @@ -314,10 +314,9 @@ public void onEnable() {
}
if (isPlayerIntelEnabled) {
getServer().getScheduler().runTaskTimerAsynchronously(this, new PlayerIntelReportTask(), 5 * 60 * 20L, 5 * 60 * 20L); // every 5 minutes
getServer().getScheduler().runTaskTimerAsynchronously(this, new PlayerAfkAndWorldIntelTrackerTask(), 20L, 20L); // Run every seconds
}

getServer().getScheduler().runTaskTimerAsynchronously(this, new PlayerAfkAndWorldIntelTrackerTask(), 20L, 20L); // Run every seconds

// Setup PlaceholderAPI
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
getLogger().info("Hooking into PlaceholderAPI.");
Expand Down
Expand Up @@ -21,7 +21,11 @@ private void addJoinAddressToCache(PlayerLoginEvent event) {

String address = event.getHostname();
if (!address.isEmpty()) {
address = address.substring(0, address.lastIndexOf(':'));
int endIndex = address.lastIndexOf(':');
if (endIndex == -1) {
endIndex = address.length();
}
address = address.substring(0, endIndex);
if (address.contains("\u0000")) {
address = address.substring(0, address.indexOf('\u0000'));
}
Expand All @@ -30,7 +34,6 @@ private void addJoinAddressToCache(PlayerLoginEvent event) {
Minetrax.getPlugin().joinAddressCache.put(playerUUID.toString(), address);
}
} catch(Exception e) {
// TODO Remove
e.printStackTrace();
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/xinecraft/utils/VersionUtil.java
Expand Up @@ -6,6 +6,7 @@
public class VersionUtil {
private static final Map<Integer, String> protocolToVersion = new HashMap<>();
static {
protocolToVersion.put(765, "1.20");
protocolToVersion.put(764, "1.20");
protocolToVersion.put(763, "1.20");

Expand Down

0 comments on commit 085bf4c

Please sign in to comment.