Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #情報----------------------------------------------------------
- プラグイン名:skLock
- 製作者 名:lucky777_
- 機 能 :チェストの保護機能の実装
- #チェスト制限----------------------------------------------------------
- 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 {_locked} is true:
- set action bar of player to "{@prefix} &e鍵がかかっている!"
- play "block_chest_locked" to player
- stop
- else:
- open clicked block to player
- on rightclick on sign:
- if line 1 of target block does not contain "%name of player%":
- if line 2 of target block does not contain "%name of player%":
- if line 3 of target block does not contain "%name of player%":
- if line 4 of target block does not contain "%name of player%":
- broadcast "no name"
- #マニュアル----------------------------------------------------------------
- command /skLock:
- permission:skript.Member
- permission message: このコマンドを実効するにはMemberになる必要があります。
- trigger:
- message "&7///////////////////////////////////////////////////////////"
- message "{@prefix}&e skLock v1.0 by lucky777_"
- message "&7----&eチェスト保護の方法"
- message "&71 - &fチェストに対して看板を貼り付ける"
- message "&72 - &f1行目に'lock'と記入(オーナーの名前は記入不要)"
- message "&73 - &f共同使用者がいる場合は、2行目以降に名前を記入"
- message "&7----&e保護の解除方法"
- message "&71 - &fチェストに貼り付けた看板を破壊する(オーナーのみ可能)"
- message "&7----&e留意事項"
- message "&71 - &fチェスト保護の最大数は &e{@max}個 &fです"
- if {locked.%player%} is set:
- message "&71 - &fあなたは現在 &e%{locked.%player%}%個 &fの保護をかけています"
- else:
- message "&71 - &fあなたは現在 &e0個 &fの保護をかけています"
- message "&72 - &f保護可能なブロックは&e{@chest}&fです"
- if {@chest_unbreakable} is true:
- message "&73 - &fチェスト破壊防止機能は&eオン&fになっています"
- else:
- message "&73 - &fチェスト破壊防止機能は&eオフ&fになっています"
- message "&74 - &f看板の背後2ブロックが保護の対象です。"
- message "&74 - &fラージチェストの保護は側面に看板を貼って下さい"
- message "&75 - &f他のオーナーの保護から3ブロック以内の場所では保護ができません"
- message "&7----&eCommands"
- message "&71 - &e/skLock &7: マニュアルを表示"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement