mirror of
https://e.coding.net/circlecloud/MiaoLobby.git
synced 2025-11-02 08:56:01 +00:00
@@ -11,7 +11,7 @@ import pw.yumc.YumCore.bukkit.P;
|
|||||||
import pw.yumc.YumCore.bukkit.compatible.C;
|
import pw.yumc.YumCore.bukkit.compatible.C;
|
||||||
|
|
||||||
public class AuthMeHook implements Listener {
|
public class AuthMeHook implements Listener {
|
||||||
MiaoLobby plugin = P.getPlugin();
|
private MiaoLobby plugin = P.getPlugin();
|
||||||
|
|
||||||
public AuthMeHook() {
|
public AuthMeHook() {
|
||||||
Bukkit.getPluginManager().registerEvents(this, P.instance);
|
Bukkit.getPluginManager().registerEvents(this, P.instance);
|
||||||
|
|||||||
@@ -25,15 +25,15 @@ import pw.yumc.YumCore.statistic.Statistics;
|
|||||||
import pw.yumc.YumCore.update.SubscribeTask;
|
import pw.yumc.YumCore.update.SubscribeTask;
|
||||||
|
|
||||||
public class MiaoLobby extends JavaPlugin implements CommandExecutor {
|
public class MiaoLobby extends JavaPlugin implements CommandExecutor {
|
||||||
public Config config;
|
Config config;
|
||||||
private final SecureRandom random = new SecureRandom();
|
private final SecureRandom random = new SecureRandom();
|
||||||
|
|
||||||
public void connect(final Player p, final String server) {
|
private void connect(final Player p, final String server) {
|
||||||
final ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
final ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||||
try {
|
try {
|
||||||
out.writeUTF("Connect");
|
out.writeUTF("Connect");
|
||||||
out.writeUTF(server);
|
out.writeUTF(server);
|
||||||
} catch (final Exception localException) {
|
} catch (final Exception ignored) {
|
||||||
}
|
}
|
||||||
p.sendPluginMessage(this, "BungeeCord", out.toByteArray());
|
p.sendPluginMessage(this, "BungeeCord", out.toByteArray());
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ public class MiaoLobby extends JavaPlugin implements CommandExecutor {
|
|||||||
new AuthMeHook();
|
new AuthMeHook();
|
||||||
}
|
}
|
||||||
new Statistics();
|
new Statistics();
|
||||||
new SubscribeTask(true, true);
|
// new SubscribeTask(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -66,7 +66,7 @@ public class MiaoLobby extends JavaPlugin implements CommandExecutor {
|
|||||||
config = new Config();
|
config = new Config();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void random(final Player player) {
|
void random(final Player player) {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
List<String> servers = new ArrayList<>(config.Servers);
|
List<String> servers = new ArrayList<>(config.Servers);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user