Removed dependency on ProtocolLib, added silent mode to chat filters, improved loading times. Updated chat event handlers to use modern systems. Updated to 1.21.4. Abstracted chat actions, made URL and Unicode blockers standard chat filters, integrating profanity and slur regex into their respective filters. Made sentinel command not spam console when you make a mistake.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,4 @@
|
|||||||
/.idea/
|
/.idea/
|
||||||
|
/build/
|
||||||
|
/.gradle/
|
||||||
|
/bin/
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
.gradle/8.5/fileChanges/last-build.bin
Executable file → Normal file
0
.gradle/8.5/fileChanges/last-build.bin
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.gradle/file-system.probe
Executable file → Normal file
BIN
.gradle/file-system.probe
Executable file → Normal file
Binary file not shown.
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -5,6 +5,7 @@
|
|||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleJvm" value="#JAVA_HOME" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
|
|||||||
3
.idea/modules.xml
generated
3
.idea/modules.xml
generated
@@ -2,8 +2,9 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/'me.trouper'.CleanSentinel.main.iml" filepath="$PROJECT_DIR$/.idea/modules/'me.trouper'.CleanSentinel.main.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Sentinel.iml" filepath="$PROJECT_DIR$/.idea/modules/Sentinel.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Sentinel.main.iml" filepath="$PROJECT_DIR$/.idea/modules/Sentinel.main.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Sentinel.main.iml" filepath="$PROJECT_DIR$/.idea/modules/Sentinel.main.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Sentinel.test.iml" filepath="$PROJECT_DIR$/.idea/modules/Sentinel.test.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
4
.idea/modules/Sentinel.main.iml
generated
4
.idea/modules/Sentinel.main.iml
generated
@@ -11,8 +11,4 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
</component>
|
</component>
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
</module>
|
||||||
4
.idea/vcs.xml
generated
4
.idea/vcs.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
71
build.gradle
71
build.gradle
@@ -1,5 +1,9 @@
|
|||||||
|
import java.nio.file.Files
|
||||||
|
import java.nio.file.Paths
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = project.group
|
group = project.group
|
||||||
@@ -24,19 +28,27 @@ repositories {
|
|||||||
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
|
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
|
name = "papermc"
|
||||||
url = uri("https://repo.papermc.io/repository/maven-public/")
|
url = uri("https://repo.papermc.io/repository/maven-public/")
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name = 'sonatype'
|
name = 'sonatype'
|
||||||
url = 'https://oss.sonatype.org/content/groups/public/'
|
url = 'https://oss.sonatype.org/content/groups/public/'
|
||||||
}
|
}
|
||||||
|
maven {
|
||||||
|
url = uri("https://repo.codemc.io/repository/maven-releases/")
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
url = uri("https://repo.codemc.io/repository/maven-snapshots/")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT'
|
compileOnly "io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT"
|
||||||
compileOnly 'com.comphenix.protocol:ProtocolLib:5.1.0'
|
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
implementation 'com.google.code.gson:gson:2.10.1'
|
||||||
implementation files("libs/PDK-1.4.0.jar")
|
implementation 'org.ow2.asm:asm-commons:9.5'
|
||||||
|
implementation files("deps/PDK-1.4.0.jar")
|
||||||
|
implementation "com.github.retrooper:packetevents-spigot:2.7.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
def targetJavaVersion = 21
|
def targetJavaVersion = 21
|
||||||
@@ -77,3 +89,56 @@ compileJava.options.encoding("UTF-8")
|
|||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.shadowJar {
|
||||||
|
relocate("com.github.retrooper.packetevents", "me.trouper.sentinel.packetevents.api")
|
||||||
|
relocate("io.github.retrooper.packetevents", "me.trouper.sentinel.packetevents.impl")
|
||||||
|
}
|
||||||
|
|
||||||
|
task obfuscate(type: JavaExec) {
|
||||||
|
// Specify the main class in the obfuscator JAR (if required)
|
||||||
|
|
||||||
|
// Path to the obfuscator JAR
|
||||||
|
classpath = files('obf/grunt-main.jar')
|
||||||
|
|
||||||
|
// Arguments to pass to the obfuscator (e.g., input and output directories)
|
||||||
|
args = [
|
||||||
|
'--config', '.\\obf\\config.json'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
task copyLibs {
|
||||||
|
doLast {
|
||||||
|
// Define the source directory (Gradle cache) and the target directory
|
||||||
|
def sourceDir = Paths.get("C:/Users/crvic/.gradle/caches/modules-2/files-2.1")
|
||||||
|
def targetDir = Paths.get("${buildDir}/../deps") // Output directory
|
||||||
|
|
||||||
|
// Create the target directory if it doesn't exist
|
||||||
|
if (!Files.exists(targetDir)) {
|
||||||
|
Files.createDirectories(targetDir)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recursively traverse the source directory and copy JAR files
|
||||||
|
Files.walk(sourceDir)
|
||||||
|
.filter { Files.isRegularFile(it) && it.toString().endsWith(".jar") }
|
||||||
|
.forEach { jarFile ->
|
||||||
|
// Extract the file name (without the directory structure)
|
||||||
|
def fileName = jarFile.fileName.toString()
|
||||||
|
|
||||||
|
// Define the target file path (flat structure)
|
||||||
|
def targetFile = targetDir.resolve(fileName)
|
||||||
|
|
||||||
|
// Handle duplicate file names (if any)
|
||||||
|
if (Files.exists(targetFile)) {
|
||||||
|
println "Skipping duplicate file: ${fileName}"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy the JAR file to the target directory
|
||||||
|
Files.copy(jarFile, targetFile)
|
||||||
|
println "Copied: ${jarFile} -> ${targetFile}"
|
||||||
|
}
|
||||||
|
|
||||||
|
println "All JAR files have been extracted to: ${targetDir}"
|
||||||
|
}
|
||||||
|
}
|
||||||
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.
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.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user