Staff Pick: NPC Skin Save/Load
By
mcmonkeyCreated: 2018/07/07 17:00:34 UTC-07:00 (6 years and 200 days ago)
Edited: 2018/07/07 17:00:34 UTC-07:00 (6 years and 200 days ago)
Likes: 2
Staff pick as of: 2018/07/07 17:00:40 UTC-07:00 (6 years and 200 days ago)
Denizen Version: 1.0.2
Script Version: 1
Description:
Just a quick+easy tool to save and load NPC skins on a server (so you don't have to reload from Mojang every time)
Download script |
View raw scriptnpc_skin_save_command:
type: command
name: saveskin
usage: /saveskin [name]
description: Saves ye skin
permission: denizen.saveskin
script:
- inject npc_skin_validate
- flag server npc_skins.<context.args.get[1].escaped>:<player.selected_npc.skin_blob>;<player.selected_npc.name>
npc_skin_load_command:
type: command
name: loadskin
usage: /loadskin [name]
description: Loads ye skin
permission: denizen.saveskin
script:
- inject npc_skin_validate
- if !<server.has_flag[npc_skins.<context.args.get[1].escaped>]> {
- narrate "No skin found"
- queue clear
}
- adjust <player.selected_npc> skin_blob:<server.flag[npc_skins.<context.args.get[1].escaped>]>
npc_skin_validate:
type: task
script:
- if !<player.has_permission[denizen.saveskin]||<<player.is_op||context.server>>> {
- narrate "Nope!"
- queue clear
}
- if <context.args.size> == 0 {
- narrate "/saveskin [name]"
- queue clear
}
- if <player.selected_npc||null> == null {
- narrate "Select an NPC!"
- queue clear
}
View History