코드의 일부를 발췌하여 재구성한거라 문법적 오류가 존재할 수 있음
command /예시 [<player>]:
trigger:
if player is op:
message "디버깅!" to arg 1
else
message "오류!" to arg 1
on rightclik on entity:
if name of cliked entity contain "안냥":
execute console command "/예시 player"
안냥이라는 이름의 엔티티를 누를때 /예시 커맨드가 작동을 하도록 설계한건데 디버깅!이 아닌 오류!, 즉 권한이 없다고 뜸
콘솔은 sender is console 을 통해 콘솔인지 여부를 불러와야 함command /1:@trigger:@@if player is op:@@@set {_op} to true@@else if sender is console:@@@set {_op} to true@@else:@@@set {_op} to false@if {_op} is true: #관리자인 경우@@message "OP맞음"@else:@@message "OP아님"@ = tab 치환위 구문 참고해보면 좋을 것 같음
ㄳ! 참고해보고 모르겠는거 있으면 다시 질문 드리겠음
??? execute console command "/예시 %player%" 시도해보셈
command /test: @trigger: @@set {_boolean} to true if (sender is console) @@set {_boolean} to true if (player is op) @@broadcast "관리자 권한 가지고 있음“ if ({_boolean} = true) else ("관리자 권한 없음”)