skで壊したブロックをコアプロテクトのログに残したい

break ~~~ naturally using player's toolで壊しています ログに残す方法ありませんか?
4 Replies
何か
何か2y ago
PRなら無理 自鯖ならsk-reflectでcoreprotectのapiを使うしかない
あお🦀
あお🦀OP2y ago
自鯖です(Purpur1.19.4) なるほど...
何か
何か2y ago
import:
net.coreprotect.CoreProtect
java.lang.Byte

command /test:
trigger:
break_block(player, target block)

function break_block(actor: player, pos: location):
set {_api} to CoreProtect.getInstance().getAPI()
set {_name} to name of {_actor}
set {_material} to (type of block at {_pos}).getMaterial()
set {_data} to Byte.valueOf(0)
{_api}.logRemoval({_name}, {_pos}, {_material}, {_data})
break block at {_pos} naturally using {_actor}'s tool
import:
net.coreprotect.CoreProtect
java.lang.Byte

command /test:
trigger:
break_block(player, target block)

function break_block(actor: player, pos: location):
set {_api} to CoreProtect.getInstance().getAPI()
set {_name} to name of {_actor}
set {_material} to (type of block at {_pos}).getMaterial()
set {_data} to Byte.valueOf(0)
{_api}.logRemoval({_name}, {_pos}, {_material}, {_data})
break block at {_pos} naturally using {_actor}'s tool
あお🦀
あお🦀OP2y ago
ありがとうございます 使わせていただきます
Want results from more Discord servers?
Add your server