Sueta
OR

OreAlert

1.0.0

Anti Xray datapack

·Plugin

Disclaimer!
This is not a plugin!
This is a datapack!

This datapack allows you to check players if they are propably using xray mod/resourcepack.You can use it on Bukkit, Spigot or even vanilla server.
This datapack isn't tested on other server types.

How does it work? :
This datapack simply checks if a player mined any ore and the system will add a number to a counter what is dicreased by 1 every second until it reaches 0. If this counter reaches 80 than the system will alert the staffmembers than reset the counter.

What is a player collects ores with silk touch than mines it?
If a players places down an ore block than the previously mentioned counter will decrease twice as much than it does when a player mines an ore block. Due to this system, the counter can go under 0 and when it does the counter will be increased by 1 every second until it reaches 0.

How much will be increased/decreased the counter with every ore?

When mining:
Coal ore: 2
Redstone ore: 2
Iron ore: 4
Golden ore: 4
Diamond ore: 10
Lapis ore: 4
Quartz ore: 2
Emerald ore: 40

When placing:
Coal ore: 4
Redstone ore: 4
Iron ore: 8
Golden ore: 8
Diamond ore: 20
Lapis ore: 8
Quartz ore: 4
Emerald ore: 80

Why is it important to decrease the counter twice much when the player places down the ore blocks?
After the player places down the blocks, some time will pass and the counter will have a higher value, so the system would make fake alerts when the player mines the whole thing.

Installation

1.: Put the .zip file in your default world's datapack s folder
Usually: /world/datapacks/
2.: Reload/restart your server
3.: Type this command: /function orealert:init
4.:
Set the targets who should be alerted (staff members, who woll get the alert message) with this command: /tag <name> add staffmember

Uninstall

1.: Type this command: /function orealert:unins
This will shout down the system, the next two steps are optional.
2.: Delete the .zip file from the datapacks folder
3.: Restart/reload your server

Similar projects

Plugin →