Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix: &7[&eskLock&7]&f
- max: 4#チェスト保護の一人あたりの最大数
- chest_unbreakable: true#trueにするとAdminToolという名前の道具以外ではチェストを破壊不可に
- chest: chest or trapped chest#保護対象
- #チェスト・サイン破壊阻止
- on break of chest or trapped chest:
- {@chest_unbreakable} is true
- if "%name of player's tool%" is "&6AdminTool":
- player has permission "Admin"
- stop
- else:
- cancel the event
- set action bar of player to "{@prefix} : &fチェストを破壊することはできません"#*skRayfall
- on break of sign:
- if "%name of player's tool%" is "&6AdminTool":
- player has permission "Admin"
- stop
- line 1 of event-block contains "locked*"
- if line 1 of event-block contains "%name of player%":
- add -1 to {locked.%player%}
- stop
- set action bar of player to "{@prefix} : &f他人の保護を破壊することはできません"#*skRayfall
- cancel the event
- #保護化----------------------------------------------------------------
- on sign change:
- block behind event-block is {@chest}
- if line 1 contains "locked*":
- cancel the event
- make player execute command "/skLock"
- stop
- if line 1 is "lock":
- loop blocks in radius 3 of event-block:
- loop-block is sign
- line 1 of loop-block contains "locked*"
- line 1 of loop-block does not contain "%name of player%"
- message "{@prefix} : &c他の人の保護領域から3ブロック以上離して下さい!" to player
- message "&7 - &e/skLock &7: マニュアルを表示"
- break event-block
- stop
- if {locked.%player%} is more than or equal to {@max}:
- message "{@prefix} : &cチェスト保護は &f{@max}箇所 &cまでに制限されています" to player
- message "&7 - &e/skLock &7: マニュアルを表示"
- break event-block
- stop
- set line 1 to "&1locked*%name of player%"
- add 1 to {locked.%player%}
- stop
- else:
- block behind event-block is {@chest}
- on rightclick on {@chest}:
- cancel the event
- loop blocks in radius 2 of clicked block:
- delete {_check}
- loop-block is sign
- line 1 of loop-block contains "locked*"
- if location of the block behind loop-block is location of clicked block:
- set {_check} to true
- if location of the block 2 behind loop-block is location of clicked block:
- set {_check} to true
- if {_check} is true:
- if line 1 of loop-block does not contain "%name of player%":
- if line 2 of loop-block does not contain "%name of player%":
- if line 3 of loop-block does not contain "%name of player%":
- if line 4 of loop-block does not contain "%name of player%":
- set {_locked} to true
- if {_loc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement