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.
3
.idea/gradle.xml
generated
3
.idea/gradle.xml
generated
@@ -5,7 +5,7 @@
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="#JAVA_HOME" />
|
||||
<option name="gradleJvm" value="21" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
@@ -13,5 +13,6 @@
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
<option name="offlineMode" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -1,5 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ASMSmaliIdeaPluginConfiguration">
|
||||
<asm skipDebug="true" skipFrames="true" skipCode="false" expandFrames="false" />
|
||||
<groovy codeStyle="LEGACY" />
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
4
.idea/modules.xml
generated
4
.idea/modules.xml
generated
@@ -2,7 +2,9 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Sentinel.iml" filepath="$PROJECT_DIR$/.idea/modules/Sentinel.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/'me.trouper'.Sentinel.main.iml" filepath="$PROJECT_DIR$/.idea/modules/'me.trouper'.Sentinel.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/'me.trouper'.Sentinel.test.iml" filepath="$PROJECT_DIR$/.idea/modules/'me.trouper'.Sentinel.test.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/IJ.IdeaProjects.Sentinel.main.iml" filepath="$PROJECT_DIR$/.idea/modules/IJ.IdeaProjects.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>
|
||||
|
||||
4
.idea/modules/Sentinel.main.iml
generated
4
.idea/modules/Sentinel.main.iml
generated
@@ -11,4 +11,8 @@
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
133
build.gradle
133
build.gradle
@@ -3,18 +3,21 @@ import java.nio.file.Paths
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||
id 'com.gradleup.shadow' version '9.0.0-beta10'
|
||||
id("xyz.jpenilla.run-paper") version "2.3.1"
|
||||
}
|
||||
|
||||
group = project.group
|
||||
version = project.version
|
||||
|
||||
jar {
|
||||
from {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
configurations.runtimeClasspath.collect {
|
||||
it.isDirectory() ? it : zipTree(it)
|
||||
}
|
||||
def targetJavaVersion = 21
|
||||
java {
|
||||
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
if (JavaVersion.current() < javaVersion) {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,105 +39,76 @@ repositories {
|
||||
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/")
|
||||
name = "CodeMC"
|
||||
url = uri("https://repo.codemc.io/repository/maven-public/")
|
||||
}
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly "io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT"
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.0")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.0")
|
||||
compileOnly "io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT"
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
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"
|
||||
implementation files("libs/PDK-1.4.0.jar")
|
||||
implementation "com.github.retrooper:packetevents-spigot:2.8.0"
|
||||
implementation("de.tr7zw:item-nbt-api:2.15.0")
|
||||
}
|
||||
|
||||
def targetJavaVersion = 21
|
||||
java {
|
||||
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
if (JavaVersion.current() < javaVersion) {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||
}
|
||||
static def generateBuildId() {
|
||||
return new Date().format('HH:mm:ss dd/MM/yyyy')
|
||||
}
|
||||
|
||||
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
|
||||
expand(
|
||||
version: project.version,
|
||||
build: generateBuildId()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
compileJava.options.encoding("UTF-8")
|
||||
shadowJar {
|
||||
archiveClassifier.set('')
|
||||
minimize()
|
||||
mergeServiceFiles()
|
||||
|
||||
filesMatching('**/plugin.yml') { fileCopyDetails ->
|
||||
def content = fileCopyDetails.file.text
|
||||
def lines = content.split('\n')
|
||||
|
||||
if (lines.length == 0 || !lines[0].trim().equals('name: SentinelAntiNuke')) {
|
||||
fileCopyDetails.exclude()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
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'
|
||||
]
|
||||
relocate("de.tr7zw.changeme.nbtapi", "me.trouper.sentinel.nbtapi.api")
|
||||
}
|
||||
|
||||
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
|
||||
def sourceDir = Paths.get("${System.getProperty('user.home')}/.gradle/caches/modules-2/files-2.1")
|
||||
def targetDir = Paths.get("${buildDir}/../deps")
|
||||
|
||||
// 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}"
|
||||
}
|
||||
@@ -143,6 +117,31 @@ task copyLibs {
|
||||
}
|
||||
}
|
||||
|
||||
task obfuscate(type: JavaExec) {
|
||||
classpath = files('obf/grunt-main.jar')
|
||||
args = [
|
||||
'--config', 'obf/config.json'
|
||||
]
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
||||
options.release = targetJavaVersion
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
tasks {
|
||||
runServer {
|
||||
dependsOn(shadowJar)
|
||||
minecraftVersion("1.21.5")
|
||||
}
|
||||
}
|
||||
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.
@@ -1,178 +0,0 @@
|
||||
name: SentinelAntiNuke
|
||||
version: '0.3.0'
|
||||
main: me.trouper.sentinel.Sentinel
|
||||
api-version: 1.21
|
||||
authors: [ TheTrouper ]
|
||||
description: Detect, Block, and Ban players who attempt to grief your server.
|
||||
website: https://thetrouper.github.io/
|
||||
softdepend:
|
||||
- ProtocolLib
|
||||
- ProtocolSupport
|
||||
- ViaVersion
|
||||
- ViaBackwards
|
||||
- ViaRewind
|
||||
- Geyser-Spigot
|
||||
load: STARTUP
|
||||
permissions:
|
||||
sentinel.admin:
|
||||
description: Allows access to all Sentinel admin commands.
|
||||
default: op
|
||||
children:
|
||||
sentinel.reload: true
|
||||
sentinel.config: true
|
||||
sentinel.debug: true
|
||||
sentinel.staff:
|
||||
description: Allows access to Sentinel staff commands.
|
||||
default: false
|
||||
children:
|
||||
sentinel.socialspy: true
|
||||
sentinel.false-positive: true
|
||||
sentinel.reload:
|
||||
description: Allows the user to reload the Sentinel plugin.
|
||||
default: false
|
||||
sentinel.config:
|
||||
description: Allows the user to modify the Sentinel configuration.
|
||||
default: false
|
||||
sentinel.false-positive:
|
||||
description: Allows the user to manage false positives.
|
||||
default: false
|
||||
children:
|
||||
sentinel.false-positive.add: true
|
||||
sentinel.false-positive.remove: true
|
||||
sentinel.false-positive.add:
|
||||
description: Allows the user to add a false positive.
|
||||
default: false
|
||||
sentinel.false-positive.remove:
|
||||
description: Allows the user to remove a false positive.
|
||||
default: false
|
||||
sentinel.debug:
|
||||
description: Allows the user to toggle debug mode.
|
||||
default: false
|
||||
sentinel.commandblock:
|
||||
description: Allows the user to manage command blocks.
|
||||
default: false
|
||||
sentinel.socialspy:
|
||||
description: Allows the user to spy on social interactions.
|
||||
default: false
|
||||
sentinel.callbacks:
|
||||
description: Allows access to all Sentinel callback commands.
|
||||
default: op
|
||||
children:
|
||||
sentinel.callbacks.fpreport: true
|
||||
sentinel.callbacks.fpreport:
|
||||
description: Allows the user to report false positives.
|
||||
default: false
|
||||
sentinel.message:
|
||||
description: Allows the user to send messages.
|
||||
default: true
|
||||
sentinel.reply:
|
||||
description: Allows the user to reply to messages.
|
||||
default: true
|
||||
sentinel.chatfilter:
|
||||
description: Parent permission for all chat-related features.
|
||||
default: false
|
||||
children:
|
||||
sentinel.chatfilter.profanity: true
|
||||
sentinel.chatfilter.spam: true
|
||||
sentinel.chatfilter.unicode: true
|
||||
sentinel.chatfilter.url: true
|
||||
sentinel.chatfilter.profanity:
|
||||
description: Parent permission for profanity filter features.
|
||||
default: false
|
||||
children:
|
||||
sentinel.chatfilter.profanity.view: true
|
||||
sentinel.chatfilter.profanity.bypass: true
|
||||
sentinel.chatfilter.profanity.view:
|
||||
description: Allows the user to view profanity filter logs.
|
||||
default: false
|
||||
sentinel.chatfilter.profanity.bypass:
|
||||
description: Allows the user to bypass the profanity filter.
|
||||
default: false
|
||||
sentinel.chatfilter.spam:
|
||||
description: Parent permission for spam filter features.
|
||||
default: false
|
||||
children:
|
||||
sentinel.chatfilter.spam.view: true
|
||||
sentinel.chatfilter.spam.bypass: true
|
||||
sentinel.chatfilter.spam.view:
|
||||
description: Allows the user to view spam filter logs.
|
||||
default: false
|
||||
sentinel.chatfilter.spam.bypass:
|
||||
description: Allows the user to bypass the spam filter.
|
||||
default: false
|
||||
sentinel.chatfilter.unicode:
|
||||
description: Parent permission for unicode filter features.
|
||||
default: false
|
||||
children:
|
||||
sentinel.chatfilter.unicode.view: true
|
||||
sentinel.chatfilter.unicode.bypass: true
|
||||
sentinel.chatfilter.unicode.view:
|
||||
description: Allows the user to view unicode filter logs.
|
||||
default: false
|
||||
sentinel.chatfilter.unicode.bypass:
|
||||
description: Allows the user to bypass the unicode filter.
|
||||
default: false
|
||||
sentinel.chatfilter.url:
|
||||
description: Parent permission for URL filter features.
|
||||
default: false
|
||||
children:
|
||||
sentinel.chatfilter.url.view: true
|
||||
sentinel.chatfilter.url.bypass: true
|
||||
sentinel.chatfilter.url.view:
|
||||
description: Allows the user to view URL filter logs.
|
||||
default: false
|
||||
sentinel.chatfilter.url.bypass:
|
||||
description: Allows the user to bypass the URL filter.
|
||||
default: false
|
||||
commands:
|
||||
sentinel:
|
||||
description: Main command for Sentinel.
|
||||
usage: /sentinel <reload|config|false-positive|debug|commandblock|socialspy>
|
||||
permission: sentinel.staff
|
||||
permission-message: You do not have permission to use this command.
|
||||
sentinelcallback:
|
||||
description: Callback command for Sentinel.
|
||||
usage: /callback <fpreport>
|
||||
permission: sentinel.callbacks
|
||||
permission-message: You do not have permission to use this command.
|
||||
message:
|
||||
description: Send a message to another player.
|
||||
usage: /message <player> <message>
|
||||
permission: sentinel.message
|
||||
permission-message: You do not have permission to use this command.
|
||||
aliases:
|
||||
- msg
|
||||
- etell
|
||||
- tell
|
||||
- t
|
||||
- ewhisper
|
||||
- whisper
|
||||
- w
|
||||
- privatemessage
|
||||
- pm
|
||||
- m
|
||||
- directmessage
|
||||
- dm
|
||||
- sentinelmessage
|
||||
- sm
|
||||
- stell
|
||||
- smsg
|
||||
reply:
|
||||
description: Reply to a message.
|
||||
usage: /reply <message>
|
||||
permission: sentinel.reply
|
||||
permission-message: You do not have permission to use this command.
|
||||
aliases:
|
||||
- r
|
||||
- er
|
||||
- rply
|
||||
- ereply
|
||||
- sr
|
||||
- sreply
|
||||
- sentinelreply
|
||||
sentineltab:
|
||||
description: tab completion redirects for sentinel
|
||||
usage: /sentineltab [<args>]
|
||||
reop:
|
||||
description: Allows trusted players to elevate their permissions
|
||||
usage: /reop
|
||||
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