dEssentials Home Menu
By
n0nnieCreated: 2018/10/27 13:00:51 UTC-07:00 (6 years and 58 days ago)
Edited: 2018/10/27 13:13:08 UTC-07:00 (6 years and 58 days ago)
Likes: 0
Denizen Version: 1.0.2-SNAPSHOT (build 1651)
Script Version: 0.7.6
Description:
Description:
=================================================
A little Menu, designed to work with Essentials. If you have more then 1 home the command /home will bring up a menu where you can decide where to go. This is designed to work with the home system of essentials, so it will show nothing if your server does not have essentials or essentialsx (see dependencies), or you are using another plugin which provides the /home command.
Dependencies:
================================================
- Depenizen
- Essentials or EssentialsX
- Vault (if Essentials uses Vault duh)
Notes:
=================================================
- This script is in German, you have to uncomment the comments and to comment the german lines vise versa, if you need english. A translationfile with a config seemed to be too much effort for this little script to change 6 lines in a 70 Line script ;)
- Regarding the bed Colors: If your players are able to have more then 16 homes, the 17th home (and further ones) will show as white beds. If the Maximum number of your allowed homes exceeds 15, I recommend to change the line 6 to your likings. At the moment it supports 15 homes, further homes will not be shown. (slotnumber - 3 == max shown home number)
- if <reader.suggestion.get[1]||null> != null {
- write me in discord n0nnie#2721
}
Download script |
View raw scriptdessentials_home_menu:
type: inventory
debug: true
inventory: chest
title: <red>Heim Menu
size: 18
definitions:
# translate: uhu: i@human_skull[skull_skin=<player.name>;display_name=<&4>Your Home Menu;lore=<&2>The beds are showing your homes]
uhu: i@human_skull[skull_skin=<player.name>;display_name=<&4>Das Heim Menu;lore=<&2>Die Betten zeigen Deine Heime]
# translate: bed: i@bed:14[display_name=<&4>Your Bed;lore=<&2>Only for bed owners]
bed: i@bed:14[display_name=<&4>Dein Bett;lore=<&2>Nur, wenn Du ein Bett hast]
procedural items:
- define list li@
- foreach <player.home_name_list>:
- define item i@bed:<def[loop_index].sub[1]>[lore=<def[value]>]
#translate: - adjust <def[item]> display_name:Teleportingtarget save:item
- adjust <def[item]> display_name:Teleportziel save:item
- adjust <entry[item].result> "lore:<def[value]>" save:item
- define item <entry[item].result>
- define list <def[list].include[<def[item]>]>
- determine <def[list]>
slots:
- "[uhu] [bed] [i@air] [] [] [] [] [] [] "
- "[] [] [] [] [] [] [] [] []"
dessentials_home_menu_handler:
type: world
debug: true
events:
on player clicks in dessentials_home_menu:
- if <c.item.material.contains[bed]> {
- if <c.item.display.contains[Dein<&sp>Bett].not> {
- execute as_player "home <c.item.lore.get[1]||ibash>"
#translate: - narrate "<&6>You are going to your home: <&2><c.item.lore.get[1]||ibash>"
- narrate "<&6>Du gehst zu Deinem Heim: <&2><c.item.lore.get[1]||ibash>"
- inventory close d:<c.inventory>
- queue clear
}
- if <player.bed_spawn> == null {
#translate - narrate "<&4>You do not own a bed, where you can go to!"
- narrate "<&4>Du hast kein Bett, zu dem Du teleportieren kannst!"
- queue clear
}
else {
- execute as_player "home bed"
- queue clear
}
}
- determine passively cancelled
on home command:
- if <player.has_permission[essentials.home].not> {
#translate: - narrate "<&4>You do not have the permission to use this!"
- narrate "<&4>Du hast nicht die Permission, dies zu benutzen!"
}
- if <c.args.get[1]||null> == null && <player.home_name_list.size> >= 2 && <player.has_permission[essentials.home]> {
- inventory open d:in@dessentials_home_menu
- determine fulfilled
}
- if <c.args.get[1]||null> != null && <player.home_name_list.size> < 2 && <player.has_permission[essentials.home]> {
- queue clear
}
home_menu_version:
type: dessentials_home_menu
name: dEssentials Home Menu
description: /home brings up a menu for your homes
version: 0.7.6
author: n0nnie
id: 151
View History