mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-22 18:09:06 +00:00
Hotfix for /msg tab completion on Velocity.
This commit is contained in:
parent
41852f501f
commit
c2a6548d7b
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>mineverse.Aust1n46.chat</groupId>
|
<groupId>mineverse.Aust1n46.chat</groupId>
|
||||||
<artifactId>VentureChat</artifactId>
|
<artifactId>VentureChat</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.1</version>
|
||||||
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
||||||
<scm>
|
<scm>
|
||||||
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
<url>https://bitbucket.org/Aust1n46/venturechat/src/master</url>
|
||||||
|
@ -8,6 +8,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -96,7 +97,12 @@ public class VentureChatVelocity implements VentureChatProxySource {
|
|||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onPlayerQuit(DisconnectEvent event) {
|
public void onPlayerQuit(DisconnectEvent event) {
|
||||||
updatePlayerNames();
|
// Delay sending plugin message to make sure disconnecting player is truly disconnected.
|
||||||
|
proxyServer.getScheduler().buildTask(this, () -> {
|
||||||
|
updatePlayerNames();
|
||||||
|
})
|
||||||
|
.delay(1, TimeUnit.SECONDS)
|
||||||
|
.schedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updatePlayerNames() {
|
private void updatePlayerNames() {
|
||||||
@ -112,7 +118,7 @@ public class VentureChatVelocity implements VentureChatProxySource {
|
|||||||
if(!send.isEmpty()) {
|
if(!send.isEmpty()) {
|
||||||
sendPluginMessage(send.getName(), outstream.toByteArray());
|
sendPluginMessage(send.getName(), outstream.toByteArray());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch(IllegalStateException e) {
|
catch(IllegalStateException e) {
|
||||||
sendConsoleMessage("Velocity being finicky with DisconnectEvent.");
|
sendConsoleMessage("Velocity being finicky with DisconnectEvent.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user