Base Done
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/.idea/
|
||||
BIN
.gradle/8.2-rc-2/checksums/checksums.lock
Normal file
BIN
.gradle/8.2-rc-2/checksums/checksums.lock
Normal file
Binary file not shown.
BIN
.gradle/8.2-rc-2/fileHashes/fileHashes.lock
Normal file
BIN
.gradle/8.2-rc-2/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
75
build.gradle
Normal file
75
build.gradle
Normal file
@@ -0,0 +1,75 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
group = project.group
|
||||
version = project.version
|
||||
|
||||
jar {
|
||||
from {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
configurations.runtimeClasspath.collect {
|
||||
it.isDirectory() ? it : zipTree(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = 'spigotmc-repo'
|
||||
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
|
||||
}
|
||||
maven {
|
||||
url = uri("https://repo.papermc.io/repository/maven-public/")
|
||||
}
|
||||
maven {
|
||||
name = 'sonatype'
|
||||
url = 'https://oss.sonatype.org/content/groups/public/'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation files("libs/PDK-1.3.4.jar")
|
||||
}
|
||||
|
||||
def targetJavaVersion = 17
|
||||
java {
|
||||
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
if (JavaVersion.current() < javaVersion) {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
||||
options.release = targetJavaVersion
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('copyDeps', Copy) {
|
||||
from configurations.runtimeClasspath
|
||||
into 'build/deps'
|
||||
include '*.jar'
|
||||
}
|
||||
|
||||
|
||||
processResources {
|
||||
def props = [version: version]
|
||||
inputs.properties props
|
||||
filteringCharset 'UTF-8'
|
||||
filesMatching('plugin.yml') {
|
||||
expand props
|
||||
}
|
||||
}
|
||||
|
||||
compileJava.options.encoding("UTF-8")
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
48
build.sh
Executable file
48
build.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run Gradle build
|
||||
./gradlew build
|
||||
|
||||
# Check if the build was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Gradle build successful."
|
||||
|
||||
# SFTP upload
|
||||
SFTP_HOST="192.168.1.199"
|
||||
SFTP_USER="trouper"
|
||||
SFTP_PASSWORD="Trouper12()1"
|
||||
SFTP_REMOTE_DIR="/home/trouper/docker/data/plugins/"
|
||||
|
||||
# Create a temporary file with a unique name
|
||||
TEMP_FILE=$(mktemp)
|
||||
|
||||
# Specify the local file to upload
|
||||
LOCAL_FILE="/run/media/trouper/'1TB drive'/IJ/IdeaProjects/UltraDupe/build/libs/UltraDupe-0.2.5.jar"
|
||||
|
||||
# Write the SFTP commands to the temporary file
|
||||
echo "put $LOCAL_FILE $SFTP_REMOTE_DIR" > "$TEMP_FILE"
|
||||
echo "bye" >> "$TEMP_FILE"
|
||||
|
||||
# Use sftp non-interactively with the specified commands
|
||||
sftp -oStrictHostKeyChecking=no -oBatchMode=no -b "$TEMP_FILE" "$SFTP_USER@$SFTP_HOST" <<EOF
|
||||
$SFTP_PASSWORD
|
||||
EOF
|
||||
|
||||
# Remove the temporary file
|
||||
rm -f "$TEMP_FILE"
|
||||
|
||||
# SSH command to reload the plugin on the host
|
||||
SSH_COMMANDS=(
|
||||
"pm reload UltraDupe"
|
||||
"execute at @a run playsound minecraft:entity.experience_orb.pickup master @a \~ \~ \~ 100 1 1"
|
||||
"tellraw @a '\"'[Server] Reload Complete, Upload Successful.'\"'"
|
||||
)
|
||||
|
||||
for cmd in "${SSH_COMMANDS[@]}"; do
|
||||
ssh -oStrictHostKeyChecking=no -oBatchMode=no "$SFTP_USER@$SFTP_HOST" "docker exec docker_mc_1 mc-send-to-console $cmd"
|
||||
done
|
||||
|
||||
echo "Plugin reloaded."
|
||||
else
|
||||
echo "Gradle build failed."
|
||||
fi
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/deps/PDK-1.3.4.jar
Normal file
BIN
build/deps/PDK-1.3.4.jar
Normal file
Binary file not shown.
BIN
build/deps/gson-2.10.1.jar
Normal file
BIN
build/deps/gson-2.10.1.jar
Normal file
Binary file not shown.
BIN
build/libraries/PDK-1.3.4.jar
Normal file
BIN
build/libraries/PDK-1.3.4.jar
Normal file
Binary file not shown.
BIN
build/libraries/adventure-api-4.15.0.jar
Normal file
BIN
build/libraries/adventure-api-4.15.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/adventure-key-4.15.0.jar
Normal file
BIN
build/libraries/adventure-key-4.15.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/adventure-text-logger-slf4j-4.15.0.jar
Normal file
BIN
build/libraries/adventure-text-logger-slf4j-4.15.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/adventure-text-minimessage-4.15.0.jar
Normal file
BIN
build/libraries/adventure-text-minimessage-4.15.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/adventure-text-serializer-gson-4.15.0.jar
Normal file
BIN
build/libraries/adventure-text-serializer-gson-4.15.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/adventure-text-serializer-json-4.15.0.jar
Normal file
BIN
build/libraries/adventure-text-serializer-json-4.15.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/adventure-text-serializer-legacy-4.15.0.jar
Normal file
BIN
build/libraries/adventure-text-serializer-legacy-4.15.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/adventure-text-serializer-plain-4.15.0.jar
Normal file
BIN
build/libraries/adventure-text-serializer-plain-4.15.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/annotations-24.1.0.jar
Normal file
BIN
build/libraries/annotations-24.1.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/bungeecord-chat-1.20-R0.1.jar
Normal file
BIN
build/libraries/bungeecord-chat-1.20-R0.1.jar
Normal file
Binary file not shown.
BIN
build/libraries/checker-qual-3.33.0.jar
Normal file
BIN
build/libraries/checker-qual-3.33.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/error_prone_annotations-2.18.0.jar
Normal file
BIN
build/libraries/error_prone_annotations-2.18.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/examination-api-1.3.0.jar
Normal file
BIN
build/libraries/examination-api-1.3.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/examination-string-1.3.0.jar
Normal file
BIN
build/libraries/examination-string-1.3.0.jar
Normal file
Binary file not shown.
BIN
build/libraries/failureaccess-1.0.1.jar
Normal file
BIN
build/libraries/failureaccess-1.0.1.jar
Normal file
Binary file not shown.
BIN
build/libraries/fastutil-8.5.6.jar
Normal file
BIN
build/libraries/fastutil-8.5.6.jar
Normal file
Binary file not shown.
BIN
build/libraries/gson-2.10.1.jar
Normal file
BIN
build/libraries/gson-2.10.1.jar
Normal file
Binary file not shown.
BIN
build/libraries/guava-32.1.2-jre.jar
Normal file
BIN
build/libraries/guava-32.1.2-jre.jar
Normal file
Binary file not shown.
BIN
build/libraries/j2objc-annotations-2.8.jar
Normal file
BIN
build/libraries/j2objc-annotations-2.8.jar
Normal file
Binary file not shown.
BIN
build/libraries/javax.inject-1.jar
Normal file
BIN
build/libraries/javax.inject-1.jar
Normal file
Binary file not shown.
BIN
build/libraries/joml-1.10.5.jar
Normal file
BIN
build/libraries/joml-1.10.5.jar
Normal file
Binary file not shown.
BIN
build/libraries/json-simple-1.1.1.jar
Normal file
BIN
build/libraries/json-simple-1.1.1.jar
Normal file
Binary file not shown.
BIN
build/libraries/jsr305-3.0.2.jar
Normal file
BIN
build/libraries/jsr305-3.0.2.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
build/libraries/org.eclipse.sisu.inject-0.9.0.M2.jar
Normal file
BIN
build/libraries/org.eclipse.sisu.inject-0.9.0.M2.jar
Normal file
Binary file not shown.
BIN
build/libraries/plexus-interpolation-1.26.jar
Normal file
BIN
build/libraries/plexus-interpolation-1.26.jar
Normal file
Binary file not shown.
BIN
build/libraries/plexus-utils-3.5.1.jar
Normal file
BIN
build/libraries/plexus-utils-3.5.1.jar
Normal file
Binary file not shown.
BIN
build/libraries/snakeyaml-2.2.jar
Normal file
BIN
build/libraries/snakeyaml-2.2.jar
Normal file
Binary file not shown.
BIN
build/libraries/spigot-api-1.20.2-R0.1-SNAPSHOT.jar
Normal file
BIN
build/libraries/spigot-api-1.20.2-R0.1-SNAPSHOT.jar
Normal file
Binary file not shown.
BIN
build/libs/UltraDupe-0.2.5.jar
Normal file
BIN
build/libs/UltraDupe-0.2.5.jar
Normal file
Binary file not shown.
103
build/resources/main/plugin.yml
Normal file
103
build/resources/main/plugin.yml
Normal file
@@ -0,0 +1,103 @@
|
||||
name: UltraDupe
|
||||
version: '0.2.5'
|
||||
main: io.github.thetrouper.ultradupe.UltraDupe
|
||||
api-version: 1.19
|
||||
authors: [ TheTrouper ]
|
||||
description: Detect Block and Ban players who attempt to grief your server.
|
||||
website: https://thetrouper.github.io/
|
||||
softdepend: [ ProtocolLib ]
|
||||
permissions:
|
||||
ultradupe.message:
|
||||
description: Access to the direct messages
|
||||
default: op
|
||||
ultradupe.reply:
|
||||
description: Reply commands
|
||||
ultradupe.debug:
|
||||
description: Permission to use debug commands
|
||||
default: op
|
||||
ultradupe.staff:
|
||||
description: Receive anti-swear and anti-spam warnings
|
||||
default: op
|
||||
ultradupe.chat.antiswear.flags:
|
||||
description: See antiSwear flags
|
||||
default: op
|
||||
ultradupe.chat.antiswear.bypass:
|
||||
description: Bypass the antiSwear
|
||||
default: op
|
||||
ultradupe.chat.antiswear.edit:
|
||||
description: Add a false positive to the config
|
||||
default: op
|
||||
ultradupe.chat.antispam.flags:
|
||||
description: See antispam flags
|
||||
default: op
|
||||
ultradupe.chat.antispam.bypass:
|
||||
description: Bypass the antispam
|
||||
default: op
|
||||
ultradupe.chat.*:
|
||||
description: bypass all chat rules and see all flags
|
||||
default: op
|
||||
children:
|
||||
ultradupe.chat.antiswear.flags: true
|
||||
ultradupe.chat.antiswear.bypass: true
|
||||
ultradupe.chat.antispam.flags: true
|
||||
ultradupe.chat.antispam.bypass: true
|
||||
commands:
|
||||
ultradupetab:
|
||||
description: trap tab completion command
|
||||
usage: /ultradupetab you got trolled
|
||||
ultradupe:
|
||||
description: A command for testing.
|
||||
usage: /ultradupe
|
||||
permission: ultradupe.info
|
||||
permission-message: You do not have permission!
|
||||
reop:
|
||||
description: Allows trusted players to elevate their permissions
|
||||
usage: /reop
|
||||
socialspy:
|
||||
permission: ultradupe.spy
|
||||
usage: /socialspy
|
||||
permission-message: You do not have permission to use this command!
|
||||
description: View direct messages sent between players
|
||||
aliases:
|
||||
- spy
|
||||
- sspy
|
||||
msg:
|
||||
permission: ultradupe.message
|
||||
usage: /msg <player> [<message>]
|
||||
permission-message: You do not have permission to message through ultradupe!
|
||||
description: Send messages directly to players
|
||||
aliases:
|
||||
- message
|
||||
- etell
|
||||
- tell
|
||||
- t
|
||||
- ewhisper
|
||||
- whisper
|
||||
- w
|
||||
- privatemessage
|
||||
- pm
|
||||
- m
|
||||
- directmessage
|
||||
- dm
|
||||
- ultradupemessage
|
||||
- sm
|
||||
- stell
|
||||
- smsg
|
||||
reply:
|
||||
description: Reply to the last person messaging you
|
||||
usage: /r [<message>]
|
||||
permission: ultradupe.reply
|
||||
permission-message: You do not have permission to reply through ultradupe!
|
||||
aliases:
|
||||
- r
|
||||
- er
|
||||
- rply
|
||||
- ereply
|
||||
- sr
|
||||
- sreply
|
||||
- ultradupereply
|
||||
ultradupecallback:
|
||||
description: Callback for chat click events
|
||||
usage: /ultradupecallback
|
||||
permission: ultradupe.callbacks
|
||||
permission-message: You have not been given permission to use UltraDupe Chat Callbacks!
|
||||
BIN
build/tmp/.cache/expanded/expanded.lock
Normal file
BIN
build/tmp/.cache/expanded/expanded.lock
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/tmp/compileJava/previous-compilation-data.bin
Normal file
BIN
build/tmp/compileJava/previous-compilation-data.bin
Normal file
Binary file not shown.
2
build/tmp/jar/MANIFEST.MF
Normal file
2
build/tmp/jar/MANIFEST.MF
Normal file
@@ -0,0 +1,2 @@
|
||||
Manifest-Version: 1.0
|
||||
|
||||
8
gradle.properties
Normal file
8
gradle.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
# Plugin
|
||||
group = 'io.github.thetrouper'
|
||||
version = 0.2.5
|
||||
|
||||
# Minecraft
|
||||
mc_version = 1.20.4
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-rc-2-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
248
gradlew
vendored
Executable file
248
gradlew
vendored
Executable file
@@ -0,0 +1,248 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
92
gradlew.bat
vendored
Normal file
92
gradlew.bat
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
BIN
libs/PDK-1.3.4.jar
Normal file
BIN
libs/PDK-1.3.4.jar
Normal file
Binary file not shown.
59
obf.sh
Executable file
59
obf.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run Gradle build
|
||||
./gradlew build
|
||||
|
||||
# Check if the build was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Gradle build successful."
|
||||
|
||||
# Obfuscate with Grunt
|
||||
cd ./obf/
|
||||
java -jar grunt-1.5.7.jar
|
||||
cd ..
|
||||
|
||||
echo "Obfuscation complete."
|
||||
|
||||
# SFTP upload
|
||||
SFTP_HOST="192.168.1.199"
|
||||
SFTP_USER="trouper"
|
||||
SFTP_PASSWORD="Trouper12()1"
|
||||
SFTP_REMOTE_DIR="/home/trouper/docker/data/plugins/"
|
||||
|
||||
# Specify the local file to upload
|
||||
LOCAL_FILE="./build/libs/UltraDupe-0.2.5.jar"
|
||||
|
||||
# Create a temporary file with a unique name
|
||||
TEMP_FILE=$(mktemp)
|
||||
|
||||
# Write the SFTP commands to the temporary file
|
||||
echo "put $LOCAL_FILE $SFTP_REMOTE_DIR" > "$TEMP_FILE"
|
||||
echo "bye" >> "$TEMP_FILE"
|
||||
|
||||
# Use sftp non-interactively with the specified commands
|
||||
sftp -oStrictHostKeyChecking=no -oBatchMode=no -b "$TEMP_FILE" "$SFTP_USER@$SFTP_HOST" <<EOF
|
||||
$SFTP_PASSWORD
|
||||
EOF
|
||||
|
||||
# Remove the temporary file
|
||||
rm -f "$TEMP_FILE"
|
||||
|
||||
echo "File uploaded via SFTP."
|
||||
|
||||
# SSH commands to reload the plugin on the host
|
||||
SSH_HOST="trouper@$SFTP_HOST"
|
||||
SSH_PASSWORD="Trouper12()1"
|
||||
|
||||
SSH_COMMANDS=(
|
||||
"docker exec docker_mc_1 mc-send-to-console pm reload UltraDupe"
|
||||
"docker exec docker_mc_1 mc-send-to-console tellraw @a '\"'[Server] Reload Complete, Upload Successful.'\"'"
|
||||
)
|
||||
|
||||
for cmd in "${SSH_COMMANDS[@]}"; do
|
||||
sshpass -p "$SSH_PASSWORD" ssh -oStrictHostKeyChecking=no -oBatchMode=no "$SSH_HOST" "$cmd"
|
||||
done
|
||||
|
||||
echo "Plugin reloaded."
|
||||
else
|
||||
echo "Gradle build failed."
|
||||
fi
|
||||
181
obf/config.json
Normal file
181
obf/config.json
Normal file
@@ -0,0 +1,181 @@
|
||||
{
|
||||
"Settings": {
|
||||
"Input": "/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libs/UltraDupe-0.2.5.jar",
|
||||
"Output": "/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/obf/out/UltraDupe-0.2.5-beta.jar",
|
||||
"Libraries": [
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/gson-2.10.1.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/adventure-api-4.15.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/adventure-key-4.15.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/adventure-text-logger-slf4j-4.15.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/adventure-text-minimessage-4.15.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/adventure-text-serializer-gson-4.15.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/adventure-text-serializer-json-4.15.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/adventure-text-serializer-legacy-4.15.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/adventure-text-serializer-plain-4.15.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/annotations-24.1.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/bungeecord-chat-1.20-R0.1.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/checker-qual-3.33.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/error_prone_annotations-2.18.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/examination-api-1.3.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/examination-string-1.3.0.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/failureaccess-1.0.1.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/fastutil-8.5.6.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/gson-2.10.1.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/guava-32.1.2-jre.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/j2objc-annotations-2.8.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/javax.inject-1.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/joml-1.10.5.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/json-simple-1.1.1.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/jsr305-3.0.2.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/org.eclipse.sisu.inject-0.9.0.M2.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/PDK-1.3.4.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/plexus-interpolation-1.26.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/plexus-utils-3.5.1.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/snakeyaml-2.2.jar",
|
||||
"/run/media/trouper/1TB drive/IJ/IdeaProjects/UltraDupe/build/libraries/spigot-api-1.20.2-R0.1-SNAPSHOT.jar"
|
||||
],
|
||||
"Exclusions": [
|
||||
"com/google/gson/",
|
||||
"io/github/itzispyder/"
|
||||
],
|
||||
"GenerateRemap": true,
|
||||
"RemapOutput": "mappings.json",
|
||||
"ParallelProcessing": false,
|
||||
"CustomDictionary": [],
|
||||
"DictionaryStartIndex": 0,
|
||||
"CorruptOutput": true,
|
||||
"FileRemovePrefix": [],
|
||||
"FileRemoveSuffix": []
|
||||
},
|
||||
"AntiDebug": {
|
||||
"Enabled": true,
|
||||
"SourceDebug": true,
|
||||
"LineDebug": true,
|
||||
"RenameSourceDebug": true,
|
||||
"SourceNames": [
|
||||
"protected-by-ultradupe.java"
|
||||
]
|
||||
},
|
||||
"Shrinking": {
|
||||
"Enabled": false,
|
||||
"RemoveInnerClass": true,
|
||||
"RemoveUnusedLabel": true,
|
||||
"RemoveNOP": false,
|
||||
"Exclusions": []
|
||||
},
|
||||
"KotlinOptimizer": {
|
||||
"Enabled": false,
|
||||
"RemoveMetadata": true,
|
||||
"RemoveIntrinsics": true,
|
||||
"IntrinsicsRemoval": [
|
||||
"checkExpressionValueIsNotNull",
|
||||
"checkNotNullExpressionValue",
|
||||
"checkReturnedValueIsNotNull",
|
||||
"checkFieldIsNotNull",
|
||||
"checkParameterIsNotNull",
|
||||
"checkNotNullParameter"
|
||||
],
|
||||
"IntrinsicsExclusions": [],
|
||||
"MetadataExclusions": []
|
||||
},
|
||||
"StringEncrypt": {
|
||||
"Enabled": true,
|
||||
"Intensity": 4,
|
||||
"Exclusions": [
|
||||
"io/github/thetrouper/ultradupe/data/config/",
|
||||
"io/github/thetrouper/ultradupe/data/cmdblocks/"
|
||||
]
|
||||
},
|
||||
"NumberEncrypt": {
|
||||
"Enabled": true,
|
||||
"FloatingPoint": true,
|
||||
"Intensity": 2,
|
||||
"Exclusions": [
|
||||
"io/github/thetrouper/ultradupe/data/config/",
|
||||
"io/github/thetrouper/ultradupe/data/cmdblocks/"
|
||||
]
|
||||
},
|
||||
"ScrambleTransformer": {
|
||||
"Enabled": true,
|
||||
"Intensity": 1,
|
||||
"RandomName": true,
|
||||
"RedirectGetStatic": true,
|
||||
"RedirectSetStatic": true,
|
||||
"RedirectGetValue": true,
|
||||
"RedirectSetField": true,
|
||||
"GenerateOuterClass": false,
|
||||
"ExcludedClasses": [],
|
||||
"ExcludedFieldName": [],
|
||||
"NativeDownCalls": true,
|
||||
"NativeUpCalls": false
|
||||
},
|
||||
"NativeCandidate": {
|
||||
"Enabled": false,
|
||||
"NativeAnnotation": "Lnet/spartanb312/example/Native;",
|
||||
"UpCallLimit": 0,
|
||||
"Exclusions": []
|
||||
},
|
||||
"LocalVariableRename": {
|
||||
"Enabled": false,
|
||||
"Dictionary": "Alphabet",
|
||||
"ThisReference": false
|
||||
},
|
||||
"MethodRename": {
|
||||
"Enabled": true,
|
||||
"Dictionary": "Alphabet",
|
||||
"HeavyOverloads": false,
|
||||
"RandomKeywordPrefix": false,
|
||||
"Prefix": "",
|
||||
"Exclusion": [
|
||||
"io/github/thetrouper/ultradupe/data/config/",
|
||||
"io/github/thetrouper/ultradupe/data/cmdblocks/"
|
||||
],
|
||||
"ExcludedName": []
|
||||
},
|
||||
"FieldRename": {
|
||||
"Enabled": true,
|
||||
"Dictionary": "Alphabet",
|
||||
"RandomKeywordPrefix": false,
|
||||
"Prefix": "",
|
||||
"Exclusion": [
|
||||
"io/github/thetrouper/ultradupe/data/config/",
|
||||
"io/github/thetrouper/ultradupe/data/cmdblocks/"
|
||||
],
|
||||
"ExcludedName": []
|
||||
},
|
||||
"ClassRename": {
|
||||
"Enabled": true,
|
||||
"Dictionary": "Alphabet",
|
||||
"Parent": "ultradupe/",
|
||||
"Prefix": "",
|
||||
"CorruptedName": false,
|
||||
"CorruptedNameExclusions": [],
|
||||
"ManifestReplace": [
|
||||
"Main-Class"
|
||||
],
|
||||
"PluginMainReplace": false,
|
||||
"BungeeMainReplace": false,
|
||||
"Exclusion": [
|
||||
"io/github/thetrouper/ultradupe/UltraDupe",
|
||||
"io/github/thetrouper/ultradupe/data/config/",
|
||||
"io/github/thetrouper/ultradupe/data/cmdblocks/"
|
||||
],
|
||||
"MixinSupport": false,
|
||||
"MixinDictionary": "Alphabet",
|
||||
"MixinPackage": "net/spartanb312/client/mixins/",
|
||||
"TargetMixinPackage": "net/spartanb312/obf/mixins/",
|
||||
"MixinFile": "mixins.example.json",
|
||||
"RefmapFile": "mixins.example.refmap.json"
|
||||
},
|
||||
"ShuffleMembers": {
|
||||
"Enabled": false,
|
||||
"Methods": true,
|
||||
"Fields": true,
|
||||
"Annotations": false
|
||||
},
|
||||
"Watermark": {
|
||||
"Enabled": false,
|
||||
"Watermark Message": "COPYRIGHT_C_ULTRADUPE_2024"
|
||||
}
|
||||
}
|
||||
BIN
obf/grunt-1.5.7.jar
Normal file
BIN
obf/grunt-1.5.7.jar
Normal file
Binary file not shown.
1081
obf/hs_err_pid3726555.log
Normal file
1081
obf/hs_err_pid3726555.log
Normal file
File diff suppressed because it is too large
Load Diff
1117
obf/hs_err_pid3727001.log
Normal file
1117
obf/hs_err_pid3727001.log
Normal file
File diff suppressed because it is too large
Load Diff
1718
obf/mappings.json
Normal file
1718
obf/mappings.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
obf/out/Sentinel-0.2.5-beta.jar
Normal file
BIN
obf/out/Sentinel-0.2.5-beta.jar
Normal file
Binary file not shown.
1
settings.gradle
Normal file
1
settings.gradle
Normal file
@@ -0,0 +1 @@
|
||||
rootProject.name = 'UltraDupe'
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user