Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@

public class ClientListener extends Thread {

private CSS plugin;
private Integer heartbeat;
private String pass;
private CSS plugin;
private Integer heartbeat;
private String pass;

public ClientListener(CSS plugin, Integer heartbeat, String pass) {
this.plugin = plugin;
this.heartbeat = heartbeat;
this.pass = pass;
}
public ClientListener(CSS plugin, Integer heartbeat, String pass) {
this.plugin = plugin;
this.heartbeat = heartbeat;
this.pass = pass;
}

public void run() {
while(true) {
try {
new ClientHandler(plugin, plugin.server.accept(), heartbeat, pass).start();
} catch(IOException e) {
e.printStackTrace();
}
}
}
public void run() {
while (true) {
try {
plugin.getExecutorService().execute(new ClientHandler(plugin, plugin.server.accept(), heartbeat, pass));
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import net.md_5.bungee.api.connection.ProxiedPlayer;

public class CommandThread extends Thread {
public class CommandThread implements Runnable {

private CSS plugin;
private ProxiedPlayer player;
Expand All @@ -29,7 +29,7 @@ public void run() {
return;
} catch(IllegalStateException e1) {
try {
sleep(1000);
Thread.sleep(1000);
} catch(InterruptedException e2) {
e2.printStackTrace();
}
Expand Down