Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Maven Package

on: [push]

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

steps:

- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Upload build artifacts
uses: actions/upload-artifact@v2.3.1
with:
path: target/AntiCheatReloaded.jar
829 changes: 669 additions & 160 deletions LICENSE

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
AntiCheatReloaded [![Latest Release](https://img.shields.io/github/v/release/Rammelkast/AntiCheatReloaded)](https://github.com/Rammelkast/AntiCheatReloaded/releases) [![Downloads](https://img.shields.io/github/downloads/Rammelkast/AntiCheatReloaded/total)](https://github.com/Rammelkast/AntiCheatReloaded/releases) [![Last Commit](https://img.shields.io/github/last-commit/Rammelkast/AntiCheatReloaded)](https://github.com/Rammelkast/AntiCheatReloaded/commits/master) [![Last Build](https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fci.rammelkast.com%2Fjob%2FAntiCheatReloaded)](https://ci.rammelkast.com/job/AntiCheatReloaded/lastBuild/)
AntiCheatReloaded (_unmaintained_) [![Latest Release](https://img.shields.io/github/v/release/Rammelkast/AntiCheatReloaded)](https://github.com/Rammelkast/AntiCheatReloaded/releases) [![Downloads](https://img.shields.io/github/downloads/Rammelkast/AntiCheatReloaded/total)](https://github.com/Rammelkast/AntiCheatReloaded/releases) [![Last Commit](https://img.shields.io/github/last-commit/Rammelkast/AntiCheatReloaded)](https://github.com/Rammelkast/AntiCheatReloaded/commits/master)
=============
AntiCheatReloaded helps server admins combat the use of hacked clients and spambots. It analyses the behavior of players and can prevent malicious gameplay. The plugin offers a lot of customizability and can be connected across multiple servers in case it is used in a server network context. AntiCheatReloaded is based on gravitylow's AntiCheat and has been around since 2012.
AntiCheatReloaded is currently **unmaintained.** There will be **no further updates** to the current codebase and **no support** will be provided. The last released version (1.10.3) supports 1.12.2 - 1.18.1. You can use this version of the plugin **at your own risk**. Some development may occur on a completely rewritten version of the plugin. No support or definitive release date is provided for this version. You can follow its progress [here](https://github.com/Rammelkast/AntiCheatReloaded/tree/version-2).

Installation
------------
AntiCheatReloaded requires you to have ProtocolLib. You can download it [here](https://www.spigotmc.org/resources/protocollib.1997/).
AntiCheatReloaded **requires** you to have ProtocolLib. You can download it [here](https://www.spigotmc.org/resources/protocollib.1997/).
Simply drag and drop the AntiCheatReloaded and ProtocolLib jars in your plugin folder. You can now use AntiCheatReloaded, but be sure to have a look at the configuration files, which allow you to change every aspect of the plugin.

Bug Reporting
Expand Down Expand Up @@ -50,4 +50,4 @@ Hacks blocked
* Scaffold
* FastLadder
* Strafe
* NoSlow
* NoSlow
8 changes: 6 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.rammelkast.anticheatreloaded</groupId>
<artifactId>AntiCheatReloaded</artifactId>
<version>1.10.3-PRE</version>
<version>1.11.0-PRE</version>
<name>AntiCheatReloaded</name>
<url>https://www.spigotmc.org/resources/anticheatreloaded.23799/</url>
<properties>
Expand Down Expand Up @@ -61,6 +61,10 @@
<relocation>
<pattern>com.cryptomorin.xseries</pattern>
<shadedPattern>com.rammelkast.anticheatreloaded.util</shadedPattern>
</relocation>
<relocation>
<pattern>com.github.juliarn.npc</pattern>
<shadedPattern>com.rammelkast.anticheatreloaded.util.npc</shadedPattern>
</relocation>
</relocations>
<filters>
Expand Down Expand Up @@ -101,7 +105,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
import com.rammelkast.anticheatreloaded.event.BlockListener;
import com.rammelkast.anticheatreloaded.event.EntityListener;
import com.rammelkast.anticheatreloaded.event.InventoryListener;
import com.rammelkast.anticheatreloaded.event.PacketListener;
import com.rammelkast.anticheatreloaded.event.PlayerListener;
import com.rammelkast.anticheatreloaded.event.VehicleListener;
import com.rammelkast.anticheatreloaded.manage.AntiCheatManager;
import com.rammelkast.anticheatreloaded.util.PacketListener;
import com.rammelkast.anticheatreloaded.util.UpdateManager;
import com.rammelkast.anticheatreloaded.util.User;
import com.rammelkast.anticheatreloaded.util.VersionUtil;
import com.rammelkast.anticheatreloaded.util.VersionLib;

import lombok.Getter;

Expand All @@ -75,7 +75,6 @@ public final class AntiCheatReloaded extends JavaPlugin {
private static boolean verbose;

private double tps = -1;
private String symbiosisMetric = "None";

@Override
public void onLoad() {
Expand Down Expand Up @@ -119,13 +118,10 @@ public void onEnable() {
setupProtocol();

Bukkit.getConsoleSender()
.sendMessage(PREFIX + ChatColor.GRAY + "Running Minecraft version " + VersionUtil.getVersion() + " "
+ (VersionUtil.isSupported() ? (ChatColor.GREEN + "(supported)")
.sendMessage(PREFIX + ChatColor.GRAY + "Running Minecraft version " + VersionLib.getVersion() + " "
+ (VersionLib.isSupported() ? (ChatColor.GREEN + "(supported)")
: (ChatColor.RED + "(NOT SUPPORTED!)")));

// Load protocol manager
PacketListener.load(protocolManager);


// Check for Floodgate
if (Bukkit.getPluginManager().getPlugin("Floodgate") != null) {
floodgateEnabled = true;
Expand Down Expand Up @@ -165,7 +161,6 @@ public void run() {
getServer().getScheduler().runTaskLater(this, new Runnable() {
@Override
public void run() {
checkForSymbiosis();
try {
final Metrics metrics = new Metrics(AntiCheatReloaded.this, 202);
metrics.addCustomChart(new SingleLineChart("cheaters_kicked", new Callable<Integer>() {
Expand All @@ -186,13 +181,7 @@ public String call() throws Exception {
metrics.addCustomChart(new SimplePie("nms_version", new Callable<String>() {
@Override
public String call() throws Exception {
return VersionUtil.getVersion();
}
}));
metrics.addCustomChart(new SimplePie("symbiosis", new Callable<String>() {
@Override
public String call() throws Exception {
return symbiosisMetric;
return VersionLib.getVersion();
}
}));
metrics.addCustomChart(new SimplePie("floodgate_enabled", new Callable<String>() {
Expand Down Expand Up @@ -228,6 +217,7 @@ public void onDisable() {

private void setupProtocol() {
protocolManager = ProtocolLibrary.getProtocolManager();
protocolManager.addPacketListener(new PacketListener(this));
verboseLog("Hooked into ProtocolLib");
}

Expand Down Expand Up @@ -312,56 +302,6 @@ public void onPlayerKicked() {
this.playersKicked++;
}

/**
* Creates metric that checks for anti-cheat symbiosis I use this to see if
* AntiCheatReloaded is actively being used together with other anti-cheats, so
* I can account for that.
*/
protected void checkForSymbiosis() {
if (Bukkit.getPluginManager().getPlugin("NoCheatPlus") != null) {
if (this.symbiosisMetric.equals("None")) {
this.symbiosisMetric = "NoCheatPlus";
} else {
this.symbiosisMetric += ", NoCheatPlus";
}
}
if (Bukkit.getPluginManager().getPlugin("Matrix") != null) {
if (this.symbiosisMetric.equals("None")) {
this.symbiosisMetric = "Matrix";
} else {
this.symbiosisMetric += ", Matrix";
}
}
if (Bukkit.getPluginManager().getPlugin("AAC") != null) {
if (this.symbiosisMetric.equals("None")) {
this.symbiosisMetric = "AAC";
} else {
this.symbiosisMetric += ", AAC";
}
}
if (Bukkit.getPluginManager().getPlugin("Spartan") != null) {
if (this.symbiosisMetric.equals("None")) {
this.symbiosisMetric = "Spartan";
} else {
this.symbiosisMetric += ", Spartan";
}
}
if (Bukkit.getPluginManager().getPlugin("Negativity") != null) {
if (this.symbiosisMetric.equals("None")) {
this.symbiosisMetric = "Negativity";
} else {
this.symbiosisMetric += ", Negativity";
}
}
if (Bukkit.getPluginManager().getPlugin("SoaromaSAC") != null) {
if (this.symbiosisMetric.equals("None")) {
this.symbiosisMetric = "SoaromaSAC";
} else {
this.symbiosisMetric += ", SoaromaSAC";
}
}
}

public static void sendToMainThread(final Runnable runnable) {
Bukkit.getScheduler().runTask(AntiCheatReloaded.getPlugin(), runnable);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.rammelkast.anticheatreloaded.api;
package com.rammelkast.anticheatreloaded.api.event;

import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* AntiCheatReloaded for Bukkit and Spigot.
* Copyright (c) 2012-2015 AntiCheat Team
* Copyright (c) 2016-2022 Rammelkast
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.rammelkast.anticheatreloaded.api.event;

import java.util.List;

import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

import com.rammelkast.anticheatreloaded.util.User;

/**
* Fired when a player is punished by AntiCheatReloaded
*/
public final class PlayerPunishEvent extends Event implements Cancellable {

private static final HandlerList handlers = new HandlerList();

private final User user;
private final List<String> actions;

private boolean cancelled;

public PlayerPunishEvent(final User user, final List<String> actions) {
this.user = user;
this.actions = actions;
}

/**
* Get the {@link com.rammelkast.anticheatreloaded.util.User} who will be
* punished
*
* @return a {@link com.rammelkast.anticheatreloaded.util.User}
*/
public User getUser() {
return user;
}

/**
* Get the list of actions the punishment will perform
*
* @return a a list of punishment strings
*/
public List<String> getActions() {
return actions;
}

public HandlerList getHandlers() {
return handlers;
}

public static HandlerList getHandlerList() {
return handlers;
}

@Override
public boolean isCancelled() {
return cancelled;
}

@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}

}
Loading