Advertisement
nunonuno_riku

Untitled

Aug 1st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1.  
  2. options:
  3. prefix: &7[&eskLock&7]&f
  4. max: 4#チェスト保護の一人あたりの最大数
  5. chest_unbreakable: true#trueにするとAdminToolという名前の道具以外ではチェストを破壊不可に
  6. chest: chest or trapped chest#保護対象
  7.  
  8. #チェスト・サイン破壊阻止
  9. on break of chest or trapped chest:
  10. {@chest_unbreakable} is true
  11. if "%name of player's tool%" is "&6AdminTool":
  12. player has permission "Admin"
  13. stop
  14. else:
  15. cancel the event
  16. set action bar of player to "{@prefix} : &fチェストを破壊することはできません"#*skRayfall
  17.  
  18. on break of sign:
  19. if "%name of player's tool%" is "&6AdminTool":
  20. player has permission "Admin"
  21. stop
  22. line 1 of event-block contains "locked*"
  23. if line 1 of event-block contains "%name of player%":
  24. add -1 to {locked.%player%}
  25. stop
  26. set action bar of player to "{@prefix} : &f他人の保護を破壊することはできません"#*skRayfall
  27. cancel the event
  28.  
  29. #保護化----------------------------------------------------------------
  30. on sign change:
  31. block behind event-block is {@chest}
  32. if line 1 contains "locked*":
  33. cancel the event
  34. make player execute command "/skLock"
  35. stop
  36. if line 1 is "lock":
  37. loop blocks in radius 3 of event-block:
  38. loop-block is sign
  39. line 1 of loop-block contains "locked*"
  40. line 1 of loop-block does not contain "%name of player%"
  41. message "{@prefix} : &c他の人の保護領域から3ブロック以上離して下さい!" to player
  42. message "&7 - &e/skLock &7: マニュアルを表示"
  43. break event-block
  44. stop
  45. if {locked.%player%} is more than or equal to {@max}:
  46. message "{@prefix} : &cチェスト保護は &f{@max}箇所 &cまでに制限されています" to player
  47. message "&7 - &e/skLock &7: マニュアルを表示"
  48. break event-block
  49. stop
  50. set line 1 to "&1locked*%name of player%"
  51. add 1 to {locked.%player%}
  52. stop
  53. else:
  54. block behind event-block is {@chest}
  55.  
  56. on rightclick on {@chest}:
  57. cancel the event
  58. loop blocks in radius 2 of clicked block:
  59. delete {_check}
  60. loop-block is sign
  61. line 1 of loop-block contains "locked*"
  62. if location of the block behind loop-block is location of clicked block:
  63. set {_check} to true
  64. if location of the block 2 behind loop-block is location of clicked block:
  65. set {_check} to true
  66. if {_check} is true:
  67. if line 1 of loop-block does not contain "%name of player%":
  68. if line 2 of loop-block does not contain "%name of player%":
  69. if line 3 of loop-block does not contain "%name of player%":
  70. if line 4 of loop-block does not contain "%name of player%":
  71. set {_locked} to true
  72. if {_loc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement