Add dupe prevention mechanism and fix LiteProfiles menu edge case
This commit is contained in:
@@ -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