|
| 1 | +/* |
| 2 | + * Copyright 2024 Lambda |
| 3 | + * |
| 4 | + * This program is free software: you can redistribute it and/or modify |
| 5 | + * it under the terms of the GNU General Public License as published by |
| 6 | + * the Free Software Foundation, either version 3 of the License, or |
| 7 | + * (at your option) any later version. |
| 8 | + * |
| 9 | + * This program is distributed in the hope that it will be useful, |
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | + * GNU General Public License for more details. |
| 13 | + * |
| 14 | + * You should have received a copy of the GNU General Public License |
| 15 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + */ |
| 17 | + |
| 18 | +package com.lambda.module.modules.client |
| 19 | + |
| 20 | +import com.lambda.event.events.TickEvent |
| 21 | +import com.lambda.event.listener.SafeListener.Companion.listener |
| 22 | +import com.lambda.module.Module |
| 23 | + |
| 24 | +object AnticheatPreset : Module( |
| 25 | + name = "AnticheatPreset", |
| 26 | + description = "Change the behavior of certain modules based on the server's anticheat", |
| 27 | +) { |
| 28 | + private val autoDetect by setting("Automatic Detection", true, description = "Detect the server's anticheat using predefined patterns") |
| 29 | + private val minimumDetection by setting("Minimum Detection", 1, 1..5, 1, description = "How many patterns must be detected before assigning the anticheat") |
| 30 | + |
| 31 | + val anticheatPreset by setting("Anticheat Preset", Anticheats.Grim3) { !autoDetect } |
| 32 | + |
| 33 | + init { |
| 34 | + listener<TickEvent.Pre> { |
| 35 | + |
| 36 | + } |
| 37 | + } |
| 38 | + |
| 39 | + enum class Anticheats { |
| 40 | + Grim2, Grim3, Matrix, NCP |
| 41 | + } |
| 42 | +} |
0 commit comments