AntiOpAbuse: recover what survived a broken partial clone

The original clone was blobless/treeless and its .git lost refs/heads and
refs/tags, so the Java sources in the index no longer exist on disk. This
commit restores the repository to a working state and preserves:
- pom.xml, plugin.yml, config.yml, README.md, LICENSE
- the compiled 1.3.5 jar under target/

The .java sources were lost with the object store and are not recoverable
locally. They remain on GitHub if the account is reinstated.
This commit is contained in:
katR 2026-09-27 20:57:58 +05:30
commit 05abea7c21
6 changed files with 272 additions and 0 deletions

24
.gitignore vendored Normal file
View file

@ -0,0 +1,24 @@
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 katR
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

115
README.md Normal file
View file

@ -0,0 +1,115 @@
# AntiOpAbuse ⛔
yo server admins are probably abusing yk so this plugin gives you trust
AntiOpAbuse watches the server console 24/7 and rats out everything to a Discord webhook in real time. *Every* command, ANY item taken from creative inventory. but with safeguards; no join IPs shown, no auth messages shown, no /msg shown
No alerts are give to OP, nor can they disable it.
---
## What it does
- 📡 **snitchmaxxer** — every console line gets forwarded to Discord in real time
- 🎨 **Catches creative inventory abuse** — logs every item a creative mode player takes, because "I was just looking" is not an excuse
- 🤐 **Keeps actual secrets secret** — filters out IPs, DMs, and passwords so no leaking sensitive stuff
- ⚡ **Won't kill your server** — runs completely async, the main thread has no idea this is even happening
- 🛡️ **Completely abuse-proof** — there is no command to turn it off. No permission node. No secret backdoor. The only way to stop it is to physically remove the jar, which, good luck explaining that one
- 🔁 **discord rate limits? haha no** — it waits, it retries, it doesn't give up
- 🔧 **Two config options** — ye js two. its minimal af. (or i was js not able to find more config options lol)
---
## Works on
| Server | Supported |
|--------|-----------|
| PaperMC | ✅ |
| Spigot | ✅ |
| Bukkit | ✅ |
| Purpur | ✅ |
- **Minecraft:** 1.18.x – 1.21.x (guaranteed), prob works on 1.15+ too but js to be safe
- **Java:** 17+ (if you're still on Java 8 please close this tab)
---
## Setup
1. grab the jar from download option
2. chunk it in `plugins/`
3. start the server, itll generate the config
4. open `plugins/AntiOpAbuse/config.yml` and paste your webhook URL
5. Run `/antiopabuse reload`
6. now try to abuse haha
---
## Config
```yaml
# plugins/AntiOpAbuse/config.yml
webhook-url: "https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN"
send-as-codeblock: true
```
yep no backdoors or disable options
---
## What it looks like in Discord
**Console relay:**
```
[INFO]: adminabuser issued server command: /op xX_GrieferKing_Xx
[INFO]: scaryop issued server command: /give @a diamond 64
[INFO]: katR issued server command: /ban Steve
[INFO]: katR is the goat fr
```
**Creative inventory logging:**
```
[CREATIVE] ezznub took 64x golden_apples
[CREATIVE] abuser1 took 1x bedrock
[CREATIVE] fullnethin1day took 64x netherite_ingot
```
> caught instantly nubz
---
## Commands
| Command | What it does |
|---------|-------------|
| `/antiopabuse webhook` | Pings Discord and tells you if it's working |
| `/antiopabuse reload` | Reloads the config so you don't have to restart |
**Alias:** `/aoa` for when your js lazy
Only OPs can run these. And yea, running them gets logged too.
---
## What it won't snitch on
we trynna help players not expose them
- **IP addresses** — nobody needs those in Discord
- **`/msg`, `/tell`, `/w`, `/whisper`** — private messages stay private
- **Auth plugin stuff** — passwords, login attempts, all filtered out
---
## Building it yourself
```bash
git clone https://github.com/oiupoyt/AntiOpAbuse.git
cd AntiOpAbuse
mvn clean package
# jar is at target/AntiOpAbuse-1.X.X.jar
```
Requires Java 17+ and Maven 3.8+.
---

84
pom.xml Normal file
View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>dev.antiopabuse</groupId>
<artifactId>AntiOpAbuse</artifactId>
<version>1.3.5</version>
<packaging>jar</packaging>
<name>AntiOpAbuse</name>
<description>Forwards server console output to a Discord webhook in real time.</description>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<repositories>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>shade</goal></goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>true</minimizeJar>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>AntiOpAbuse-${project.version}</finalName>
</build>
</project>

View file

@ -0,0 +1,15 @@
# AntiOpAbuse Configuration
# ─────────────────────────────────────────────────────────────────
# webhook-url : Your Discord webhook URL.
# Create one under Server Settings → Integrations → Webhooks.
# send-as-codeblock : Wrap each log line in a Discord code block.
# commands-only : When true, filters out noisy lines like player chat,
# join/leave messages, server lag warnings, and plugin spam.
# Commands, console output, warnings, errors, and creative
# logs still come through. IPs, private messages, and auth
# plugin output are always filtered regardless.
# ─────────────────────────────────────────────────────────────────
webhook-url: "DISCORD_WEBHOOK_HERE"
send-as-codeblock: true
commands-only: false

View file

@ -0,0 +1,13 @@
name: AntiOpAbuse
version: '1.3.5'
main: dev.antiopabuse.antiopabuse.AntiOpAbusePlugin
api-version: '1.13'
description: Forwards server console output to a Discord webhook in real time.
authors: [AntiOpAbuse]
load: STARTUP
commands:
antiopabuse:
description: AntiOpAbuse management command
usage: /antiopabuse <logs|webhook|reload>
aliases: [aoa]