Update to Spigot 1.8 and remove unused imports
This commit is contained in:
@@ -7,9 +7,7 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.World;
|
||||
@@ -23,7 +21,7 @@ public class Signs implements PluginMessageListener {
|
||||
|
||||
public void updateServerSigns() {
|
||||
try {
|
||||
if (Bukkit.getOnlinePlayers().length == 0) {
|
||||
if (Bukkit.getOnlinePlayers().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
ResultSet rs = sql.querySelect("SELECT DISTINCT value FROM coreWarpSigns WHERE type = 'server' AND server = '" + Core.getMainClass().getConfig().getString("server-name") + "'");
|
||||
@@ -37,7 +35,7 @@ public class Signs implements PluginMessageListener {
|
||||
DataOutputStream out = new DataOutputStream(b);
|
||||
out.writeUTF("PlayerCount");
|
||||
out.writeUTF(rs.getString("value"));
|
||||
Bukkit.getOnlinePlayers()[0].sendPluginMessage(Core.getMainClass(), "BungeeCord", b.toByteArray());
|
||||
Bukkit.getOnlinePlayers().iterator().next().sendPluginMessage(Core.getMainClass(), "BungeeCord", b.toByteArray());
|
||||
ResultSet rs2 = sql.querySelect("SELECT maxPlayers FROM coreServers WHERE name = LOWER('" + rs.getString("value") + "')");
|
||||
rs2.last();
|
||||
Boolean online = true;
|
||||
|
||||
Reference in New Issue
Block a user