mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-22 18:09:06 +00:00
Hotfix for checking for Velocity proxy when using Paper.
This commit is contained in:
parent
f96a305085
commit
21c72bdb44
12
pom.xml
12
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>mineverse.Aust1n46.chat</groupId>
|
||||
<artifactId>VentureChat</artifactId>
|
||||
<version>3.1.2</version>
|
||||
<version>3.1.3</version>
|
||||
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
||||
<scm>
|
||||
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
||||
@ -115,8 +115,18 @@
|
||||
<id>velocity</id>
|
||||
<url>https://repo.velocitypowered.com/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://papermc.io/repo/repository/maven-public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.17.1-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
<artifactId>HikariCP</artifactId>
|
||||
|
@ -85,15 +85,20 @@ public class LoginListener implements Listener {
|
||||
mcp.addListening(ch.getName());
|
||||
}
|
||||
}
|
||||
|
||||
if(plugin.getServer().spigot().getConfig().getBoolean("settings.bungeecord")) {
|
||||
long delayInTicks = 20L;
|
||||
final MineverseChatPlayer sync = mcp;
|
||||
plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
|
||||
public void run() {
|
||||
MineverseChat.synchronize(sync, false);
|
||||
}
|
||||
}, delayInTicks);
|
||||
|
||||
try {
|
||||
if(plugin.getServer().spigot().getPaperConfig().getBoolean("settings.velocity-support.enabled") || plugin.getServer().spigot().getConfig().getBoolean("settings.bungeecord")) {
|
||||
long delayInTicks = 20L;
|
||||
final MineverseChatPlayer sync = mcp;
|
||||
plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
|
||||
public void run() {
|
||||
MineverseChat.synchronize(sync, false);
|
||||
}
|
||||
}, delayInTicks);
|
||||
}
|
||||
}
|
||||
catch(NoSuchMethodError exception) { // Thrown if server isn't Paper.
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user