Adding API, new checks, false positive fixes

- New Order (Place) and Order (Use) check
- New Autoclicker (A) and Autoclicker (B) check.
- Event system for checks has changed to use lambdas instead of reflection (IE WAction and TimedWAction)
- Added configurable commands for punishments
- Added punishments
- Added title command (wont show in help menu)
- Added new AnticheatAPI project
- Implemented flag, punish, and cancel listeners for API uses.
This commit is contained in:
Dawson
2022-08-23 10:18:14 -04:00
parent bd50501640
commit 49391bfea9
42 changed files with 581 additions and 115 deletions
@@ -15,8 +15,10 @@ import io.netty.buffer.Unpooled;
import lombok.val;
import net.minecraft.server.v1_8_R3.PacketDataSerializer;
import net.minecraft.server.v1_8_R3.PacketPlayOutCustomPayload;
import net.minecraft.server.v1_8_R3.PacketPlayOutTitle;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.v1_8_R3.util.CraftChatMessage;
import org.bukkit.entity.Player;
import java.io.UnsupportedEncodingException;
@@ -86,6 +88,7 @@ public class AnticheatCommand extends BaseCommand {
}
@Subcommand("alerts")
@HelpCommand
@CommandPermission("anticheat.command.alerts")
@Description("Toggle anticheat alerts")
public void onAlerts(Player pl) {
@@ -105,6 +108,14 @@ public class AnticheatCommand extends BaseCommand {
}
}
@Subcommand("title")
@Private
public void onTitle(CommandSender sender, OnlinePlayer target, String title) {
PacketPlayOutTitle packetSubtitle = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE, CraftChatMessage.fromString(Color.translate(title))[0]);
HandlerAbstract.getHandler().sendPacket(target.getPlayer(), packetSubtitle);
sender.sendMessage(Color.Green + "Sent title!");
}
@Subcommand("playerinfo|info|pi")
@Description("Get player's information")
@Syntax("[player]")