mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-28 18:26:15 -05:00
Merge branch 'master' of https://github.com/Moles-LLC/Shadow
This commit is contained in:
commit
256092b7b9
6 changed files with 18 additions and 5 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
cache: 'gradle'
|
cache: 'gradle'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
- name: Patch and build
|
- name: Build
|
||||||
run: "./gradlew build"
|
run: "./gradlew build"
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -20,5 +20,6 @@ export JAVA_HOME="$HOME/.jdks/openjdk-17.0.1/"
|
||||||
if [[ ! -d bin ]]; then
|
if [[ ! -d bin ]]; then
|
||||||
mkdir bin
|
mkdir bin
|
||||||
fi
|
fi
|
||||||
mv ./build/libs/shadow-1.0.0.jar bin
|
mv ./build/libs/shadow-1.0.0.jar bin/shadow-deobfuscated-$ver
|
||||||
|
./obfuscatedRelease.sh
|
||||||
echo "Made release"
|
echo "Made release"
|
7
obfuscatedRelease.sh
Normal file
7
obfuscatedRelease.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Making Obfuscated Build"
|
||||||
|
ver=`cat ./src/main/resources/version.txt`
|
||||||
|
./gradlew build
|
||||||
|
java -jar "./proguard/proguard.jar" "$@"
|
||||||
|
mv ./build/libs/shadow-1.0.0.jar bin/shadow-$ver
|
BIN
proguard/proguard.jar
Normal file
BIN
proguard/proguard.jar
Normal file
Binary file not shown.
|
@ -15,6 +15,7 @@ import net.shadow.client.feature.itemMenu.ItemGroupRegistry;
|
||||||
import net.shadow.client.feature.module.Module;
|
import net.shadow.client.feature.module.Module;
|
||||||
import net.shadow.client.feature.module.ModuleRegistry;
|
import net.shadow.client.feature.module.ModuleRegistry;
|
||||||
import net.shadow.client.helper.Rotations;
|
import net.shadow.client.helper.Rotations;
|
||||||
|
import net.shadow.client.helper.protection.Locker;
|
||||||
import net.shadow.client.helper.event.EventType;
|
import net.shadow.client.helper.event.EventType;
|
||||||
import net.shadow.client.helper.event.Events;
|
import net.shadow.client.helper.event.Events;
|
||||||
import net.shadow.client.helper.event.events.base.NonCancellableEvent;
|
import net.shadow.client.helper.event.events.base.NonCancellableEvent;
|
||||||
|
@ -55,7 +56,7 @@ public class ShadowMain implements ModInitializer {
|
||||||
INSTANCE = this;
|
INSTANCE = this;
|
||||||
log(Level.INFO, "Initializing");
|
log(Level.INFO, "Initializing");
|
||||||
|
|
||||||
//Locker.init();
|
Locker.init();
|
||||||
|
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread(ConfigManager::saveState));
|
Runtime.getRuntime().addShutdownHook(new Thread(ConfigManager::saveState));
|
||||||
if (BASE.exists() && !BASE.isDirectory()) {
|
if (BASE.exists() && !BASE.isDirectory()) {
|
||||||
|
|
|
@ -2,13 +2,17 @@ package net.shadow.client.helper.protection;
|
||||||
|
|
||||||
import meteordevelopment.discordipc.DiscordIPC;
|
import meteordevelopment.discordipc.DiscordIPC;
|
||||||
import meteordevelopment.discordipc.IPCUser;
|
import meteordevelopment.discordipc.IPCUser;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
|
||||||
public class Locker {
|
public class Locker {
|
||||||
|
private static List<String> IDS = Arrays.asList("661988735189254165","956655656704815124");
|
||||||
public static void init() {
|
public static void init() {
|
||||||
boolean result = DiscordIPC.start(958479347390500874L, () -> {
|
boolean result = DiscordIPC.start(958479347390500874L, () -> {
|
||||||
IPCUser user = DiscordIPC.getUser();
|
IPCUser user = DiscordIPC.getUser();
|
||||||
//user.id
|
if(!IDS.contains(user.id)) MinecraftClient.getInstance().close();
|
||||||
|
|
||||||
DiscordIPC.stop();
|
DiscordIPC.stop();
|
||||||
});
|
});
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
|
Loading…
Reference in a new issue