mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-21 07:49:18 +00:00
add imanity anti xray sdk
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package dev.imanity.antixray.sdk;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public interface AntiXrayAdapter {
|
||||
/**
|
||||
* Call a block change to the AntiXray system
|
||||
* It should be at Level.setBlock(BlockPos, BlockState, flags, maxUpdateDepth)
|
||||
* Or World.setTypeAndData(BlockPosition, IBlockData, i) in legacy spigot versions
|
||||
*
|
||||
* @param world the bukkit world
|
||||
* @param x the x
|
||||
* @param y the y
|
||||
* @param z the z
|
||||
* @param material the bukkit material
|
||||
*/
|
||||
void callBlockChange(World world, int x, int y, int z, Material material);
|
||||
|
||||
/**
|
||||
* Call a player left click block to the AntiXray system
|
||||
* It should be at ServerPlayerGameMode.handleBlockBreakAction(BlockPos, ServerboundPlayerActionPacket.Action, Direction, worldHeight, sequence)
|
||||
* Or PlayerInteractManager.a(BlockPosition, EnumDirection) in legacy spigot versions
|
||||
*
|
||||
* @param world the bukkit world
|
||||
* @param player the bukkit player
|
||||
* @param x the x
|
||||
* @param y the y
|
||||
* @param z the z
|
||||
*/
|
||||
void callPlayerLeftClickBlock(World world, Player player, int x, int y, int z);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package dev.imanity.antixray.sdk;
|
||||
|
||||
public class AntiXraySDK {
|
||||
private static AntiXrayAdapter ADAPTER;
|
||||
|
||||
public static AntiXrayAdapter getAdapter() {
|
||||
return ADAPTER;
|
||||
}
|
||||
|
||||
public static void setAdapter(AntiXrayAdapter adapter) {
|
||||
ADAPTER = adapter;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Integration with Imanity Software's Raytrace AntiXray for better use of this plugin
|
||||
* <p>
|
||||
* Original project: <a href="https://github.com/Imanity-Software/raytrace-antixray-spigot-sdk">GitHub Repository</a>
|
||||
*/
|
||||
package dev.imanity.antixray.sdk;
|
||||
Reference in New Issue
Block a user