D
Deleted member 21504
I'm trying to force the player to perform a right click (as a server-side autoclicker for Slimefun). This is my code, and here are my errors:
I got the original code from this thread.
Server version 1.19.4 PaperMC.
Skript info:
If anyone can tell me how to fix this, that would be greatly appreciated. If anyone could tell my why it doesn't work, that would be appreciated even more. Thank you.
code_language.skript:
import:
org.bukkit.event.player.PlayerInteractEvent
command /fakeclick:
permission: *
trigger:
set {_click} to new PlayerInteractEvent(player, Action.RIGHT_CLICK_BLOCK, player's tool, target block, (target block).getBlockFace())
Bukkit.getPluginManager().callEvent({_click})
I got the original code from this thread.
Server version 1.19.4 PaperMC.
Skript info:
If anyone can tell me how to fix this, that would be greatly appreciated. If anyone could tell my why it doesn't work, that would be appreciated even more. Thank you.