From 8986f79d3e66ec5e9c33e7e4fb167d0e93472058 Mon Sep 17 00:00:00 2001 From: valentino <78624814+valekatoz@users.noreply.github.com> Date: Sun, 14 Jan 2024 22:41:21 +0100 Subject: [PATCH] patch --- src/main/java/net/kore/Kore.java | 6 +----- src/main/java/net/kore/commands/impl/KoreCommand.java | 3 +++ src/main/java/net/kore/managers/LicenseManager.java | 4 ++++ src/main/java/net/kore/modules/skyblock/PurseSpoofer.java | 1 + src/main/java/net/kore/utils/SkyblockUtils.java | 2 -- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/kore/Kore.java b/src/main/java/net/kore/Kore.java index f672c13..ac1530b 100644 --- a/src/main/java/net/kore/Kore.java +++ b/src/main/java/net/kore/Kore.java @@ -19,8 +19,6 @@ import net.kore.utils.render.shader.BlurUtils; import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.EntityJoinWorldEvent; @@ -29,8 +27,6 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.PlayerEvent; -import net.minecraftforge.fml.common.network.FMLNetworkEvent; @Mod(modid = Kore.MOD_ID, name = Kore.MOD_NAME, version = Kore.VERSION) public class Kore { @@ -136,7 +132,7 @@ public void postInit(FMLPostInitializationEvent event) { @SubscribeEvent public void onEntityJoinWorld(EntityJoinWorldEvent event) { - if (licenseManager == null && event.entity instanceof net.minecraft.client.entity.EntityPlayerSP) { + if (licenseManager == null && event.entity instanceof net.minecraft.client.entity.EntityPlayerSP) { licenseManager = new LicenseManager(); } } diff --git a/src/main/java/net/kore/commands/impl/KoreCommand.java b/src/main/java/net/kore/commands/impl/KoreCommand.java index 1553735..ea2cc86 100644 --- a/src/main/java/net/kore/commands/impl/KoreCommand.java +++ b/src/main/java/net/kore/commands/impl/KoreCommand.java @@ -25,6 +25,9 @@ public void execute(String[] args) throws Exception { // Dev test command Kore.notificationManager.showNotification("This is a notification", 2000, Notification.NotificationType.INFO); Kore.sendMessageWithPrefix("(&cDev&f) Notification executed"); + } else if(args.length > 1 && args[1].equals("disconnect")) { + Kore.sendMessageWithPrefix("(&cDev&f) You successfully disconnected from Kore"); + Kore.licenseManager.disconnect(); } else { } diff --git a/src/main/java/net/kore/managers/LicenseManager.java b/src/main/java/net/kore/managers/LicenseManager.java index 38c1f50..e3cd9fe 100644 --- a/src/main/java/net/kore/managers/LicenseManager.java +++ b/src/main/java/net/kore/managers/LicenseManager.java @@ -25,6 +25,10 @@ public boolean isPremium() { return isPremium; } + public void disconnect() { + this.isPremium = false; + } + public boolean checkLicense(String uuid) { try { URL url = new URL("https://kore.valekatoz.com/api/checkLicense.php?key="+ Base64.getEncoder().encodeToString(uuid.getBytes())); diff --git a/src/main/java/net/kore/modules/skyblock/PurseSpoofer.java b/src/main/java/net/kore/modules/skyblock/PurseSpoofer.java index b76ab7e..1bfa1b6 100644 --- a/src/main/java/net/kore/modules/skyblock/PurseSpoofer.java +++ b/src/main/java/net/kore/modules/skyblock/PurseSpoofer.java @@ -21,6 +21,7 @@ public class PurseSpoofer extends Module { public PurseSpoofer() { super("Purse Spoofer", Category.SKYBLOCK); this.addSettings(mode, coins); + this.setVersionType(VersionType.PREMIUM); } @Override diff --git a/src/main/java/net/kore/utils/SkyblockUtils.java b/src/main/java/net/kore/utils/SkyblockUtils.java index 4cbe7ae..ac56b7f 100644 --- a/src/main/java/net/kore/utils/SkyblockUtils.java +++ b/src/main/java/net/kore/utils/SkyblockUtils.java @@ -4,7 +4,6 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Ordering; import com.mojang.realmsclient.gui.ChatFormatting; -import jdk.nashorn.internal.runtime.regexp.joni.Regex; import net.kore.Kore; import net.minecraft.client.network.NetworkPlayerInfo; import net.minecraft.entity.item.EntityArmorStand; @@ -142,7 +141,6 @@ public static String getSkyblockItemID(ItemStack item) { public static SkyblockAreas currentArea = null; public static int ticks; - public static Regex areaRegex = new Regex("^(?:Area|Dungeon): ([\\w ].+)\\$"); public static Ordering playerInfoOrdering = new Ordering() { @Override