Date: 2015/10/25 05:36:04 UTC-07:00
Type: Denizen Script
Backpack Cmd:
type: command
debug: false
name: bp
permission: command.backpack
permission message: <&c>Upgrade to <&a>Premium <&c>for this feature!
aliases:
- backpack
- pack
usage: /bp
description: Open your backpack!
script:
- if <context.server> {
- narrate "<&c>This is a player only command!"
- queue clear
}
- if <player.has_permission[backpack.admin]> && <context.args.size> == 1 {
- define Owner "<server.match_offline_player[<context.args.get[1]>]||null>"
- if <def[Owner]> == null {
- narrate "<&c>Cannot find that player!"
- queue clear
}
- define Backpack "<proc[Find Backpack].context[<def[Owner]>]>"
- if <def[Backpack]> == null {
- narrate "<&c>This player does not own a backpack."
- queue clear
}
}
else {
- define Backpack "<proc[Find Backpack].context[<player>]>"
}
- inventory open d:<def[Backpack]>