Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from TheWylot/dev/v2.0.0
Browse files Browse the repository at this point in the history
DEV-2.0.4 // Added Intave AntiCheat Support
  • Loading branch information
TheWylot authored Feb 14, 2023
2 parents 35350fd + 7608c2c commit 07106e5
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>ir.wy</groupId>
<artifactId>WyCore</artifactId>
<packaging>jar</packaging>
<version>2.0.2</version>
<version>2.0.4</version>


<properties>
Expand Down Expand Up @@ -142,6 +142,10 @@
<id>iridiumdevelopment</id>
<url>https://nexus.iridiumdevelopment.net/repository/maven-releases/</url>
</repository>
<repository>
<id>janmm14-intave</id>
<url>https://repo.janmm14.de/repository/intave/</url>
</repository>
<repository>
<id>local-repo</id>
<url>file:///${project.basedir}/libs/</url>
Expand Down Expand Up @@ -191,6 +195,12 @@
<scope>system</scope>
<systemPath>${project.basedir}/libs/Vulcan-2.6.9.jar</systemPath>
</dependency>
<dependency>
<groupId>de.jpx3.intave.access</groupId>
<artifactId>intave-access</artifactId>
<version>14.4.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.essentialsx</groupId>
<artifactId>EssentialsX</artifactId>
Expand Down Expand Up @@ -334,5 +344,6 @@
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>

</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
package ir.wy.wycore.spigot.support.anticheat

class IntaveAntiCheat {
import de.jpx3.intave.access.check.event.IntaveViolationEvent
import ir.wy.wycore.behind.support.anticheat.AntiCheatSupport
import org.bukkit.entity.Player
import org.bukkit.event.EventHandler
import org.bukkit.event.EventPriority
import org.bukkit.event.Listener
import java.util.UUID

class IntaveAntiCheat : AntiCheatSupport, Listener{
private val exempt: MutableSet<UUID> = HashSet()

override fun getPluginName(): String {
return "Intave"
}

override fun exempt(player: Player) {
exempt.add(player.uniqueId)
}

override fun unexempt(player: Player) {
exempt.remove(player.uniqueId)
}

@EventHandler(priority = EventPriority.LOWEST)
private fun onViolate(event: IntaveViolationEvent) {
if(!exempt.contains(event.player().uniqueId)) {
return
}
event.reaction().equals(true)
}
}

0 comments on commit 07106e5

Please sign in to comment.