Advertisement
NiceQQQQ

Untitled

Dec 7th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.14 KB | None | 0 0
  1. #情報----------------------------------------------------------
  2. プラグイン名:skLock
  3.  製作者 名:lucky777_
  4.  機  能 :チェストの保護機能の実装
  5.  
  6. #チェスト制限----------------------------------------------------------
  7. options:
  8. prefix: &7[&eskLock&7]&f
  9. max: 4#チェスト保護の一人あたりの最大数
  10. chest_unbreakable: true#trueにするとAdminToolという名前の道具以外ではチェストを破壊不可に
  11. chest: chest or trapped chest#保護対象
  12.  
  13. #チェスト・サイン破壊阻止
  14. on break of chest or trapped chest:
  15. {@chest_unbreakable} is true
  16. if "%name of player's tool%" is "&6AdminTool":
  17. player has permission "Admin"
  18. stop
  19. else:
  20. cancel the event
  21. set action bar of player to "{@prefix} : &fチェストを破壊することはできません"#*skRayfall
  22.  
  23. on break of sign:
  24. if "%name of player's tool%" is "&6AdminTool":
  25. player has permission "Admin"
  26. stop
  27. line 1 of event-block contains "locked*"
  28. if line 1 of event-block contains "%name of player%":
  29. add -1 to {locked.%player%}
  30. stop
  31. set action bar of player to "{@prefix} : &f他人の保護を破壊することはできません"#*skRayfall
  32. cancel the event
  33.  
  34. #保護化----------------------------------------------------------------
  35. on sign change:
  36. block behind event-block is {@chest}
  37. if line 1 contains "locked*":
  38. cancel the event
  39. make player execute command "/skLock"
  40. stop
  41. if line 1 is "lock":
  42. loop blocks in radius 3 of event-block:
  43. loop-block is sign
  44. line 1 of loop-block contains "locked*"
  45. line 1 of loop-block does not contain "%name of player%"
  46. message "{@prefix} : &c他の人の保護領域から3ブロック以上離して下さい!" to player
  47. message "&7 - &e/skLock &7: マニュアルを表示"
  48. break event-block
  49. stop
  50. if {locked.%player%} is more than or equal to {@max}:
  51. message "{@prefix} : &cチェスト保護は &f{@max}箇所 &cまでに制限されています" to player
  52. message "&7 - &e/skLock &7: マニュアルを表示"
  53. break event-block
  54. stop
  55. set line 1 to "&1locked*%name of player%"
  56. add 1 to {locked.%player%}
  57. stop
  58. else:
  59. block behind event-block is {@chest}
  60.  
  61. on rightclick on {@chest}:
  62. cancel the event
  63. loop blocks in radius 2 of clicked block:
  64. delete {_check}
  65. loop-block is sign
  66. line 1 of loop-block contains "locked*"
  67. if location of the block behind loop-block is location of clicked block:
  68. set {_check} to true
  69. if location of the block 2 behind loop-block is location of clicked block:
  70. set {_check} to true
  71. if {_check} is true:
  72. if line 1 of loop-block does not contain "%name of player%":
  73. if line 2 of loop-block does not contain "%name of player%":
  74. if line 3 of loop-block does not contain "%name of player%":
  75. if line 4 of loop-block does not contain "%name of player%":
  76. set {_locked} to true
  77. if {_locked} is true:
  78. set action bar of player to "{@prefix} &e鍵がかかっている!"
  79. play "block_chest_locked" to player
  80. stop
  81. else:
  82. open clicked block to player
  83.  
  84. on rightclick on sign:
  85. if line 1 of target block does not contain "%name of player%":
  86. if line 2 of target block does not contain "%name of player%":
  87. if line 3 of target block does not contain "%name of player%":
  88. if line 4 of target block does not contain "%name of player%":
  89. broadcast "no name"
  90.  
  91.  
  92. #マニュアル----------------------------------------------------------------
  93. command /skLock:
  94. permission:skript.Member
  95. permission message: このコマンドを実効するにはMemberになる必要があります。
  96. trigger:
  97. message "&7///////////////////////////////////////////////////////////"
  98. message "{@prefix}&e skLock v1.0 by lucky777_"
  99. message "&7----&eチェスト保護の方法"
  100. message "&71 - &fチェストに対して看板を貼り付ける"
  101. message "&72 - &f1行目に'lock'と記入(オーナーの名前は記入不要)"
  102. message "&73 - &f共同使用者がいる場合は、2行目以降に名前を記入"
  103. message "&7----&e保護の解除方法"
  104. message "&71 - &fチェストに貼り付けた看板を破壊する(オーナーのみ可能)"
  105. message "&7----&e留意事項"
  106. message "&71 - &fチェスト保護の最大数は &e{@max}個 &fです"
  107. if {locked.%player%} is set:
  108. message "&71 - &fあなたは現在 &e%{locked.%player%}%個 &fの保護をかけています"
  109. else:
  110. message "&71 - &fあなたは現在 &e0個 &fの保護をかけています"
  111. message "&72 - &f保護可能なブロックは&e{@chest}&fです"
  112. if {@chest_unbreakable} is true:
  113. message "&73 - &fチェスト破壊防止機能は&eオン&fになっています"
  114. else:
  115. message "&73 - &fチェスト破壊防止機能は&eオフ&fになっています"
  116. message "&74 - &f看板の背後2ブロックが保護の対象です。"
  117. message "&74 - &fラージチェストの保護は側面に看板を貼って下さい"
  118. message "&75 - &f他のオーナーの保護から3ブロック以内の場所では保護ができません"
  119. message "&7----&eCommands"
  120. message "&71 - &e/skLock &7: マニュアルを表示"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement