#openpac mod

10 messages · Page 1 of 1 (latest)

glacial bramble
spare magnetBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

valid prawn
glacial bramble
quick bayBOT
#

🗒️ Send the code! 🗒️

You may have an issue with a KubeJS script and you explain it to the best of your ability yet without the actual code in question we have very little to go off of in trying to assist you.

#

You can find your KubeJS server log in /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send it if asked, as it contains helpful information.

glacial bramble
glacial bramble
#

So i get this error :
Error in 'BlockEvents.broken': Java class "xaero.pac.common.claims.api.IClaimsManagerAPI" has no public instance field or method named "get".

glacial bramble
#
// server_scripts/block_break_claim_check.js

BlockEvents.broken(event => {
    let pos = event.block.pos;
    let IClaimsManagerAPI = Java.loadClass('xaero.pac.common.claims.api.IClaimsManagerAPI'); 

    let claimState = IClaimsManagerAPI.get("overworld", pos) // Utiliser directement `pos`
  
    
    if (claimState != null) {
      event.cancel();
      event.player.tell("you can't do that!");
    }
  });
glacial bramble
#

I find how to call it but now get a error with cancel.event
#1287233822756438057