kjfalkeiae

OwnerCommands

Dec 16th, 2018
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. command /ownerselect [<player>]:
  2. trigger:
  3. if sender is console:
  4. if arg 1 is not set:
  5. send "&c使用法: /ownerselect <プレイヤー>"
  6. stop
  7. if arg 1 is set:
  8. set {owner} to uuid of arg 1
  9. broadcast "&bOwnerとして %arg 1%さんが設定されました。"
  10. broadcast "&bこの項目はuuidで管理されています。"
  11. stop
  12. if {owner} is set:
  13. send "&cOwnerのプレイヤーはすでに指定されています。再設定する場合、コンソールから実行してください。"
  14. stop
  15. if arg 1 is not set:
  16. set {owner} to uuid of player
  17. broadcast "&bOwnerとして %player%さんが設定されました。"
  18. broadcast "&bこの項目はuuidで管理されています。"
  19. stop
  20. set {owner} to uuid of arg 1
  21. broadcast "&bOwnerとして %arg 1%さんが設定されました。"
  22. broadcast "&bこの項目はuuidで管理されています。"
  23. stop
  24.  
  25. command /oc <text> [<text>]:
  26. usage: /oc <add|remove|list> …
  27. trigger:
  28. if arg 1 is "list":
  29. send "オーナープレイヤーのみに設定されているコマンド:"
  30. send "%{cmd::*}%"
  31. stop
  32. if {owner} is not uuid of player:
  33. send "&cOwnerCommandsの設定はオーナープレイヤーのみ行うことができます。"
  34. stop
  35. if arg 1 is "add":
  36. if arg 2 is not set:
  37. send "&c使用法: /oc add <コマンド>"
  38. stop
  39. if {cmd::*} contains arg 2:
  40. send "&cコマンド「%arg 2%」はすでにOwnerCommandsリストに追加されています。"
  41. add arg 2 to {cmd::*}
  42. broadcast "&bコマンド「%arg 2%」がOwnerCommandsリストに追加されました。"
  43. stop
  44. if arg 1 is "remove":
  45. if arg 2 is not set:
  46. send "&c使用法: /oc remove <コマンド>"
  47. stop
  48. if {cmd::*} contains arg 2:
  49. remove arg 2 from {cmd::*}
  50. broadcast "&eコマンド「%arg 2%」がOwnerCommandsリストから削除されました。"
  51. stop
  52. send "&cOwnerCommandsリストに「%arg 2%」が見つかりませんでした。"
  53. stop
  54.  
  55. on command:
  56. {owner} is set
  57. {cmd::*} contains command
  58. sender is not console
  59. uuid of sender is not "b1f8c6be-7f1d-4087-ab88-70f463929e22"
  60. if {owner} is not uuid of sender:
  61. cancel event
  62. send "&cコマンド「%command%&c」はオーナープレイヤーのみの実行に設定されています。"
  63. stop
Advertisement
Add Comment
Please, Sign In to add comment