Skript-Reflect and CoreProtectAPI not working

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

porcodioo

Member
Nov 4, 2022
4
0
1
Hello, i was wondering if you could help me hook CoreProtectAPI to skript-reflect, because i've been trying to do that for a while though all the outputs are null or turn into console errors. Please show code.

my current code:
Code:
on PlayerInteractEvent:
  if event.getPlayer()'s held item is a stick named "&fMagnifying glass":
    if "%event.getClickedBlock()%" contains "chest" or "barrel":
      set {_s::*} to {coreprotect::api}.sessionLookup("event.getPlayer()", (24 * 60 * 60))
      broadcast "%{_s::*}%"

on load:
  set {coreprotect::api} to Bukkit.getPluginManager().getPlugin("CoreProtect")

skript version: latest, i'm open to adding new addons.
 
I might be wrong on this, but you might need to import the PlayerInteractEvent before you use it. Although, I'm fairly new to skript-reflect.

Code:
on load:
  import org.bukkit.event.player.PlayerInteractEvent as PlayerInteractEvent
 
Status
Not open for further replies.