Skip to content

Commit

Permalink
Begin refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Obydux committed May 1, 2024
1 parent 59e1d0a commit 50f079c
Show file tree
Hide file tree
Showing 38 changed files with 2,104 additions and 129 deletions.
6 changes: 3 additions & 3 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
ko_fi: obydux
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
liberapay: Obydux
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://paypal.me/LinsaFTW']
custom:
38 changes: 22 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
name: Build ExploitFixer
name: Gradle Package

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Build ExploitFixer
run: mvn clean install
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ExploitFixer
path: ./target/ExploitFixer.jar
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Gradle
run: chmod +x gradlew && ./gradlew build

- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.0
with:
path: build/libs/**.jar
90 changes: 86 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,88 @@
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
replay_pid*

##############################
## Maven
##############################
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
pom.xml.bak
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar

##############################
## Gradle
##############################
bin/
build/
.gradle
.gradletasknamecache
gradle-app.setting
!gradle-wrapper.jar

##############################
## IntelliJ
##############################
out/
.idea/
.idea_modules/
*.iml
*.ipr
*.iws

##############################
## Eclipse
##############################
.settings/
tmp/
.metadata
.classpath
.project
.vscode
.settings
*.tmp
*.bak
*.swp
*~.nib
local.properties
.loadpath
.factorypath
.classpath
/target

##############################
## NetBeans
##############################
nbproject/private/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml

##############################
## Visual Studio Code
##############################
.vscode/
.code-workspace

##############################
## OS X
##############################
.DS_Store

##############################
## Miscellaneous
##############################
*.log
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ExploitFixer

ExploitFixer is a high performance packet filter that prevents many kinds of crashers, laggers and exploits from being used in your Spigot/Paper server.
ExploitFixer is a high performance packet filter that prevents many kinds of crashes and exploits from being used in your Spigot/Paper server.

You can download the prebuilt jar file from [here](https://github.com/Obydux/ExploitFixer/releases/tag/release).
You can download the pre-built jar file from [here](https://github.com/Obydux/ExploitFixer/actions).

## Hosting

Expand All @@ -11,8 +11,8 @@ I highly recommend BisectHosting for your server needs. They have 20 server loca
<img alt="BisectHosting" src="https://www.bisecthosting.com/partners/custom-banners/b6a2ddec-ce4c-4f54-96d0-6a7f9796d386.webp">
</a>

## How To (Compiling From Source)
## How To Compile

To compile ExploitFixer, you need [JDK8](https://adoptopenjdk.net/releases.html), [maven](https://maven.apache.org/download.cgi), and an internet connection.
To compile ExploitFixer, you need [JDK17](https://adoptium.net/temurin/releases/?os=any&package=jdk) and an internet connection.

Clone this repo, run ```mvn clean install``` from *bash*.
Clone this repo, cd into it and run ```./gradlew b``` if you're on Linux and ```./gradlew.bat b``` if you're on Windows.
35 changes: 35 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
plugins {
`java-library`
`maven-publish`
}

repositories {
mavenLocal()
mavenCentral()
maven("https://jitpack.io/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.codemc.io/repository/maven-releases/")
}

dependencies {
api("com.github.steveice10:opennbt:1.6")
api("io.netty:netty-all:4.1.109.Final")
compileOnly("org.spigotmc:spigot-api:1.20.6-R0.1-SNAPSHOT")
}

java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17

publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}

tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}

tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Gradle properties
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.parallel=true
14 changes: 14 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
com-github-steveice10-opennbt = "1.5"
dev--v2lstudios-hamsterapi = "0.2.3"
io-netty-netty-all = "4.1.94.Final"
org-spigotmc-spigot-api = "1.19-R0.1-SNAPSHOT"

[libraries]
com-github-steveice10-opennbt = { module = "com.github.steveice10:opennbt", version.ref = "com-github-steveice10-opennbt" }
dev--v2lstudios-hamsterapi = { module = "dev._2lstudios:HamsterAPI", version.ref = "dev--v2lstudios-hamsterapi" }
io-netty-netty-all = { module = "io.netty:netty-all", version.ref = "io-netty-netty-all" }
org-spigotmc-spigot-api = { module = "org.spigotmc:spigot-api", version.ref = "org-spigotmc-spigot-api" }
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 50f079c

Please sign in to comment.