geforkt von SteamWar/BungeeCore
Revert some stuff
Dieser Commit ist enthalten in:
Ursprung
7b5ce77e93
Commit
6b8d46d75a
@ -51,8 +51,6 @@ public class Fabric extends BasicListener {
|
||||
private static final Map<ProxiedPlayer, Integer> checkedPlayers = new HashMap<>();
|
||||
private static final Map<ProxiedPlayer, Long> expectPluginMessage = new HashMap<>();
|
||||
|
||||
private static final Object OBJECT = new Object();
|
||||
|
||||
{
|
||||
neededMods.add("java");
|
||||
neededMods.add("minecraft");
|
||||
@ -60,7 +58,7 @@ public class Fabric extends BasicListener {
|
||||
neededMods.add("steamwarmodsender");
|
||||
|
||||
BungeeCord.getInstance().getScheduler().schedule(BungeeCore.get(), () -> {
|
||||
synchronized (OBJECT) {
|
||||
synchronized (expectPluginMessage) {
|
||||
for (Map.Entry<ProxiedPlayer, Long> entry : expectPluginMessage.entrySet()) {
|
||||
if (System.currentTimeMillis() - entry.getValue() > TimeUnit.SECONDS.toMillis(20)) {
|
||||
banPlayer(SteamwarUser.get(entry.getKey()), entry.getKey());
|
||||
@ -84,7 +82,7 @@ public class Fabric extends BasicListener {
|
||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||
|
||||
if (!checkedPlayers.containsKey(player)) {
|
||||
synchronized (OBJECT) {
|
||||
synchronized (expectPluginMessage) {
|
||||
if (expectPluginMessage.containsKey(player)) {
|
||||
banPlayer(user, player);
|
||||
return;
|
||||
@ -156,7 +154,7 @@ public class Fabric extends BasicListener {
|
||||
@EventHandler
|
||||
public void onServerSwitchEvent(ServerSwitchEvent e) {
|
||||
if (e.getFrom() == null) return;
|
||||
synchronized (OBJECT) {
|
||||
synchronized (expectPluginMessage) {
|
||||
expectPluginMessage.put(e.getPlayer(), System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
@ -189,8 +187,8 @@ public class Fabric extends BasicListener {
|
||||
}
|
||||
|
||||
public static void remove(ProxiedPlayer player) {
|
||||
synchronized (OBJECT) {
|
||||
checkedPlayers.remove(player);
|
||||
checkedPlayers.remove(player);
|
||||
synchronized (expectPluginMessage) {
|
||||
expectPluginMessage.remove(player);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren