Add dupe prevention mechanism and fix LiteProfiles menu edge case
This commit is contained in:
@@ -4,7 +4,12 @@ liteprofilesutils_data:
|
||||
rank-sync:
|
||||
- owner
|
||||
- admin
|
||||
- mod
|
||||
- media
|
||||
- lore
|
||||
- event
|
||||
- dev
|
||||
- builder
|
||||
sync-op: true
|
||||
join-leave:
|
||||
join: <&8>[<&a>+<&8>] <&7><player.name>
|
||||
|
||||
@@ -64,7 +64,7 @@ liteprofilesutils_show_menu:
|
||||
- adjust def:freeitem lore:<list[<&f>Click here to create a new profile]>
|
||||
- flag <[freeitem]> liteprofiles:<map[].with[type].as[free]>
|
||||
- define contents <[contents].include[<[freeitem]>]>
|
||||
- repeat <[profilelimit].sub[<[profilecount]>]>:
|
||||
- repeat <[profilelimit].sub[<[profilecount]>].sub[2]>:
|
||||
- define unuseditem <item[gray_dye]>
|
||||
- adjust def:unuseditem "display:<&7>Free Slot"
|
||||
- define contents <[contents].include[<[unuseditem]>]>
|
||||
|
||||
@@ -106,4 +106,3 @@ liteprofilesutils_world:
|
||||
- if <[master]> == <[uuid]>:
|
||||
- stop
|
||||
- adjust <player[<[uuid]>]> whitelisted:<player[<[master]>].is_whitelisted>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ compatibility_check_world:
|
||||
after player joins:
|
||||
- if <proc[settings_get].context[<player>|general_ignore_version_compatibility_check]>:
|
||||
- stop
|
||||
- define player_version <player.viaversion_version.split[-].get[2]>
|
||||
- define player_version <player.viaversion_version>
|
||||
- define server_version <server.version.split[(].get[2].split[:].get[2].split[)].get[1].trim>
|
||||
- if <proc[compatibility_check_compare_versions].context[<[player_version]>|<[server_version]>]> == -1:
|
||||
- wait 5s
|
||||
|
||||
26
scripts/misc/no_duping_custom_items.dsc
Normal file
26
scripts/misc/no_duping_custom_items.dsc
Normal file
@@ -0,0 +1,26 @@
|
||||
no_duping_custom_items:
|
||||
debug: false
|
||||
type: world
|
||||
events:
|
||||
on player clicks item in inventory:
|
||||
- if <player.is_op>:
|
||||
- stop
|
||||
- if <player.gamemode> != creative:
|
||||
- stop
|
||||
- if <context.item.material.advanced_matches[iron_horse_armor|note_block].if_null[true]> && <context.cursor_item.material.advanced_matches[iron_horse_armor|note_block].if_null[true]>:
|
||||
- stop
|
||||
- if <context.item.has_custom_model_data.if_null[false]> || <context.cursor_item.has_custom_model_data.if_null[false]>:
|
||||
- determine cancelled passively
|
||||
- adjust <player> item_on_cursor:air
|
||||
- inventory update
|
||||
on player drags in inventory:
|
||||
- if <player.is_op>:
|
||||
- stop
|
||||
- if <player.gamemode> != creative:
|
||||
- stop
|
||||
- if <context.item.material.advanced_matches[iron_horse_armor|note_block].if_null[true]> && <context.cursor_item.material.advanced_matches[iron_horse_armor|note_block].if_null[true]>:
|
||||
- stop
|
||||
- if <context.item.has_custom_model_data.if_null[false]> || <context.cursor_item.has_custom_model_data.if_null[false]>:
|
||||
- determine cancelled passively
|
||||
- adjust <player> item_on_cursor:air
|
||||
- inventory update
|
||||
Reference in New Issue
Block a user