glomc fork

This commit is contained in:
mohammed jasem alaajel 2023-01-14 12:42:08 +04:00
parent 5d995022e7
commit a58191a961
No known key found for this signature in database
5 changed files with 9 additions and 20 deletions

View File

@ -18,14 +18,10 @@ public class Messages {
1. Mojang / Microsoft api is down\040\040\040\040\040\040\040\040\040
2. Disconnecting when connection to a server faster!
3. Using cracked minecraft (if you are using cracked Minecraft please reconnect!
&6If this a mistake and you own a Minecraft account\040
&cPlease connect to &a&lreset.limework.net\040\040
&2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m""".replace("&", "§");
public final static String RESET_MESSAGE = """
&2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m &2&m
&6- &a&lGovindas Limework&6 -
&aOffline mode has been disabled &l
&cNow try reconnecting to server now!
@ -37,9 +33,6 @@ public class Messages {
&c&l============================
&c&oYou have been found using Offline Minecraft (Cracked)
&cIf this a mistake and you own a Minecraft account\s
&ePlease disconnect from the server and connect to
&eIP: p.limework.net
&c&l============================
""".replace("&", "§");

View File

@ -11,7 +11,7 @@ public interface Configuration {
AntiBot getAntiBot();
String getOnlineModeDomain();
String getOflineModeDomain();

View File

@ -6,5 +6,5 @@
"max-connections": 590,
"reset": 10
},
"online-mode-domain": "p.limework.net"
"offline-mode-domain": "cracked.glomc.net"
}

View File

@ -16,7 +16,7 @@ public class ConfigLoader implements Configuration {
private final boolean replaceSpacesWithUnderscore;
private final boolean useTheContainMethod;
private final AntiBot antiBot;
private final String onlineModeDomain;
private final String offlineModeDomain;
public ConfigLoader(File file) throws FileNotFoundException {
JsonObject jsonObject = JsonParser.parseReader(new FileReader(file)).getAsJsonObject();
@ -25,7 +25,7 @@ public class ConfigLoader implements Configuration {
this.useTheContainMethod = jsonObject.get("use-the-contain-method").getAsBoolean();
JsonObject antiBotJson = jsonObject.getAsJsonObject("simple-anti-bot");
this.antiBot = new AntiBot(antiBotJson.get("max-connections").getAsInt(), antiBotJson.get("reset").getAsLong(), TimeUnit.MINUTES);
this.onlineModeDomain = jsonObject.get("online-mode-domain").getAsString();
this.offlineModeDomain = jsonObject.get("offline-mode-domain").getAsString();
}
@Override
@ -54,7 +54,7 @@ public class ConfigLoader implements Configuration {
}
@Override
public String getOnlineModeDomain() {
return this.onlineModeDomain;
public String getOflineModeDomain() {
return this.offlineModeDomain;
}
}

View File

@ -1,7 +1,5 @@
package net.limework.gal;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.inject.Inject;
import com.velocitypowered.api.event.PostOrder;
import com.velocitypowered.api.event.Subscribe;
@ -23,10 +21,8 @@ import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;
import static net.limework.gal.utils.PlayerUUIDUtils.*;
@ -72,10 +68,10 @@ public class VelocityGalPlugin {
@Subscribe(order = PostOrder.FIRST)
public void onPreLoginEvent(PreLoginEvent event) {
if (event.getConnection().getVirtualHost().get().getHostName().equalsIgnoreCase(this.config.getOnlineModeDomain())) {
event.setResult(PreLoginEvent.PreLoginComponentResult.forceOnlineMode());
} else {
if (event.getConnection().getVirtualHost().get().getHostName().equalsIgnoreCase(this.config.getOflineModeDomain())) {
event.setResult(PreLoginEvent.PreLoginComponentResult.forceOfflineMode());
} else {
event.setResult(PreLoginEvent.PreLoginComponentResult.forceOnlineMode());
}
}