├── .gitignore ├── data ├── global_shop │ ├── functions │ │ ├── utils │ │ │ ├── item_text │ │ │ │ ├── get_attributes.mcfunction │ │ │ │ ├── get_attributes │ │ │ │ │ └── walk.mcfunction │ │ │ │ ├── get_enchantments.mcfunction │ │ │ │ ├── get_lores │ │ │ │ │ ├── macro2.mcfunction │ │ │ │ │ └── macro.mcfunction │ │ │ │ └── get_customname.mcfunction │ │ │ ├── string_helper │ │ │ │ └── split_namespace_id │ │ │ │ │ ├── get_namespace.mcfunction │ │ │ │ │ └── get_id.mcfunction │ │ │ └── math_utils │ │ │ │ └── abs.mcfunction │ │ ├── logic │ │ │ ├── item_data │ │ │ │ ├── item_id_translate_json_get_trans.mcfunction │ │ │ │ ├── add_seperator.mcfunction │ │ │ │ ├── parse_enchantment │ │ │ │ │ ├── macro │ │ │ │ │ │ ├── if_level1.mcfunction │ │ │ │ │ │ ├── concat_id_string.mcfunction │ │ │ │ │ │ ├── set_pair.mcfunction │ │ │ │ │ │ ├── find_translate_key.mcfunction │ │ │ │ │ │ ├── append_level_string.mcfunction │ │ │ │ │ │ └── if_curse.mcfunction │ │ │ │ │ ├── limit_size.mcfunction │ │ │ │ │ └── append_level_string.mcfunction │ │ │ │ ├── parse_lore │ │ │ │ │ ├── 1.mcfunction │ │ │ │ │ ├── 1_to_8.mcfunction │ │ │ │ │ ├── 9_to_16.mcfunction │ │ │ │ │ ├── 2.mcfunction │ │ │ │ │ ├── 1_to_4.mcfunction │ │ │ │ │ ├── 5_to_8.mcfunction │ │ │ │ │ ├── 9_to_12.mcfunction │ │ │ │ │ └── 13_to_16.mcfunction │ │ │ │ ├── item_tag_to_string │ │ │ │ │ └── macro_get_string.mcfunction │ │ │ │ ├── check_all_slot │ │ │ │ │ └── continue.mcfunction │ │ │ │ ├── parse_item_id.mcfunction │ │ │ │ ├── to_string.mcfunction │ │ │ │ ├── polymorphic_type │ │ │ │ │ ├── 4_to_7.mcfunction │ │ │ │ │ ├── 0_to_3.mcfunction │ │ │ │ │ ├── 6_to_7.mcfunction │ │ │ │ │ ├── 8.mcfunction │ │ │ │ │ ├── 4_to_5.mcfunction │ │ │ │ │ ├── 0_to_1.mcfunction │ │ │ │ │ └── 2_to_3.mcfunction │ │ │ │ ├── control_item_data │ │ │ │ │ └── to_string.mcfunction │ │ │ │ ├── add_diviver.mcfunction │ │ │ │ ├── item_id_translate_json_get_translate.mcfunction │ │ │ │ └── revert.mcfunction │ │ │ ├── text_display │ │ │ │ ├── kill.mcfunction │ │ │ │ ├── init_state.mcfunction │ │ │ │ ├── disappear.mcfunction │ │ │ │ ├── clear_text.mcfunction │ │ │ │ ├── set_state_normal.mcfunction │ │ │ │ ├── text_display │ │ │ │ │ └── set_custom_position │ │ │ │ │ │ └── get_player_settings.mcfunction │ │ │ │ └── parse_and_set_text.mcfunction │ │ │ ├── interactor │ │ │ │ ├── clear_left_click_action.mcfunction │ │ │ │ ├── clear_right_click_action.mcfunction │ │ │ │ ├── kill.mcfunction │ │ │ │ ├── init_state.mcfunction │ │ │ │ ├── clear_left_and_right_click_action.mcfunction │ │ │ │ ├── get_right_click_action │ │ │ │ │ └── get_player_uuid.mcfunction │ │ │ │ ├── get_left_click_action.mcfunction │ │ │ │ └── get_right_click_action.mcfunction │ │ │ ├── item_display_entity │ │ │ │ ├── set_state_will_buy.mcfunction │ │ │ │ ├── set_state_will_set.mcfunction │ │ │ │ ├── set_state_will_delete.mcfunction │ │ │ │ ├── set_state_will_recycle.mcfunction │ │ │ │ ├── display_count │ │ │ │ │ ├── check_text_display.mcfunction │ │ │ │ │ └── check_text_display_without_animation.mcfunction │ │ │ │ ├── set_state_highlight_delay.mcfunction │ │ │ │ ├── set_state_highlight.mcfunction │ │ │ │ ├── flush_display_text.mcfunction │ │ │ │ ├── display_text.mcfunction │ │ │ │ ├── disappear.mcfunction │ │ │ │ ├── set_state_normal.mcfunction │ │ │ │ └── kill.mcfunction │ │ │ ├── player │ │ │ │ ├── modify_item_count │ │ │ │ │ ├── 0.mcfunction │ │ │ │ │ ├── 1.mcfunction │ │ │ │ │ ├── 2.mcfunction │ │ │ │ │ ├── 3.mcfunction │ │ │ │ │ ├── 4.mcfunction │ │ │ │ │ ├── 5.mcfunction │ │ │ │ │ ├── 6.mcfunction │ │ │ │ │ ├── 7.mcfunction │ │ │ │ │ ├── 8.mcfunction │ │ │ │ │ ├── 10.mcfunction │ │ │ │ │ ├── 11.mcfunction │ │ │ │ │ ├── 12.mcfunction │ │ │ │ │ ├── 13.mcfunction │ │ │ │ │ ├── 14.mcfunction │ │ │ │ │ ├── 15.mcfunction │ │ │ │ │ ├── 16.mcfunction │ │ │ │ │ ├── 17.mcfunction │ │ │ │ │ ├── 18.mcfunction │ │ │ │ │ ├── 19.mcfunction │ │ │ │ │ ├── 20.mcfunction │ │ │ │ │ ├── 21.mcfunction │ │ │ │ │ ├── 22.mcfunction │ │ │ │ │ ├── 23.mcfunction │ │ │ │ │ ├── 24.mcfunction │ │ │ │ │ ├── 25.mcfunction │ │ │ │ │ ├── 26.mcfunction │ │ │ │ │ ├── 27.mcfunction │ │ │ │ │ ├── 28.mcfunction │ │ │ │ │ ├── 29.mcfunction │ │ │ │ │ ├── 30.mcfunction │ │ │ │ │ ├── 31.mcfunction │ │ │ │ │ ├── 32.mcfunction │ │ │ │ │ ├── 33.mcfunction │ │ │ │ │ ├── 34.mcfunction │ │ │ │ │ ├── 35.mcfunction │ │ │ │ │ ├── 9.mcfunction │ │ │ │ │ ├── 0_to_2.mcfunction │ │ │ │ │ ├── 3_to_5.mcfunction │ │ │ │ │ ├── 6_to_8.mcfunction │ │ │ │ │ ├── 12_to_14.mcfunction │ │ │ │ │ ├── 15_to_17.mcfunction │ │ │ │ │ ├── 18_to_20.mcfunction │ │ │ │ │ ├── 21_to_23.mcfunction │ │ │ │ │ ├── 24_to_26.mcfunction │ │ │ │ │ ├── 27_to_29.mcfunction │ │ │ │ │ ├── 30_to_32.mcfunction │ │ │ │ │ ├── 33_to_35.mcfunction │ │ │ │ │ ├── 9_to_11.mcfunction │ │ │ │ │ ├── 0_to_8.mcfunction │ │ │ │ │ ├── 18_to_26.mcfunction │ │ │ │ │ ├── 27_to_35.mcfunction │ │ │ │ │ └── 9_to_17.mcfunction │ │ │ │ ├── get_uid_by_name │ │ │ │ │ └── macro_get.mcfunction │ │ │ │ ├── init_state.mcfunction │ │ │ │ ├── clear_slot.mcfunction │ │ │ │ ├── get_ban_state.mcfunction │ │ │ │ ├── reduce_money.mcfunction │ │ │ │ ├── add_money.mcfunction │ │ │ │ ├── init_scoreboard.mcfunction │ │ │ │ ├── on_exit_shop.mcfunction │ │ │ │ ├── notice_trigger_easter_egg.mcfunction │ │ │ │ ├── ban_deban_player │ │ │ │ │ ├── ban │ │ │ │ │ │ └── force_exit.mcfunction │ │ │ │ │ └── deban.mcfunction │ │ │ │ ├── parse_player_name │ │ │ │ │ └── get_name.mcfunction │ │ │ │ ├── get_uid_by_name.mcfunction │ │ │ │ ├── give_item.mcfunction │ │ │ │ ├── give_money.mcfunction │ │ │ │ ├── give_item │ │ │ │ │ └── modify.mcfunction │ │ │ │ └── get_money.mcfunction │ │ │ ├── menu │ │ │ │ ├── kill │ │ │ │ │ ├── kill_passengers.mcfunction │ │ │ │ │ ├── player.mcfunction │ │ │ │ │ └── kill_passengers │ │ │ │ │ │ └── 1.mcfunction │ │ │ │ ├── dimension_change_to_close.mcfunction │ │ │ │ ├── handlers │ │ │ │ │ ├── menu_handler │ │ │ │ │ │ ├── rotate │ │ │ │ │ │ │ └── macro_tp.mcfunction │ │ │ │ │ │ ├── get_angle_diff │ │ │ │ │ │ │ ├── 2.mcfunction │ │ │ │ │ │ │ └── 1.mcfunction │ │ │ │ │ │ ├── handle │ │ │ │ │ │ │ ├── update_last_click_order.mcfunction │ │ │ │ │ │ │ └── invalid_player_input.mcfunction │ │ │ │ │ │ ├── change_mode │ │ │ │ │ │ │ ├── player_cash_exchange │ │ │ │ │ │ │ │ ├── success.mcfunction │ │ │ │ │ │ │ │ └── other_op.mcfunction │ │ │ │ │ │ │ ├── edit_cash_exchange │ │ │ │ │ │ │ │ ├── success.mcfunction │ │ │ │ │ │ │ │ └── other_op.mcfunction │ │ │ │ │ │ │ ├── player_shop │ │ │ │ │ │ │ │ └── title_and_enable.mcfunction │ │ │ │ │ │ │ └── edit_main │ │ │ │ │ │ │ │ └── no_permission.mcfunction │ │ │ │ │ │ ├── get_back_action.mcfunction │ │ │ │ │ │ ├── get_select_action.mcfunction │ │ │ │ │ │ └── get_viewed_item_order │ │ │ │ │ │ │ └── 1.mcfunction │ │ │ │ │ ├── main_menu_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ ├── welcome.mcfunction │ │ │ │ │ │ │ ├── change_mode_to_edit_mode.mcfunction │ │ │ │ │ │ │ ├── change_mode_to_sell_shop.mcfunction │ │ │ │ │ │ │ ├── change_mode_to_recycle_shop.mcfunction │ │ │ │ │ │ │ ├── change_mode_to_player_setting.mcfunction │ │ │ │ │ │ │ ├── change_mode_to_player_cash_exchange.mcfunction │ │ │ │ │ │ │ └── change_mode_to_player_shop_main.mcfunction │ │ │ │ │ │ │ ├── highlight_item_and_display_text │ │ │ │ │ │ │ └── is_not_target.mcfunction │ │ │ │ │ │ │ ├── player_back │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ └── player_back.mcfunction │ │ │ │ │ ├── edit_cash_exchange_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── set_exchange_rate │ │ │ │ │ │ │ └── macro.mcfunction │ │ │ │ │ │ │ ├── player_back.mcfunction │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ ├── try_disable │ │ │ │ │ │ │ │ └── no_select.mcfunction │ │ │ │ │ │ │ ├── try_set_item │ │ │ │ │ │ │ │ ├── disabled.mcfunction │ │ │ │ │ │ │ │ ├── no_select.mcfunction │ │ │ │ │ │ │ │ ├── mainhand_empty.mcfunction │ │ │ │ │ │ │ │ └── hold_cash.mcfunction │ │ │ │ │ │ │ └── try_set_price │ │ │ │ │ │ │ │ ├── disabled.mcfunction │ │ │ │ │ │ │ │ └── no_select.mcfunction │ │ │ │ │ │ │ └── trigger_input │ │ │ │ │ │ │ ├── disable_cash │ │ │ │ │ │ │ ├── disable_tellraw.mcfunction │ │ │ │ │ │ │ ├── enable_tellraw.mcfunction │ │ │ │ │ │ │ ├── 0_enable.mcfunction │ │ │ │ │ │ │ ├── 1_enable.mcfunction │ │ │ │ │ │ │ ├── 2_enable.mcfunction │ │ │ │ │ │ │ ├── 3_enable.mcfunction │ │ │ │ │ │ │ └── 4_enable.mcfunction │ │ │ │ │ │ │ ├── set_item │ │ │ │ │ │ │ └── success_tellraw.mcfunction │ │ │ │ │ │ │ └── set_price │ │ │ │ │ │ │ ├── success_tellraw.mcfunction │ │ │ │ │ │ │ ├── disabled.mcfunction │ │ │ │ │ │ │ └── illegal_price.mcfunction │ │ │ │ │ ├── player_shop_view_my_selling_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── item_not_exist │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── item_not_exist.mcfunction │ │ │ │ │ │ │ ├── player_back.mcfunction │ │ │ │ │ │ │ └── player_left_click_confirm │ │ │ │ │ │ │ └── tip_and_get_player_uid.mcfunction │ │ │ │ │ ├── player_shop_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── player_left_click_confirm │ │ │ │ │ │ │ ├── macro_add_seller_income.mcfunction │ │ │ │ │ │ │ ├── give_item_to_player_and_tip.mcfunction │ │ │ │ │ │ │ └── sell_by_myself │ │ │ │ │ │ │ │ └── tip_and_get_player_uid.mcfunction │ │ │ │ │ │ │ ├── item_not_exist │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── item_not_exist.mcfunction │ │ │ │ │ │ │ └── player_back.mcfunction │ │ │ │ │ ├── edit_view_sell_shop_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── player_back.mcfunction │ │ │ │ │ │ │ ├── item_not_exist │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── player_left_click_confirm │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ └── item_not_exist.mcfunction │ │ │ │ │ ├── edit_view_recycle_shop_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── player_back.mcfunction │ │ │ │ │ │ │ ├── item_not_exist │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── player_left_click_confirm │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ └── item_not_exist.mcfunction │ │ │ │ │ ├── player_shop_view_return_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ └── send_tip.mcfunction │ │ │ │ │ │ │ ├── item_not_exist │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── item_not_exist.mcfunction │ │ │ │ │ │ │ ├── player_back.mcfunction │ │ │ │ │ │ │ └── player_left_click_confirm │ │ │ │ │ │ │ └── tip_and_get_player_uid.mcfunction │ │ │ │ │ ├── admin_setting_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ └── player_back.mcfunction │ │ │ │ │ ├── edit_main_menu_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ ├── change_mode │ │ │ │ │ │ │ │ ├── edit_cash_exchange.mcfunction │ │ │ │ │ │ │ │ ├── edit_view_sell_shop.mcfunction │ │ │ │ │ │ │ │ ├── edit_view_recycle_shop.mcfunction │ │ │ │ │ │ │ │ └── admin_setting.mcfunction │ │ │ │ │ │ │ └── unistall.mcfunction │ │ │ │ │ │ │ ├── admin_add_sell_item │ │ │ │ │ │ │ ├── main_hand_has_no_item.mcfunction │ │ │ │ │ │ │ ├── hold_cash.mcfunction │ │ │ │ │ │ │ └── negative_num.mcfunction │ │ │ │ │ │ │ ├── admin_add_recycle_item │ │ │ │ │ │ │ ├── main_hand_has_no_item.mcfunction │ │ │ │ │ │ │ ├── hold_cash.mcfunction │ │ │ │ │ │ │ └── negative_num.mcfunction │ │ │ │ │ │ │ └── player_back.mcfunction │ │ │ │ │ ├── player_shop_main_menu_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ ├── change_mode_to_player_shop.mcfunction │ │ │ │ │ │ │ ├── change_mode_to_player_shop_view_my_sold.mcfunction │ │ │ │ │ │ │ ├── change_mode_to_player_shop_view_return.mcfunction │ │ │ │ │ │ │ ├── change_mode_to_player_shop_view_my_bought.mcfunction │ │ │ │ │ │ │ ├── change_mode_to_player_shop_view_my_selling.mcfunction │ │ │ │ │ │ │ ├── tellraw_money.mcfunction │ │ │ │ │ │ │ └── sell_item.mcfunction │ │ │ │ │ │ │ ├── player_back.mcfunction │ │ │ │ │ │ │ └── player_sell_item │ │ │ │ │ │ │ ├── main_hand_has_no_item.mcfunction │ │ │ │ │ │ │ ├── hold_cash.mcfunction │ │ │ │ │ │ │ └── negative_num.mcfunction │ │ │ │ │ ├── sell_shop_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── item_not_exist │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── item_not_exist.mcfunction │ │ │ │ │ │ │ └── player_back.mcfunction │ │ │ │ │ ├── recycle_shop_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── item_not_exist │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── player_back.mcfunction │ │ │ │ │ │ │ ├── item_not_exist.mcfunction │ │ │ │ │ │ │ └── recycle │ │ │ │ │ │ │ └── while_list_has_two_elems.mcfunction │ │ │ │ │ ├── player_shop_view_my_sold_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── item_not_exist │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── item_not_exist.mcfunction │ │ │ │ │ │ │ └── player_back.mcfunction │ │ │ │ │ ├── player_shop_view_my_bought_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── item_not_exist │ │ │ │ │ │ │ └── tip.mcfunction │ │ │ │ │ │ │ ├── item_not_exist.mcfunction │ │ │ │ │ │ │ └── player_back.mcfunction │ │ │ │ │ ├── player_cash_exchange_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ ├── exchange_n │ │ │ │ │ │ │ │ └── cash_disabled.mcfunction │ │ │ │ │ │ │ └── deposit │ │ │ │ │ │ │ │ └── no_cash_on_hand.mcfunction │ │ │ │ │ │ │ ├── force_back │ │ │ │ │ │ │ └── tellraw.mcfunction │ │ │ │ │ │ │ └── player_back.mcfunction │ │ │ │ │ ├── rotatable_menu_handler │ │ │ │ │ │ ├── handle │ │ │ │ │ │ │ ├── player_left_click │ │ │ │ │ │ │ │ └── click_control_null_item.mcfunction │ │ │ │ │ │ │ └── update_last_click_id.mcfunction │ │ │ │ │ │ └── get_viewed_item_order.mcfunction │ │ │ │ │ └── player_setting_handler │ │ │ │ │ │ └── handle │ │ │ │ │ │ └── player_back.mcfunction │ │ │ │ ├── menu │ │ │ │ │ ├── open_menu_success │ │ │ │ │ │ ├── init_passengers.mcfunction │ │ │ │ │ │ ├── init_passengers │ │ │ │ │ │ │ └── 1.mcfunction │ │ │ │ │ │ ├── easter_egg.mcfunction │ │ │ │ │ │ ├── init_state.mcfunction │ │ │ │ │ │ └── trigger_easter_egg.mcfunction │ │ │ │ │ ├── banned.mcfunction │ │ │ │ │ ├── die.mcfunction │ │ │ │ │ ├── reach_max_use_limit.mcfunction │ │ │ │ │ ├── player_using_shop_around.mcfunction │ │ │ │ │ ├── check_env │ │ │ │ │ │ ├── duplicate_open.mcfunction │ │ │ │ │ │ └── invalid_dimension.mcfunction │ │ │ │ │ ├── check_if_player_using_shop_around.mcfunction │ │ │ │ │ └── invalid_block.mcfunction │ │ │ │ ├── kill_item_displays.mcfunction │ │ │ │ ├── disappear.mcfunction │ │ │ │ ├── check_completeness │ │ │ │ │ └── 1.mcfunction │ │ │ │ ├── polymorphic_mode │ │ │ │ │ ├── 0_to_6.mcfunction │ │ │ │ │ ├── 7_to_12.mcfunction │ │ │ │ │ └── 11_to_12.mcfunction │ │ │ │ ├── check_position_change_to_close.mcfunction │ │ │ │ ├── perform │ │ │ │ │ ├── incomplete.mcfunction │ │ │ │ │ └── position_change.mcfunction │ │ │ │ ├── check_position_change.mcfunction │ │ │ │ └── polymorphic_mode.mcfunction │ │ │ ├── scheduler │ │ │ │ ├── tick.mcfunction │ │ │ │ ├── init.mcfunction │ │ │ │ ├── 1m.mcfunction │ │ │ │ ├── 1m │ │ │ │ │ ├── kill_residual_entity │ │ │ │ │ │ └── exclude.mcfunction │ │ │ │ │ └── return_expire_item.mcfunction │ │ │ │ ├── 1s │ │ │ │ │ ├── kill_delay_disappear_entity.mcfunction │ │ │ │ │ ├── handle_timing_in_seconds.mcfunction │ │ │ │ │ └── player_using_shop.mcfunction │ │ │ │ ├── 10t.mcfunction │ │ │ │ └── 1s.mcfunction │ │ │ ├── temp_world_entity │ │ │ │ ├── item │ │ │ │ │ ├── call.mcfunction │ │ │ │ │ └── 1.mcfunction │ │ │ │ ├── text_display │ │ │ │ │ ├── 1.mcfunction │ │ │ │ │ └── call.mcfunction │ │ │ │ └── marker │ │ │ │ │ └── carry.mcfunction │ │ │ ├── shop │ │ │ │ └── perform │ │ │ │ │ ├── player │ │ │ │ │ └── check_if_exit.mcfunction │ │ │ │ │ └── count_connect_num.mcfunction │ │ │ └── inputter │ │ │ │ └── reset_and_disable.mcfunction │ │ ├── settings │ │ │ ├── stop.mcfunction │ │ │ ├── reinit_anyway.mcfunction │ │ │ ├── visible_item_info_frame.mcfunction │ │ │ ├── reinit.mcfunction │ │ │ ├── expire_all_item.mcfunction │ │ │ ├── get_permission.mcfunction │ │ │ └── return_expire_item.mcfunction │ │ ├── sound │ │ │ ├── jump.mcfunction │ │ │ ├── break.mcfunction │ │ │ ├── select.mcfunction │ │ │ ├── exit.mcfunction │ │ │ ├── success.mcfunction │ │ │ ├── target.mcfunction │ │ │ ├── fail.mcfunction │ │ │ ├── open_shop.mcfunction │ │ │ ├── change_menu.mcfunction │ │ │ ├── disable.mcfunction │ │ │ └── enable.mcfunction │ │ ├── test │ │ │ ├── test2.mcfunction │ │ │ ├── test1.mcfunction │ │ │ └── store_manager_test │ │ │ │ └── locate_index_in_player_shop_list_by_id_test.mcfunction │ │ ├── text │ │ │ ├── init │ │ │ │ └── macro.mcfunction │ │ │ └── init.mcfunction │ │ ├── storage │ │ │ └── store_manager │ │ │ │ ├── get_player_shop_list_size.mcfunction │ │ │ │ ├── get_return_list_size.mcfunction │ │ │ │ ├── get_player_selling_list_size.mcfunction │ │ │ │ ├── register_player │ │ │ │ ├── set_kv.mcfunction │ │ │ │ ├── reach_max_reg_limit.mcfunction │ │ │ │ └── parse_player_name_fail.mcfunction │ │ │ │ ├── return_expire_item │ │ │ │ ├── get_expire_num │ │ │ │ │ ├── while │ │ │ │ │ │ ├── if │ │ │ │ │ │ │ └── 1.mcfunction │ │ │ │ │ │ └── if.mcfunction │ │ │ │ │ └── macro_get_expire_time.mcfunction │ │ │ │ └── loop_return │ │ │ │ │ └── macro_delete_from_selling_list.mcfunction │ │ │ │ ├── locate_index_in_sell_shop_list_by_id │ │ │ │ ├── macro_get_id.mcfunction │ │ │ │ └── while │ │ │ │ │ ├── if.mcfunction │ │ │ │ │ └── else_if.mcfunction │ │ │ │ ├── locate_index_in_player_shop_list_by_id │ │ │ │ ├── macro_get_id.mcfunction │ │ │ │ └── while │ │ │ │ │ ├── if.mcfunction │ │ │ │ │ └── else_if.mcfunction │ │ │ │ ├── locate_index_in_recycle_shop_list_by_id │ │ │ │ ├── macro_get_id.mcfunction │ │ │ │ └── while │ │ │ │ │ ├── if.mcfunction │ │ │ │ │ └── else_if.mcfunction │ │ │ │ ├── get_player_name.mcfunction │ │ │ │ ├── get_sell_shop_list_elem_by_index │ │ │ │ └── macro_get.mcfunction │ │ │ │ ├── get_cache_list_page │ │ │ │ ├── get_elem_and_append │ │ │ │ │ └── 1.mcfunction │ │ │ │ └── 1.mcfunction │ │ │ │ ├── get_player_shop_list_elem_by_index │ │ │ │ └── macro_get.mcfunction │ │ │ │ ├── get_recycle_shop_list_elem_by_index │ │ │ │ └── macro_get.mcfunction │ │ │ │ ├── get_sell_shop_list_elem_by_index_and_append │ │ │ │ └── 1.mcfunction │ │ │ │ ├── delete_return_elem_by_uid_and_id │ │ │ │ └── macro_delete.mcfunction │ │ │ │ ├── get_player_shop_list_elem_by_index_and_append │ │ │ │ └── 1.mcfunction │ │ │ │ ├── get_recycle_shop_list_elem_by_index_and_append │ │ │ │ └── 1.mcfunction │ │ │ │ ├── delete_sell_shop_elem_by_id │ │ │ │ └── macro_delete.mcfunction │ │ │ │ ├── delete_recycle_shop_elem_by_id │ │ │ │ └── macro_delete.mcfunction │ │ │ │ ├── delete_sell_shop_elem_by_index │ │ │ │ └── macro_delete.mcfunction │ │ │ │ ├── append_to_return_list.mcfunction │ │ │ │ ├── delete_recycle_shop_elem_by_index │ │ │ │ └── macro_delete.mcfunction │ │ │ │ ├── append_to_sell_shop_list.mcfunction │ │ │ │ ├── append_to_recycle_shop_list.mcfunction │ │ │ │ ├── append_to_player_selling_list.mcfunction │ │ │ │ ├── delete_player_shop_elem_by_id │ │ │ │ └── macro_delete.mcfunction │ │ │ │ ├── get_return_list_elem_by_uid_and_id │ │ │ │ └── macro_get_elem.mcfunction │ │ │ │ ├── get_player_sold_list_elem_by_uid_and_id │ │ │ │ └── macro_get_elem.mcfunction │ │ │ │ ├── get_player_bought_list_elem_by_uid_and_id │ │ │ │ └── macro_get_elem.mcfunction │ │ │ │ ├── get_player_selling_list_elem_by_uid_and_id │ │ │ │ └── macro_get_elem.mcfunction │ │ │ │ ├── cache_player_shop_return_list.mcfunction │ │ │ │ ├── cache_player_shop_my_sold_list.mcfunction │ │ │ │ ├── get_sell_shop_list_page │ │ │ │ └── 1.mcfunction │ │ │ │ ├── cache_player_shop_my_bought_list.mcfunction │ │ │ │ ├── get_recycle_shop_list_page │ │ │ │ └── 1.mcfunction │ │ │ │ ├── get_player_shop_list_page │ │ │ │ └── 1.mcfunction │ │ │ │ ├── cache_player_shop_my_selling_list.mcfunction │ │ │ │ └── append_to_player_sold_list.mcfunction │ │ ├── settings_ │ │ │ ├── try_modify_money_scoreboard │ │ │ │ ├── macro_set_score.mcfunction │ │ │ │ ├── macro_get_score.mcfunction │ │ │ │ ├── no_input.mcfunction │ │ │ │ └── invalid_scoreboard.mcfunction │ │ │ ├── uninstall │ │ │ │ └── confirm │ │ │ │ │ ├── clear_all_team.mcfunction │ │ │ │ │ ├── clear.mcfunction │ │ │ │ │ └── fail.mcfunction │ │ │ ├── try_boot │ │ │ │ └── already.mcfunction │ │ │ ├── try_modify_language │ │ │ │ └── no_input.mcfunction │ │ │ ├── try_ban_deban_player │ │ │ │ └── no_input.mcfunction │ │ │ ├── get_player_ban_state │ │ │ │ ├── no_input.mcfunction │ │ │ │ ├── banned.mcfunction │ │ │ │ └── unbanned.mcfunction │ │ │ └── reset_dynamic_data │ │ │ │ └── fail.mcfunction │ │ ├── ui │ │ │ └── display_manager │ │ │ │ ├── summon_single_item │ │ │ │ ├── 0.mcfunction │ │ │ │ ├── 1.mcfunction │ │ │ │ ├── 10.mcfunction │ │ │ │ ├── 11.mcfunction │ │ │ │ ├── 12.mcfunction │ │ │ │ ├── 13.mcfunction │ │ │ │ ├── 14.mcfunction │ │ │ │ ├── 15.mcfunction │ │ │ │ ├── 16.mcfunction │ │ │ │ ├── 17.mcfunction │ │ │ │ ├── 18.mcfunction │ │ │ │ ├── 19.mcfunction │ │ │ │ ├── 2.mcfunction │ │ │ │ ├── 20.mcfunction │ │ │ │ ├── 21.mcfunction │ │ │ │ ├── 22.mcfunction │ │ │ │ ├── 23.mcfunction │ │ │ │ ├── 24.mcfunction │ │ │ │ ├── 25.mcfunction │ │ │ │ ├── 26.mcfunction │ │ │ │ ├── 3.mcfunction │ │ │ │ ├── 4.mcfunction │ │ │ │ ├── 5.mcfunction │ │ │ │ ├── 6.mcfunction │ │ │ │ ├── 7.mcfunction │ │ │ │ ├── 8.mcfunction │ │ │ │ ├── 9.mcfunction │ │ │ │ └── summon │ │ │ │ │ ├── carry_text_display │ │ │ │ │ └── summon │ │ │ │ │ │ └── get_pos_and_trans.mcfunction │ │ │ │ │ ├── carry_text_display.mcfunction │ │ │ │ │ ├── carry_text_display_without_animation.mcfunction │ │ │ │ │ ├── merge_template.mcfunction │ │ │ │ │ └── adjust_pos_line_2.mcfunction │ │ │ │ ├── on_item_summon │ │ │ │ ├── timer.mcfunction │ │ │ │ └── do.mcfunction │ │ │ │ ├── on_item_summon.mcfunction │ │ │ │ ├── on_item_update.mcfunction │ │ │ │ ├── range_summon │ │ │ │ ├── select_item_to_summon │ │ │ │ │ ├── 0_to_1.mcfunction │ │ │ │ │ ├── 2_to_3.mcfunction │ │ │ │ │ ├── 4_to_5.mcfunction │ │ │ │ │ ├── 6_to_7.mcfunction │ │ │ │ │ ├── 8_to_9.mcfunction │ │ │ │ │ ├── 0_to_13.mcfunction │ │ │ │ │ ├── 0_to_3.mcfunction │ │ │ │ │ ├── 0_to_7.mcfunction │ │ │ │ │ ├── 4_to_7.mcfunction │ │ │ │ │ ├── 11_to_12.mcfunction │ │ │ │ │ ├── 14_to_15.mcfunction │ │ │ │ │ ├── 14_to_17.mcfunction │ │ │ │ │ ├── 14_to_20.mcfunction │ │ │ │ │ ├── 14_to_26.mcfunction │ │ │ │ │ ├── 16_to_17.mcfunction │ │ │ │ │ ├── 18_to_19.mcfunction │ │ │ │ │ ├── 21_to_22.mcfunction │ │ │ │ │ ├── 21_to_26.mcfunction │ │ │ │ │ ├── 24_to_25.mcfunction │ │ │ │ │ ├── 8_to_13.mcfunction │ │ │ │ │ ├── 8_to_10.mcfunction │ │ │ │ │ ├── 11_to_13.mcfunction │ │ │ │ │ ├── 18_to_20.mcfunction │ │ │ │ │ ├── 21_to_23.mcfunction │ │ │ │ │ └── 24_to_26.mcfunction │ │ │ │ ├── select_item_to_summon.mcfunction │ │ │ │ └── while.mcfunction │ │ │ │ ├── range_update_and_delete │ │ │ │ ├── select_item_to_update │ │ │ │ │ ├── 0_to_1.mcfunction │ │ │ │ │ ├── 2_to_3.mcfunction │ │ │ │ │ ├── 4_to_5.mcfunction │ │ │ │ │ ├── 7_to_8.mcfunction │ │ │ │ │ ├── 9_to_10.mcfunction │ │ │ │ │ ├── 0_to_3.mcfunction │ │ │ │ │ ├── 0_to_6.mcfunction │ │ │ │ │ ├── 11_to_12.mcfunction │ │ │ │ │ ├── 14_to_15.mcfunction │ │ │ │ │ ├── 16_to_17.mcfunction │ │ │ │ │ ├── 18_to_19.mcfunction │ │ │ │ │ ├── 21_to_22.mcfunction │ │ │ │ │ ├── 24_to_25.mcfunction │ │ │ │ │ ├── 0_to_13.mcfunction │ │ │ │ │ ├── 7_to_10.mcfunction │ │ │ │ │ ├── 7_to_13.mcfunction │ │ │ │ │ ├── 14_to_17.mcfunction │ │ │ │ │ ├── 14_to_20.mcfunction │ │ │ │ │ ├── 14_to_26.mcfunction │ │ │ │ │ ├── 21_to_26.mcfunction │ │ │ │ │ ├── 4_to_6.mcfunction │ │ │ │ │ ├── 11_to_13.mcfunction │ │ │ │ │ ├── 18_to_20.mcfunction │ │ │ │ │ ├── 21_to_23.mcfunction │ │ │ │ │ └── 24_to_26.mcfunction │ │ │ │ └── select_item_to_update.mcfunction │ │ │ │ ├── range_update_and_delete.mcfunction │ │ │ │ ├── update_whole_page │ │ │ │ └── 1.mcfunction │ │ │ │ └── update_whole_page.mcfunction │ │ ├── adapters │ │ │ └── money_scoreboard_adapter │ │ │ │ ├── get_money │ │ │ │ └── macro_get_money.mcfunction │ │ │ │ ├── reduce_money │ │ │ │ └── macro_reduce_money.mcfunction │ │ │ │ ├── add_money │ │ │ │ └── macro_add_money.mcfunction │ │ │ │ ├── get_money.mcfunction │ │ │ │ ├── add_money.mcfunction │ │ │ │ └── reduce_money.mcfunction │ │ ├── advancements │ │ │ ├── change_dimension.mcfunction │ │ │ └── craft_stick_open_shop.mcfunction │ │ └── load │ │ │ └── no_fully_execute.mcfunction │ ├── predicates │ │ └── probability │ │ │ └── 10.json │ ├── tags │ │ └── blocks │ │ │ └── invalid_block.json │ ├── advancements │ │ └── change_dimension.json │ ├── recipes │ │ └── open_shop.json │ └── item_modifiers │ │ └── player │ │ └── modify_item_count.json └── minecraft │ └── tags │ └── functions │ ├── load.json │ └── tick.json ├── pack.png ├── test └── test_cases.xlsx ├── doc └── md_images_design │ ├── ui.png │ └── shop_unit.png ├── icon └── global_shop_v3_icon.psd └── translation ├── new_language.xlsx ├── languages ├── en_us.xlsx └── zh_cn.xlsx └── display_images ├── en_us ├── g_lang.admin_settings.uninstall.fail.png └── g_lang.admin_settings.reset_dynamic_data.fail.png └── zh_cn ├── g_lang.admin_settings.uninstall.fail.png └── g_lang.admin_settings.reset_dynamic_data.fail.png /.gitignore: -------------------------------------------------------------------------------- 1 | .VSCodeCounter/* 2 | -------------------------------------------------------------------------------- /data/global_shop/functions/utils/item_text/get_attributes.mcfunction: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/global_shop/functions/utils/item_text/get_attributes/walk.mcfunction: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/global_shop/functions/utils/item_text/get_enchantments.mcfunction: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/pack.png -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/item_id_translate_json_get_trans.mcfunction: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/global_shop/functions/settings/stop.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/shop/stop -------------------------------------------------------------------------------- /data/global_shop/functions/settings/reinit_anyway.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:init_classes -------------------------------------------------------------------------------- /data/global_shop/functions/logic/text_display/kill.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor TextDisplay 2 | 3 | kill @s -------------------------------------------------------------------------------- /data/global_shop/functions/sound/jump.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:entity.ender_eye.launch player @s -------------------------------------------------------------------------------- /test/test_cases.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/test/test_cases.xlsx -------------------------------------------------------------------------------- /data/global_shop/functions/logic/interactor/clear_left_click_action.mcfunction: -------------------------------------------------------------------------------- 1 | data remove entity @s attack -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/set_state_will_buy.mcfunction: -------------------------------------------------------------------------------- 1 | team join glbs_will_buy @s -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/set_state_will_set.mcfunction: -------------------------------------------------------------------------------- 1 | team join glbs_will_set @s -------------------------------------------------------------------------------- /data/global_shop/functions/sound/break.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:entity.item.break player @s ~ ~ ~ 1 1 -------------------------------------------------------------------------------- /data/global_shop/functions/sound/select.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:entity.chicken.egg player @s ~ ~ ~ 1 2 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/interactor/clear_right_click_action.mcfunction: -------------------------------------------------------------------------------- 1 | data remove entity @s interaction -------------------------------------------------------------------------------- /data/global_shop/functions/sound/exit.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:block.shulker_box.close player @s ~ ~ ~ 0.5 1 -------------------------------------------------------------------------------- /data/global_shop/functions/sound/success.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:block.note_block.bell player @s ~ ~ ~ 1 1 -------------------------------------------------------------------------------- /data/global_shop/functions/sound/target.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:entity.chicken.egg player @s ~ ~ ~ 0.5 0.8 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/set_state_will_delete.mcfunction: -------------------------------------------------------------------------------- 1 | team join glbs_will_delete @s -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/set_state_will_recycle.mcfunction: -------------------------------------------------------------------------------- 1 | team join glbs_will_recycle @s -------------------------------------------------------------------------------- /data/global_shop/functions/sound/fail.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:block.note_block.cow_bell player @s ~ ~ ~ 0.1 0.5 -------------------------------------------------------------------------------- /data/global_shop/functions/sound/open_shop.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:block.shulker_box.open player @s ~ ~ ~ 0.5 1 -------------------------------------------------------------------------------- /doc/md_images_design/ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/doc/md_images_design/ui.png -------------------------------------------------------------------------------- /icon/global_shop_v3_icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/icon/global_shop_v3_icon.psd -------------------------------------------------------------------------------- /translation/new_language.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/translation/new_language.xlsx -------------------------------------------------------------------------------- /data/global_shop/functions/sound/change_menu.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:block.powder_snow.break player @s ~ ~ ~ 0.8 0.6 -------------------------------------------------------------------------------- /data/global_shop/functions/test/test2.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players add test test 1 2 | 3 | function global_shop:test/test2 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/interactor/kill.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 清除该交互实体和数据 2 | # @executor Interactor 3 | 4 | kill @s -------------------------------------------------------------------------------- /data/global_shop/functions/sound/disable.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:block.stone_pressure_plate.click_off player @s ~ ~ ~ 1 1 -------------------------------------------------------------------------------- /data/global_shop/functions/sound/enable.mcfunction: -------------------------------------------------------------------------------- 1 | playsound minecraft:block.stone_pressure_plate.click_on player @s ~ ~ ~ 1 1 -------------------------------------------------------------------------------- /data/global_shop/functions/text/init/macro.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {lang: string} 2 | 3 | $function global_shop:text/$(lang)/init -------------------------------------------------------------------------------- /data/global_shop/predicates/probability/10.json: -------------------------------------------------------------------------------- 1 | { 2 | "condition": "minecraft:random_chance", 3 | "chance": 0.1 4 | } -------------------------------------------------------------------------------- /doc/md_images_design/shop_unit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/doc/md_images_design/shop_unit.png -------------------------------------------------------------------------------- /translation/languages/en_us.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/translation/languages/en_us.xlsx -------------------------------------------------------------------------------- /translation/languages/zh_cn.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/translation/languages/zh_cn.xlsx -------------------------------------------------------------------------------- /data/global_shop/functions/logic/interactor/init_state.mcfunction: -------------------------------------------------------------------------------- 1 | data merge entity @s {Tags:["global_shop"],width:0.6f,height:1.45f} -------------------------------------------------------------------------------- /data/global_shop/functions/logic/text_display/init_state.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/text_display/text_display/set_state -------------------------------------------------------------------------------- /data/minecraft/tags/functions/load.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "global_shop:load" 5 | ] 6 | } -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/0.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s hotbar.0 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/1.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s hotbar.1 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/2.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s hotbar.2 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/3.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s hotbar.3 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/4.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s hotbar.4 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/5.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s hotbar.5 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/6.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s hotbar.6 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/7.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s hotbar.7 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/8.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s hotbar.8 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/10.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.1 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/11.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.2 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/12.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.3 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/13.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.4 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/14.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.5 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/15.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.6 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/16.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.7 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/17.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.8 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/18.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.9 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/19.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.10 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/20.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.11 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/21.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.12 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/22.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.13 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/23.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.14 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/24.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.15 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/25.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.16 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/26.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.17 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/27.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.18 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/28.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.19 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/29.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.20 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/30.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.21 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/31.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.22 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/32.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.23 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/33.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.24 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/34.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.25 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/35.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.26 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/9.mcfunction: -------------------------------------------------------------------------------- 1 | item modify entity @s inventory.0 global_shop:player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/utils/item_text/get_lores/macro2.mcfunction: -------------------------------------------------------------------------------- 1 | $data modify storage global_shop:common args.text set value '[$(text)]' -------------------------------------------------------------------------------- /data/global_shop/functions/utils/item_text/get_lores/macro.mcfunction: -------------------------------------------------------------------------------- 1 | $data modify storage global_shop:common args.text set value '$(text),$(append)' -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/kill/kill_passengers.mcfunction: -------------------------------------------------------------------------------- 1 | execute on passengers run function global_shop:logic/menu/kill/kill_passengers/1 -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_player_shop_list_size.mcfunction: -------------------------------------------------------------------------------- 1 | return run data get storage global_shop:storage g_playerShopList -------------------------------------------------------------------------------- /data/minecraft/tags/functions/tick.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "global_shop:logic/scheduler/tick" 5 | ] 6 | } -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/dimension_change_to_close.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | function global_shop:logic/menu/perform/position_change -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/kill/player.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | function global_shop:logic/player/on_exit_shop 4 | 5 | ride @s dismount -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/rotate/macro_tp.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {roundedAngleDiff: int} 2 | 3 | $tp @s ~ ~ ~ ~$(roundedAngleDiff) ~ -------------------------------------------------------------------------------- /data/global_shop/functions/test/test1.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 测试用,随便改 2 | 3 | item replace entity @s weapon.mainhand with grass_block 1 4 | trigger glbs_trigger_1 set 1 -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/try_modify_money_scoreboard/macro_set_score.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {scoreboard: string} 2 | 3 | $scoreboard players set #temp $(scoreboard) 1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/add_seperator.mcfunction: -------------------------------------------------------------------------------- 1 | data modify storage global_shop:common g_text append from storage global_shop:storage char.SEPERATOR_WITH_PADDING -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/player_left_click/welcome.mcfunction: -------------------------------------------------------------------------------- 1 | title @s actionbar ["\u00a7eQwQ"] 2 | function global_shop:sound/target -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/get_uid_by_name/macro_get.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {name: string} 2 | 3 | $scoreboard players operation playerUid glbs_common = $(name) glbs_uid -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_return_list_size.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {uid: int} 2 | 3 | $return run data get storage global_shop:storage g_returnListMap.$(uid) -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/open_menu_success/init_passengers.mcfunction: -------------------------------------------------------------------------------- 1 | execute on passengers run function global_shop:logic/menu/menu/open_menu_success/init_passengers/1 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/0.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/0 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/1.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/1 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/10.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/10 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/11.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/11 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/12.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/12 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/13.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/13 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/14.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/14 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/15.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/15 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/16.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/16 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/17.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/17 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/18.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/18 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/19.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/19 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/2.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/2 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/20.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/20 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/21.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/21 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/22.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/22 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/23.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/23 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/24.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/24 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/25.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/25 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/26.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/26 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/3.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/3 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/4.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/4 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/5.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/5 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/6.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/6 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/7.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/7 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/8.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/8 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/9.mcfunction: -------------------------------------------------------------------------------- 1 | execute summon minecraft:item_display run function global_shop:ui/display_manager/summon_single_item/summon/9 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_enchantment/macro/if_level1.mcfunction: -------------------------------------------------------------------------------- 1 | $execute store success score ifLevel1 glbs_common run data get storage global_shop:storage level1.$(id) -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/tick.mcfunction: -------------------------------------------------------------------------------- 1 | # 数据包卸载时,glbs_common 记分板被抹除,就不会往里调用 2 | execute if score g_enable glbs_common matches 1 run function global_shop:logic/scheduler/1t -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/get_angle_diff/2.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation i5 glbs_common = i3 glbs_common 2 | scoreboard players remove i5 glbs_common 360 -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_player_selling_list_size.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {uid: int} 2 | 3 | $return run data get storage global_shop:storage g_playerSellingListMap.$(uid) -------------------------------------------------------------------------------- /data/global_shop/functions/logic/temp_world_entity/item/call.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Entity 2 | 3 | # 校准位置 4 | execute at @s positioned ~ 3000 ~ run function global_shop:logic/temp_world_entity/item/1 -------------------------------------------------------------------------------- /data/global_shop/functions/settings/visible_item_info_frame.mcfunction: -------------------------------------------------------------------------------- 1 | execute on vehicle on passengers if entity @s[type=minecraft:text_display] run data merge entity @s {text_opacity:4b,background:0b} -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/uninstall/confirm/clear_all_team.mcfunction: -------------------------------------------------------------------------------- 1 | team remove glbs_will_delete 2 | team remove glbs_will_buy 3 | team remove glbs_will_recycle 4 | team remove glbs_will_set -------------------------------------------------------------------------------- /translation/display_images/en_us/g_lang.admin_settings.uninstall.fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/translation/display_images/en_us/g_lang.admin_settings.uninstall.fail.png -------------------------------------------------------------------------------- /translation/display_images/zh_cn/g_lang.admin_settings.uninstall.fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/translation/display_images/zh_cn/g_lang.admin_settings.uninstall.fail.png -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_lore/1.mcfunction: -------------------------------------------------------------------------------- 1 | data modify storage global_shop:common g_text append value {"storage":"global_shop:common","nbt":"g_itemData.tag.display.Lore[0]","interpret":1} -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/init_state.mcfunction: -------------------------------------------------------------------------------- 1 | # 重置玩家相关记分板 2 | function global_shop:logic/player/init_scoreboard 3 | 4 | # 重置检查维度变化的进度 5 | advancement revoke @s only global_shop:change_dimension -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/register_player/set_kv.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {uid: int, playerName: string} 2 | $data modify storage global_shop:storage g_playerNameMap.$(uid) set value $(playerName) -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/return_expire_item/get_expire_num/while/if/1.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation left glbs_common = mid glbs_common 2 | scoreboard players add left glbs_common 1 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/on_item_summon/timer.mcfunction: -------------------------------------------------------------------------------- 1 | execute as @e[type=minecraft:item_display,tag=glbs_to_set_state_normal] run function global_shop:ui/display_manager/on_item_summon/do -------------------------------------------------------------------------------- /data/global_shop/functions/logic/interactor/clear_left_and_right_click_action.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/interactor/clear_left_click_action 2 | function global_shop:logic/interactor/clear_right_click_action -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/set_exchange_rate/macro.mcfunction: -------------------------------------------------------------------------------- 1 | $data modify storage global_shop:storage g_cashInfo[$(index)] set from storage global_shop:common elem -------------------------------------------------------------------------------- /data/global_shop/functions/logic/temp_world_entity/text_display/1.mcfunction: -------------------------------------------------------------------------------- 1 | # 临时世界文本展示实体00000d3a-0000-0d3a-0000-17cc0000edfa 2 | summon minecraft:text_display ~ ~ ~ {Tags:["global_shop"],UUID:[I;3386,3386,6092,60922]} -------------------------------------------------------------------------------- /data/global_shop/functions/logic/temp_world_entity/text_display/call.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Entity 2 | 3 | # 校准位置 4 | execute at @s positioned ~ 3000 ~ run function global_shop:logic/temp_world_entity/text_display/1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/shop/perform/player/check_if_exit.mcfunction: -------------------------------------------------------------------------------- 1 | execute on vehicle if entity @s[type=minecraft:block_display,tag=global_shop] run return 0 2 | 3 | function global_shop:logic/player/on_exit_shop -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/return_expire_item/loop_return/macro_delete_from_selling_list.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {uid: int} 2 | 3 | $data remove storage global_shop:storage g_playerSellingListMap.$(uid)[0] -------------------------------------------------------------------------------- /data/global_shop/tags/blocks/invalid_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "minecraft:end_gateway", 5 | "minecraft:end_portal", 6 | "minecraft:nether_portal" 7 | ] 8 | } -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/item_tag_to_string/macro_get_string.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {text: JsonString} 两层引号 2 | 3 | #$say $(text) 4 | 5 | $data modify storage global_shop:common g_itemTagString set value $(text) -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/clear_slot.mcfunction: -------------------------------------------------------------------------------- 1 | # @param slot 要清除的栏位,范围 0~35 2 | # @executor Player 3 | 4 | scoreboard players set newCount glbs_common 0 5 | 6 | function global_shop:logic/player/modify_item_count -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/init.mcfunction: -------------------------------------------------------------------------------- 1 | # g_value 初始化 2 | scoreboard players add g_timer glbs_common 0 3 | execute unless score g_timer glbs_common matches 0.. run scoreboard players set g_timer glbs_common 0 -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/locate_index_in_sell_shop_list_by_id/macro_get_id.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {mid: int} 2 | 3 | $return run data get storage global_shop:storage g_sellShopList[$(mid)].tag.global_shop.id -------------------------------------------------------------------------------- /data/global_shop/functions/utils/string_helper/split_namespace_id/get_namespace.mcfunction: -------------------------------------------------------------------------------- 1 | $data modify storage global_shop:common return.namespace set string storage global_shop:common splitNamespaceID.namespaceID 0 $(index) -------------------------------------------------------------------------------- /translation/display_images/en_us/g_lang.admin_settings.reset_dynamic_data.fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/translation/display_images/en_us/g_lang.admin_settings.reset_dynamic_data.fail.png -------------------------------------------------------------------------------- /translation/display_images/zh_cn/g_lang.admin_settings.reset_dynamic_data.fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeartingBe/GlobalShop_v3/HEAD/translation/display_images/zh_cn/g_lang.admin_settings.reset_dynamic_data.fail.png -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/locate_index_in_player_shop_list_by_id/macro_get_id.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {mid: int} 2 | 3 | $return run data get storage global_shop:storage g_playerShopList[$(mid)].tag.global_shop.id -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/locate_index_in_recycle_shop_list_by_id/macro_get_id.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {mid: int} 2 | 3 | $return run data get storage global_shop:storage g_recycleShopList[$(mid)].tag.global_shop.id -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/highlight_item_and_display_text/is_not_target.mcfunction: -------------------------------------------------------------------------------- 1 | execute if entity @s[tag=glbs_item_highlight] run function global_shop:logic/item_display_entity/set_state_normal -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/get_ban_state.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {name: string} 2 | # @param banState 出参,进入时为 0,如果玩家是被禁用的状态,设置为 1 3 | 4 | $execute if score $(name) glbs_ban matches 1 run scoreboard players set banState glbs_common 1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_enchantment/macro/concat_id_string.mcfunction: -------------------------------------------------------------------------------- 1 | $data modify storage global_shop:common temp.translate_key set value "enchantment.$(namespace).$(id)" 2 | scoreboard players set isError glbs_common 0 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/reduce_money.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 扣除玩家金钱 2 | # @param reduce 要扣除的数额 3 | # @executor Player 4 | # @return 扣除后剩余的数额 5 | 6 | return run function global_shop:adapters/money_scoreboard_adapter/reduce_money -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/1m.mcfunction: -------------------------------------------------------------------------------- 1 | # log 2 | #say 1m 3 | 4 | # 处理过期物品 5 | function global_shop:logic/scheduler/1m/return_expire_item 6 | 7 | # 清除残留实体 8 | function global_shop:logic/scheduler/1m/kill_residual_entity -------------------------------------------------------------------------------- /data/global_shop/functions/logic/text_display/disappear.mcfunction: -------------------------------------------------------------------------------- 1 | data modify entity @s transformation.translation[2] set value -5.0f 2 | data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{scale:[0.0f,0.0f,0.0f]}} -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/try_boot/already.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},"\u00a7cGlobal Shop has already been launched."] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/try_modify_money_scoreboard/macro_get_score.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {scoreboard: string} 2 | 3 | $scoreboard players operation temp glbs_common = #temp $(scoreboard) 4 | $scoreboard players reset #temp $(scoreboard) -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_player_name.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {uid: int} 2 | # @param g_playerName 出参 3 | 4 | $data modify storage global_shop:common g_playerName set from storage global_shop:storage g_playerNameMap.$(uid) -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_sell_shop_list_elem_by_index/macro_get.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {index: int} 2 | 3 | $data modify storage global_shop:common g_itemData set from storage global_shop:storage g_sellShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/return_expire_item/get_expire_num/macro_get_expire_time.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {index: int} 2 | 3 | $return run data get storage global_shop:storage g_playerShopList[$(index)].tag.global_shop.expireTime -------------------------------------------------------------------------------- /data/global_shop/functions/utils/item_text/get_customname.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:utils/item_text/get_customname 2 | #@executor item_display 3 | 4 | data modify storage global_shop:common return.output1 set from entity @s item.tag.display.Name -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/check_all_slot/continue.mcfunction: -------------------------------------------------------------------------------- 1 | data remove storage global_shop:common inventory[0] 2 | execute if data storage global_shop:common inventory[0] run function global_shop:logic/item_data/check_all_slot/while -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/kill_item_displays.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 清除周围的物品展示实体 2 | # @executor Menu 3 | execute on passengers if entity @s[type=minecraft:item_display,tag=!glbs_killed] run function global_shop:logic/item_display_entity/kill -------------------------------------------------------------------------------- /data/global_shop/functions/logic/text_display/clear_text.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor TextDisplay 2 | 3 | # 清除 text 会有残留小黑点,所以采用修改文本和背景透明度为完全透明的方法 4 | #data modify entity @s text set value '""' 5 | 6 | data merge entity @s {text_opacity:4b,background:0b} -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_cache_list_page/get_elem_and_append/1.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {index: int} 2 | 3 | $data modify storage global_shop:common g_itemsToDisplay append from storage global_shop:storage g_tempList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_player_shop_list_elem_by_index/macro_get.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {index: int} 2 | 3 | $data modify storage global_shop:common g_itemData set from storage global_shop:storage g_playerShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_recycle_shop_list_elem_by_index/macro_get.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {index: int} 2 | 3 | $data modify storage global_shop:common g_itemData set from storage global_shop:storage g_recycleShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_sell_shop_list_elem_by_index_and_append/1.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {index: int} 2 | 3 | $data modify storage global_shop:common g_itemsToDisplay append from storage global_shop:storage g_sellShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/delete_return_elem_by_uid_and_id/macro_delete.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {uid: int, id: int} 2 | # @executor Menu 3 | 4 | $data remove storage global_shop:storage g_returnListMap.$(uid)[{tag:{global_shop:{id:$(id)}}}] -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_player_shop_list_elem_by_index_and_append/1.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {index: int} 2 | 3 | $data modify storage global_shop:common g_itemsToDisplay append from storage global_shop:storage g_playerShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_recycle_shop_list_elem_by_index_and_append/1.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {index: int} 2 | 3 | $data modify storage global_shop:common g_itemsToDisplay append from storage global_shop:storage g_recycleShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/handle/update_last_click_order.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 非旋转模式玩家左键时,记录上一次左键的物品的序号 order 2 | # @executor Menu 3 | 4 | # 记录玩家左键的物品 order 5 | scoreboard players operation @s glbs_last_target = @s glbs_last_view_order -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_selling_handler/handle/player_left_click/tip.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/menu/handlers/player_shop_view_my_selling_handler/handle/send_item_info_to_player 2 | function global_shop:sound/target -------------------------------------------------------------------------------- /data/global_shop/functions/adapters/money_scoreboard_adapter/get_money/macro_get_money.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 获取玩家金钱 2 | # @macro {scoreboard: string} 3 | # @param temp 出参 4 | # @executor Player 5 | 6 | $scoreboard players operation temp glbs_common = @s $(scoreboard) -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_enchantment/macro/set_pair.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/item_data/parse_enchantment/macro/set_pair 2 | 3 | $data modify storage global_shop:storage enchantment.$(id) set from storage global_shop:common temp.translate_key -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/disappear.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 缩小消失 2 | # @executor Menu 3 | 4 | # translation 偏移 也可以插值 5 | data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{scale:[0.0f,0.0f,0.0f],translation:[0.0f,-0.5f,0.0f]}} -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/change_mode/player_cash_exchange/success.mcfunction: -------------------------------------------------------------------------------- 1 | title @s actionbar [{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"change_mode.cash\"","color":"aqua"}] 2 | function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_handler/handle/player_left_click_confirm/macro_add_seller_income.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {playerName: string} 2 | # @param income 收入 3 | 4 | $scoreboard players operation $(playerName) glbs_income += income glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/check_completeness/1.mcfunction: -------------------------------------------------------------------------------- 1 | execute if entity @s[type=minecraft:player] run return run scoreboard players add temp glbs_common 1 2 | execute if entity @s[tag=global_shop,tag=!glbs_killed] run scoreboard players add temp glbs_common 1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/change_mode/edit_cash_exchange/success.mcfunction: -------------------------------------------------------------------------------- 1 | title @s actionbar [{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"change_mode.edit_cash\"","color":"aqua"}] 2 | function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/add_money.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/player/add_money 2 | # @brief 增加玩家金钱 3 | # @param addAmount 要增加的数额 4 | # @executor Player 5 | # @return 增加后的数额 6 | 7 | return run function global_shop:adapters/money_scoreboard_adapter/add_money -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # 切换到主菜单 2 | # 让主菜单向左转 1 行,对准入口 3 | scoreboard players set g_columnIncrement glbs_common -1 4 | function global_shop:logic/menu/handlers/menu_handler/change_mode/edit_main -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_sell_shop_handler/handle/player_left_click/tip.mcfunction: -------------------------------------------------------------------------------- 1 | title @s actionbar [{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"sell_shop.delete.again\"","color":"red"}] 2 | 3 | function global_shop:sound/target -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/player_left_click/change_mode_to_edit_mode.mcfunction: -------------------------------------------------------------------------------- 1 | # 从主菜单进入编辑页面,无需校准列 2 | scoreboard players set g_columnIncrement glbs_common 0 3 | function global_shop:logic/menu/handlers/menu_handler/change_mode/edit_main -------------------------------------------------------------------------------- /data/global_shop/functions/advancements/change_dimension.mcfunction: -------------------------------------------------------------------------------- 1 | execute on vehicle if entity @s[type=minecraft:block_display,tag=global_shop,tag=!glbs_killed] run function global_shop:logic/menu/dimension_change_to_close 2 | 3 | advancement revoke @s only global_shop:change_dimension -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_enchantment/limit_size.mcfunction: -------------------------------------------------------------------------------- 1 | data remove storage global_shop:common temp.enchantments[-1] 2 | 3 | execute if data storage global_shop:common temp.enchantments[15] run function global_shop:logic/item_data/parse_enchantment/limit_size -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_item_id.mcfunction: -------------------------------------------------------------------------------- 1 | # 换行 2 | function global_shop:logic/item_data/add_seperator 3 | 4 | # 写入 id 5 | data modify storage global_shop:common g_text append value {"storage":"global_shop:common","nbt":"g_itemData.id","color":"dark_gray"} -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_recycle_shop_handler/handle/player_left_click/tip.mcfunction: -------------------------------------------------------------------------------- 1 | title @s actionbar [{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"recycle_shop.delete.again\"","color":"red"}] 2 | 3 | function global_shop:sound/target -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/banned.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"open.banned\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/advancements/change_dimension.json: -------------------------------------------------------------------------------- 1 | { 2 | "criteria": { 3 | "example": { 4 | "trigger": "minecraft:changed_dimension" 5 | } 6 | }, 7 | "rewards": { 8 | "function": "global_shop:advancements/change_dimension" 9 | } 10 | } -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_lore/1_to_8.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score size glbs_common matches 1..4 run function global_shop:logic/item_data/parse_lore/1_to_4 2 | 3 | execute if score size glbs_common matches 5..8 run function global_shop:logic/item_data/parse_lore/5_to_8 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_lore/9_to_16.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score size glbs_common matches 9..12 run function global_shop:logic/item_data/parse_lore/9_to_12 2 | execute if score size glbs_common matches 13.. run function global_shop:logic/item_data/parse_lore/13_to_16 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/to_string.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/item_data/to_string 2 | # @brief 将 g_itemData 中的数据解析成文本写入 g_text 3 | # @param g_itemData 4 | # @param g_text 5 | # @executor TextDisplay 6 | 7 | function global_shop:logic/item_data/polymorphic_type -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_recycle_shop_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到编辑模式主菜单 4 | scoreboard players set g_columnIncrement glbs_common 0 5 | function global_shop:logic/menu/handlers/menu_handler/change_mode/edit_main -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/on_item_summon.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 有物品生成时,调用该函数,统一在之后将物品变大,并去除 glbs_to_set_state_normal 标签。允许多次调用,但只会统一更新一次 2 | # @executor - 3 | 4 | # 如需修改延迟,直接修改以下命令的延迟时间 5 | schedule function global_shop:ui/display_manager/on_item_summon/timer 4t replace -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/on_item_update.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 物品更新时,调用该函数播放更新动画 2 | # @executor ItemDisplayEntity 3 | 4 | # say 更新动画 5 | 6 | # TODO 物品展示实体的更新动画? 7 | 8 | # 刷新显示的数量 9 | function global_shop:logic/item_display_entity/display_count_without_animation -------------------------------------------------------------------------------- /data/global_shop/functions/adapters/money_scoreboard_adapter/reduce_money/macro_reduce_money.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 扣除玩家金钱 2 | # @macro {scoreboard: string} 3 | # @param reduce 要扣除的数额 4 | # @executor Player 5 | 6 | $return run scoreboard players operation @s $(scoreboard) -= reduce glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/get_back_action.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 获取玩家右键情况 2 | # @executor Menu 3 | # @return Action 4 | 5 | execute on passengers if entity @s[type=minecraft:interaction] run return run function global_shop:logic/interactor/get_right_click_action -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/polymorphic_mode/0_to_6.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score @s glbs_mode matches 0..3 run return run function global_shop:logic/menu/polymorphic_mode/0_to_3 2 | 3 | execute if score @s glbs_mode matches 4..6 run function global_shop:logic/menu/polymorphic_mode/4_to_6 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/init_scoreboard.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 初始化玩家相关记录的记分板(与本次使用商店相关的记分板,而不是长期记录的记分板) 2 | # @executor Player 3 | 4 | function global_shop:logic/inputter/reset_and_disable 5 | scoreboard players reset @s glbs_leave_game 6 | scoreboard players reset @s glbs_use_time -------------------------------------------------------------------------------- /data/global_shop/functions/logic/shop/perform/count_connect_num.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 统计使用商店的玩家数量 2 | # @executor Player 3 | # @param g_connectNum 正在使用商店的玩家数量 4 | 5 | execute on vehicle if entity @s[type=minecraft:block_display,tag=global_shop] run scoreboard players add g_connectNum glbs_common 1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/display_count/check_text_display.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor ItemDisplayEntity 2 | 3 | # 有乘客(文本展示实体) 4 | execute on passengers run return 0 5 | 6 | # 没有文本展示实体,先生成 7 | function global_shop:ui/display_manager/summon_single_item/summon/carry_text_display -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_sell_shop_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到编辑模式主菜单 4 | # 右转两格对齐 5 | scoreboard players set g_columnIncrement glbs_common 2 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/edit_main -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_return_handler/handle/player_left_click/send_tip.mcfunction: -------------------------------------------------------------------------------- 1 | title @s actionbar [{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"view_return.take_back.tip_click_again\"","color":"green"}] 2 | function global_shop:sound/target -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/die.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players reset @s glbs_deathCount 2 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"text":"Unable to open GlobalShop when dead","color":"red"}] 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/reach_max_use_limit.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"open.use_limit\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/text_display/set_state_normal.mcfunction: -------------------------------------------------------------------------------- 1 | data modify entity @s transformation.translation[2] set value -3.8f 2 | data merge entity @s {transformation:{scale:[1.1f,1.1f,1.1f]},start_interpolation:0,interpolation_duration:10} 3 | 4 | tag @s remove glbs_to_set_state_normal -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/delete_sell_shop_elem_by_id/macro_delete.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/delete_sell_shop_elem_by_id/macro_delete 2 | # 3 | # @macro {index: int} 4 | 5 | # 从出售商店总表中删除 6 | $data remove storage global_shop:storage g_sellShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/utils/string_helper/split_namespace_id/get_id.mcfunction: -------------------------------------------------------------------------------- 1 | # 切割出 namespaceID.substr(index) 2 | # 等价于 namespaceID.substr(index,namespaceID.length()) 3 | $data modify storage global_shop:common return.id set string storage global_shop:common splitNamespaceID.namespaceID $(index) -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_enchantment/macro/find_translate_key.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {id:'"?"'} 即待解析的附魔列表第一项的 id 2 | 3 | $execute store success score temp1 glbs_common run data modify storage global_shop:common temp.translate_key set from storage global_shop:storage enchantment.$(id) -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/get_select_action.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 获取玩家左键情况(不会进行二次确认) 2 | # @executor Menu 3 | # @return Action 4 | 5 | execute on passengers if entity @s[type=minecraft:interaction] run return run function global_shop:logic/interactor/get_left_click_action -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/polymorphic_mode/7_to_12.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score @s glbs_mode matches 7..10 run return run function global_shop:logic/menu/polymorphic_mode/7_to_10 2 | 3 | execute if score @s glbs_mode matches 11..12 run function global_shop:logic/menu/polymorphic_mode/11_to_12 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/temp_world_entity/item/1.mcfunction: -------------------------------------------------------------------------------- 1 | # 临时世界物品实体 00000d3a-0000-0d3a-0000-17cc0000edf9 2 | summon minecraft:item ~ ~ ~ {Tags:["global_shop"],UUID:[I;3386,3386,6092,60921],Age:-32768s,PickupDelay:32767s,Item:{id:"minecraft:stone_button",Count:1b},Invulnerable:1b,NoGravity:1b} -------------------------------------------------------------------------------- /data/global_shop/functions/settings/reinit.mcfunction: -------------------------------------------------------------------------------- 1 | # 不完整执行,阻止 load 2 | execute if score g_tickTag glbs_common matches 1 run return run execute as @a if score @s glbs_permission = Permission::ADMIN glbs_common at @s run function global_shop:load/no_fully_execute 3 | 4 | function global_shop:init_classes -------------------------------------------------------------------------------- /data/global_shop/recipes/open_shop.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "ingredients": [ 4 | { 5 | "item": "minecraft:stick" 6 | } 7 | ], 8 | "result": { 9 | "item": "minecraft:stick", 10 | "count": 1 11 | } 12 | } -------------------------------------------------------------------------------- /data/global_shop/functions/adapters/money_scoreboard_adapter/add_money/macro_add_money.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 增加玩家金钱 2 | # @macro {scoreboard: string} 3 | # @param addAmount 要增加的数额 4 | # @executor Player 5 | # @return 增加后的数额 6 | 7 | $return run scoreboard players operation @s $(scoreboard) += addAmount glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/admin_setting_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 回到编辑模式主菜单 4 | # 让编辑模式主菜单向左转 2 行,对准入口 5 | scoreboard players set g_columnIncrement glbs_common -2 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/edit_main -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/1m/kill_residual_entity/exclude.mcfunction: -------------------------------------------------------------------------------- 1 | # 排除 Menu 自己 2 | tag @s remove glbs_residual 3 | 4 | # 排除所有骑着的实体 5 | execute on passengers run tag @s remove glbs_residual 6 | 7 | # 排除物品展示实体上面骑着的文本展示实体 8 | execute on passengers on passengers run tag @s remove glbs_residual -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/1s/kill_delay_disappear_entity.mcfunction: -------------------------------------------------------------------------------- 1 | execute if entity @s[tag=glbs_kill_delay] run return run tag @s remove glbs_kill_delay 2 | 3 | execute if entity @s[type=minecraft:text_display] on passengers run function global_shop:logic/text_display/kill 4 | 5 | kill @s -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/uninstall/confirm/clear.mcfunction: -------------------------------------------------------------------------------- 1 | kill @e[tag=global_shop] 2 | 3 | function global_shop:settings_/uninstall/confirm/clear_all_team 4 | function global_shop:settings_/uninstall/confirm/clear_all_scoreboard 5 | function global_shop:settings_/uninstall/confirm/clear_all_storage -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/delete_recycle_shop_elem_by_id/macro_delete.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/delete_recycle_shop_elem_by_id/macro_delete 2 | # 3 | # @macro {index: int} 4 | 5 | # 从出售商店总表中删除 6 | $data remove storage global_shop:storage g_recycleShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_enchantment/macro/append_level_string.mcfunction: -------------------------------------------------------------------------------- 1 | data modify storage global_shop:common temp.jsontext.extra set value [{text:" "}] 2 | $data modify storage global_shop:common temp.jsontext.extra append value {"type":"translatable","translate":"enchantment.level.$(lvl)"} -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_enchantment/macro/if_curse.mcfunction: -------------------------------------------------------------------------------- 1 | $execute store success score ifCurse glbs_common run data get storage global_shop:storage curse.$(id) 2 | execute if score ifCurse glbs_common matches 1 run data modify storage global_shop:common temp.jsontext.color set value "red" -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/set_state_highlight_delay.mcfunction: -------------------------------------------------------------------------------- 1 | data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{scale:[0.8f,0.8f,0.8f]},Glowing:1b} 2 | 3 | # 文本展示实体变大 4 | execute on passengers run function global_shop:logic/text_display/set_state_normal -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/player_using_shop_around.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"open.other_shop_around\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/1s/handle_timing_in_seconds.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/scheduler/1s/handle_timing_in_seconds 2 | # @executor Player 3 | 4 | # 减少玩家上架物品冷却 5 | execute if score @s glbs_sell_item_cooling_time matches 1.. run scoreboard players remove @s glbs_sell_item_cooling_time 1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/polymorphic_type/4_to_7.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score temp2 glbs_common matches 4..5 run return run function global_shop:logic/item_data/polymorphic_type/4_to_5 2 | 3 | execute if score temp2 glbs_common matches 6..7 run function global_shop:logic/item_data/polymorphic_type/6_to_7 -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/try_modify_language/no_input.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"admin_settings.lang.no_input\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/delete_sell_shop_elem_by_index/macro_delete.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/delete_sell_shop_elem_by_index/macro_delete 2 | # @macro {index: int} 3 | # @executor Menu 4 | 5 | # 从出售商店列表中删除 6 | $data remove storage global_shop:storage g_sellShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/item_modifiers/player/modify_item_count.json: -------------------------------------------------------------------------------- 1 | { 2 | "function": "minecraft:set_count", 3 | "count": { 4 | "type": "score", 5 | "score": "glbs_common", 6 | "target": { 7 | "type": "fixed", 8 | "name": "newCount" 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/polymorphic_type/0_to_3.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score temp2 glbs_common matches 0..1 run return run function global_shop:logic/item_data/polymorphic_type/0_to_1 2 | 3 | execute if score temp2 glbs_common matches 2..3 run function global_shop:logic/item_data/polymorphic_type/2_to_3 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/1s/player_using_shop.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | # 增加玩家使用的秒数 4 | scoreboard players add @s glbs_use_time 1 5 | 6 | # 检查玩家使用太久 7 | execute if score @s glbs_use_time > MAX_EACH_USE_TIME glbs_common run function global_shop:logic/scheduler/1s/player_using_shop/use_for_too_long -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/try_ban_deban_player/no_input.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"admin_settings.ban_player.no_input\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/append_to_return_list.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 将物品写入该玩家的退还列表 2 | # @macro {uid: int} 3 | # @$param uid 玩家 uid 4 | # @param g_itemData 要插入的物品 5 | # @executor - 6 | 7 | $data modify storage global_shop:storage g_returnListMap.$(uid) append from storage global_shop:common g_itemData -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/player_back/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"main.back_fail\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/settings/expire_all_item.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation g_time glbs_common += SELL_ITEM_EFFECTIVE_TIME glbs_common 2 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},"\u00a7aSuccessfully expired all items"] 3 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/get_player_ban_state/no_input.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"admin_settings.get_ban_state.no_input\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/try_modify_money_scoreboard/no_input.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"admin_settings.money_sc.no_input\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/delete_recycle_shop_elem_by_index/macro_delete.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/delete_recycle_shop_elem_by_index/macro_delete 2 | # @macro {index: int} 3 | # @executor Menu 4 | 5 | # 从回收商店中删除 6 | $data remove storage global_shop:storage g_recycleShopList[$(index)] -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/0_to_1.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 0 run function global_shop:ui/display_manager/summon_single_item/0 2 | execute if score selectScore glbs_common matches 1 run function global_shop:ui/display_manager/summon_single_item/1 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/2_to_3.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 2 run function global_shop:ui/display_manager/summon_single_item/2 2 | execute if score selectScore glbs_common matches 3 run function global_shop:ui/display_manager/summon_single_item/3 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/4_to_5.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 4 run function global_shop:ui/display_manager/summon_single_item/4 2 | execute if score selectScore glbs_common matches 5 run function global_shop:ui/display_manager/summon_single_item/5 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/6_to_7.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 6 run function global_shop:ui/display_manager/summon_single_item/6 2 | execute if score selectScore glbs_common matches 7 run function global_shop:ui/display_manager/summon_single_item/7 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/8_to_9.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 8 run function global_shop:ui/display_manager/summon_single_item/8 2 | execute if score selectScore glbs_common matches 9 run function global_shop:ui/display_manager/summon_single_item/9 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/display_count/check_text_display_without_animation.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor ItemDisplayEntity 2 | 3 | # 有乘客(文本展示实体) 4 | execute on passengers run return 0 5 | 6 | # 没有文本展示实体,先生成 7 | function global_shop:ui/display_manager/summon_single_item/summon/carry_text_display_without_animation -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/set_state_highlight.mcfunction: -------------------------------------------------------------------------------- 1 | # 如果玩家旋转角度过大,看向了刚生成的物品,则不在此处变大,而是和其它刚生成的物品一样延迟变大(仍添加标签) 2 | data merge entity @s[tag=!glbs_to_set_state_normal] {start_interpolation:0,interpolation_duration:5,transformation:{scale:[0.8f,0.8f,0.8f]},Glowing:1b} 3 | 4 | tag @s add glbs_item_highlight -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/player_left_click/change_mode/edit_cash_exchange.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/menu/handlers/edit_main_menu_handler/handle/player_left_click/change_mode/edit_cash_exchange 2 | function global_shop:logic/menu/handlers/menu_handler/change_mode/edit_cash_exchange -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/player_left_click/change_mode_to_sell_shop.mcfunction: -------------------------------------------------------------------------------- 1 | # 从主菜单进入出售商店 2 | function global_shop:logic/menu/handlers/menu_handler/change_mode/sell_shop 3 | # 音效 更换菜单 4 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_left_click/change_mode_to_player_shop.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop 2 | # 音效 更换菜单 3 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/check_env/duplicate_open.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"open.already_use\"","color":"red"}] 2 | 3 | function global_shop:sound/fail 4 | 5 | return 1 -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/get_player_ban_state/banned.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:common","nbt":"admin_input","color":"yellow"},"\u00a7e: ",{"text":"✖","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/0_to_13.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 0..7 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/0_to_7 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/8_to_13 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/0_to_3.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 0..1 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/0_to_1 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/2_to_3 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/0_to_7.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 0..3 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/0_to_3 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/4_to_7 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/4_to_7.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 4..5 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/4_to_5 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/6_to_7 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/check_position_change_to_close.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 检查坐标变化 4 | execute store result score temp glbs_common run function global_shop:logic/menu/check_position_change 5 | # 位置改变,关掉商店 6 | execute if score temp glbs_common matches 0 run function global_shop:logic/menu/perform/position_change -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/player_left_click/change_mode_to_recycle_shop.mcfunction: -------------------------------------------------------------------------------- 1 | # 从主菜单进入回收商店 2 | function global_shop:logic/menu/handlers/menu_handler/change_mode/recycle_shop 3 | # 音效 更换菜单 4 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/change_mode/player_shop/title_and_enable.mcfunction: -------------------------------------------------------------------------------- 1 | title @s actionbar [{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"change_mode.player_shop\"","color":"aqua"}] 2 | 3 | scoreboard players enable @s glbs_inputter_1 4 | scoreboard players enable @s glbs_inputter_2 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/sell_shop_handler/handle/item_not_exist/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"sell_shop.no_exist\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/register_player/reach_max_reg_limit.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"open.register_limit\"","color":"red"}] 2 | function global_shop:sound/fail 3 | return 1 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/11_to_12.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 11 run function global_shop:ui/display_manager/summon_single_item/11 2 | execute if score selectScore glbs_common matches 12 run function global_shop:ui/display_manager/summon_single_item/12 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/14_to_15.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 14 run function global_shop:ui/display_manager/summon_single_item/14 2 | execute if score selectScore glbs_common matches 15 run function global_shop:ui/display_manager/summon_single_item/15 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/14_to_17.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 14..15 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/14_to_15 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/16_to_17 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/14_to_20.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 14..17 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/14_to_17 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/18_to_20 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/14_to_26.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 14..20 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/14_to_20 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/21_to_26 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/16_to_17.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 16 run function global_shop:ui/display_manager/summon_single_item/16 2 | execute if score selectScore glbs_common matches 17 run function global_shop:ui/display_manager/summon_single_item/17 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/18_to_19.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 18 run function global_shop:ui/display_manager/summon_single_item/18 2 | execute if score selectScore glbs_common matches 19 run function global_shop:ui/display_manager/summon_single_item/19 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/21_to_22.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 21 run function global_shop:ui/display_manager/summon_single_item/21 2 | execute if score selectScore glbs_common matches 22 run function global_shop:ui/display_manager/summon_single_item/22 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/21_to_26.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 21..23 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/21_to_23 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/24_to_26 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/24_to_25.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 24 run function global_shop:ui/display_manager/summon_single_item/24 2 | execute if score selectScore glbs_common matches 25 run function global_shop:ui/display_manager/summon_single_item/25 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/8_to_13.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 8..10 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/8_to_10 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/11_to_13 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/control_item_data/to_string.mcfunction: -------------------------------------------------------------------------------- 1 | # @param g_itemData 2 | # @param g_text 3 | # @executor TextDisplay 4 | 5 | # 控件的文本以 nbt 列表形式存储在 g_itemData.tag.global_shop.text,直接写入 g_text 6 | data modify storage global_shop:common g_text set from storage global_shop:common g_itemData.tag.global_shop.text -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/player_left_click/change_mode/edit_view_sell_shop.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/menu/handlers/menu_handler/change_mode/edit_view_sell_shop 2 | 3 | # 音效 更换菜单 4 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/player_left_click/change_mode_to_player_setting.mcfunction: -------------------------------------------------------------------------------- 1 | # 从主菜单进入玩家设置 2 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_setting 3 | # 音效 更换菜单 4 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_handler/handle/item_not_exist/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"player_shop.no_exist\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/recycle_shop_handler/handle/item_not_exist/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"recycle_shop.no_exist\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/check_env/invalid_dimension.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"open.illegal_dimension\"","color":"red"}] 2 | 3 | function global_shop:sound/fail 4 | 5 | return 1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/on_exit_shop.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 玩家退出商店时执行 2 | # @executor Player 3 | 4 | function global_shop:logic/player/init_scoreboard 5 | 6 | title @s actionbar [{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"open.close\"","color":"yellow"}] 7 | 8 | execute at @s run function global_shop:sound/exit -------------------------------------------------------------------------------- /data/global_shop/functions/logic/text_display/text_display/set_custom_position/get_player_settings.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation temp1 glbs_common = @s glbs_st_item_frame_pos_v 2 | scoreboard players operation temp2 glbs_common = @s glbs_st_item_frame_pos_h 3 | scoreboard players operation temp3 glbs_common = @s glbs_st_item_frame_pos_d -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/get_player_ban_state/unbanned.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:common","nbt":"admin_input","color":"yellow"},"\u00a7e: ",{"text":"✔","color":"green"}] 2 | 3 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/utils/math_utils/abs.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 取绝对值 2 | # @param temp(记分板传入) 3 | 4 | execute if score temp glbs_common matches 0.. run return run scoreboard players get temp glbs_common 5 | 6 | scoreboard players set temp2 glbs_common 0 7 | return run scoreboard players operation temp2 glbs_common -= temp glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/player_left_click/change_mode/edit_view_recycle_shop.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/menu/handlers/menu_handler/change_mode/edit_view_recycle_shop 2 | 3 | # 音效 更换菜单 4 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_sell_shop_handler/handle/item_not_exist/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"sell_shop.no_exist\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_handler/handle/item_not_exist.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | function global_shop:logic/menu/handlers/player_shop_handler/refresh 4 | 5 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/player_shop_handler/handle/item_not_exist/tip -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/notice_trigger_easter_egg.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},"\u00a7bYou triggered an \u00a76\u00a7lE\u00a73\u00a7la\u00a7c\u00a7ls\u00a7d\u00a7lt\u00a7e\u00a7le\u00a7a\u00a7lr \u00a73\u00a7le\u00a7a\u00a7lg\u00a7d\u00a7lg\u00a7e\u00a7l!"] -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_recycle_shop_handler/handle/item_not_exist/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"recycle_shop.no_exist\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_sold_handler/handle/item_not_exist/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"view_sold.no_exist\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_return_handler/handle/item_not_exist/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"view_return.no_exist\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/sell_shop_handler/handle/item_not_exist.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | function global_shop:logic/menu/handlers/sell_shop_handler/refresh 4 | 5 | # 音效 失败 6 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/sell_shop_handler/handle/item_not_exist/tip -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/append_to_sell_shop_list.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/append_to_sell_shop_list 2 | # @brief 将物品插入到出售商店列表 3 | # @param g_itemData 要插入的物品 4 | # @executor Player 5 | 6 | # 写入出售商店物品列表 7 | data modify storage global_shop:storage g_sellShopList append from storage global_shop:common g_itemData -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/0_to_1.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 0 run function global_shop:ui/display_manager/range_update_and_delete/2/0 2 | execute if score selectScore glbs_common matches 1 run function global_shop:ui/display_manager/range_update_and_delete/2/1 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/2_to_3.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 2 run function global_shop:ui/display_manager/range_update_and_delete/2/2 2 | execute if score selectScore glbs_common matches 3 run function global_shop:ui/display_manager/range_update_and_delete/2/3 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/4_to_5.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 4 run function global_shop:ui/display_manager/range_update_and_delete/2/4 2 | execute if score selectScore glbs_common matches 5 run function global_shop:ui/display_manager/range_update_and_delete/2/5 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/7_to_8.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 7 run function global_shop:ui/display_manager/range_update_and_delete/2/7 2 | execute if score selectScore glbs_common matches 8 run function global_shop:ui/display_manager/range_update_and_delete/2/8 -------------------------------------------------------------------------------- /data/global_shop/functions/advancements/craft_stick_open_shop.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | # log 4 | #say 打开商店 5 | 6 | # 数据包被卸载时(抹除所有数据)是不会调用 Scheduler#1t 的,所以以下触发方式刚好适配,不会出现数据全部抹除,玩家还能通过合成木棍来执行打开商店的函数的情况 7 | scoreboard players reset @s open_global_shop 8 | scoreboard players set @s open_global_shop 1 9 | 10 | # 不在此处剥夺进度,在 Scheduler#1s 函数中剥夺 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_left_click/change_mode_to_player_shop_view_my_sold.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_view_my_sold 2 | # 音效 更换菜单 3 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_left_click/change_mode_to_player_shop_view_return.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_view_return 2 | # 音效 更换菜单 3 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_bought_handler/handle/item_not_exist/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"view_bought.no_exist\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_selling_handler/handle/item_not_exist/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"view_selling.no_exist\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/8_to_10.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 8..9 run function global_shop:ui/display_manager/range_summon/select_item_to_summon/8_to_9 2 | execute if score selectScore glbs_common matches 10 run function global_shop:ui/display_manager/summon_single_item/10 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/9_to_10.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 9 run function global_shop:ui/display_manager/range_update_and_delete/2/9 2 | execute if score selectScore glbs_common matches 10 run function global_shop:ui/display_manager/range_update_and_delete/2/10 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/flush_display_text.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/item_display_entity/flush_display_text 2 | # 根据作为执行者的物品展示实体,刷新文本展示实体的物品展示信息 3 | # @executor ItemDisplayEntity 物品展示实体 4 | 5 | data modify storage global_shop:common g_itemData set from entity @s item 6 | function global_shop:logic/item_display_entity/display_text -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/player_left_click/change_mode_to_player_cash_exchange.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/menu/handlers/main_menu_handler/handle/player_left_click/change_mode_to_player_cash_exchange 2 | 3 | # 玩家从主菜单进入货币兑换页面 4 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_cash_exchange -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_left_click/change_mode_to_player_shop_view_my_bought.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_view_my_bought 2 | # 音效 更换菜单 3 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_left_click/change_mode_to_player_shop_view_my_selling.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_view_my_selling 2 | # 音效 更换菜单 3 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/locate_index_in_sell_shop_list_by_id/while/if.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation left glbs_common = mid glbs_common 2 | scoreboard players add left glbs_common 1 3 | 4 | execute if score left glbs_common <= right glbs_common run function global_shop:storage/store_manager/locate_index_in_sell_shop_list_by_id/while -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/11_to_13.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 11..12 run function global_shop:ui/display_manager/range_summon/select_item_to_summon/11_to_12 2 | execute if score selectScore glbs_common matches 13 run function global_shop:ui/display_manager/summon_single_item/13 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/18_to_20.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 18..19 run function global_shop:ui/display_manager/range_summon/select_item_to_summon/18_to_19 2 | execute if score selectScore glbs_common matches 20 run function global_shop:ui/display_manager/summon_single_item/20 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/21_to_23.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 21..22 run function global_shop:ui/display_manager/range_summon/select_item_to_summon/21_to_22 2 | execute if score selectScore glbs_common matches 23 run function global_shop:ui/display_manager/summon_single_item/23 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon/24_to_26.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 24..25 run function global_shop:ui/display_manager/range_summon/select_item_to_summon/24_to_25 2 | execute if score selectScore glbs_common matches 26 run function global_shop:ui/display_manager/summon_single_item/26 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/0_to_3.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 0..1 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/0_to_1 2 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/2_to_3 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/0_to_6.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 0..3 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/0_to_3 2 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/4_to_6 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/11_to_12.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 11 run function global_shop:ui/display_manager/range_update_and_delete/2/11 2 | execute if score selectScore glbs_common matches 12 run function global_shop:ui/display_manager/range_update_and_delete/2/12 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/14_to_15.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 14 run function global_shop:ui/display_manager/range_update_and_delete/2/14 2 | execute if score selectScore glbs_common matches 15 run function global_shop:ui/display_manager/range_update_and_delete/2/15 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/16_to_17.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 16 run function global_shop:ui/display_manager/range_update_and_delete/2/16 2 | execute if score selectScore glbs_common matches 17 run function global_shop:ui/display_manager/range_update_and_delete/2/17 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/18_to_19.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 18 run function global_shop:ui/display_manager/range_update_and_delete/2/18 2 | execute if score selectScore glbs_common matches 19 run function global_shop:ui/display_manager/range_update_and_delete/2/19 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/21_to_22.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 21 run function global_shop:ui/display_manager/range_update_and_delete/2/21 2 | execute if score selectScore glbs_common matches 22 run function global_shop:ui/display_manager/range_update_and_delete/2/22 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/24_to_25.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 24 run function global_shop:ui/display_manager/range_update_and_delete/2/24 2 | execute if score selectScore glbs_common matches 25 run function global_shop:ui/display_manager/range_update_and_delete/2/25 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/summon/carry_text_display/summon/get_pos_and_trans.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor ItemDisplayEntity 2 | 3 | execute store result score g_baseRotation glbs_common run data get entity @s Rotation[0] 4 | execute store result score translation_v glbs_common run data get entity @s transformation.translation[1] 100 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/player_left_click/try_disable/no_select.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.disable.no_select\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/player_left_click/try_set_item/disabled.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.set_item.disabled\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/player_left_click/try_set_item/no_select.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.set_item.no_select\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/player_left_click/try_set_price/disabled.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.set_price.disabled\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/player_left_click/try_set_price/no_select.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.set_price.no_select\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/disable_tellraw.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.switch.disable\"","color":"red"}] 2 | function global_shop:sound/disable -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/enable_tellraw.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.switch.enable\"","color":"green"}] 2 | function global_shop:sound/enable -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/set_item/success_tellraw.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.set_item.success\"","color":"green"}] 2 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_sell_shop_handler/handle/player_left_click_confirm/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"sell_shop.delete.success\"","color":"green"}] 2 | 3 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/change_mode/edit_main/no_permission.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"edit_main.no_permission\"","color":"red"}] 4 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/perform/incomplete.mcfunction: -------------------------------------------------------------------------------- 1 | execute on passengers if entity @s[type=minecraft:player] run tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"use.incomplete\"","color":"red"}] 2 | 3 | function global_shop:logic/menu/kill -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/append_to_recycle_shop_list.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/append_to_recycle_shop_list 2 | # 3 | # @brief 将物品插入到回收商店列表 4 | # @param g_itemData 要插入的物品 5 | # @executor Player 6 | 7 | # 写入出售商店物品列表 8 | data modify storage global_shop:storage g_recycleShopList append from storage global_shop:common g_itemData -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/0_to_13.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 0..6 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/0_to_6 2 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/7_to_13 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/7_to_10.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 7..8 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/7_to_8 2 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/9_to_10 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/7_to_13.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 7..10 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/7_to_10 2 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/11_to_13 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/summon/carry_text_display.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor ItemDisplayEntity 2 | 3 | tag @s add glbs_to_carry_text_display 4 | 5 | execute summon minecraft:text_display run function global_shop:ui/display_manager/summon_single_item/summon/carry_text_display/summon 6 | 7 | tag @s remove glbs_to_carry_text_display -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/player_left_click/try_set_item/mainhand_empty.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.set_item.empty_hand\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/set_price/success_tellraw.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.set_price.success\"","color":"green"}] 2 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_recycle_shop_handler/handle/player_left_click_confirm/tip.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"recycle_shop.delete.success\"","color":"green"}] 2 | 3 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_cash_exchange_handler/handle/player_left_click/exchange_n/cash_disabled.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.exchange.disabled\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/append_to_player_selling_list.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 将玩家上架的这个物品插入到其正在出售的物品列表 2 | # @macro {playerUid: int} 3 | # @$param playerUid 玩家 uid 4 | # @param g_itemData 要插入的物品 5 | # @executor Player 6 | 7 | $data modify storage global_shop:storage g_playerSellingListMap.$(playerUid) append from storage global_shop:common g_itemData -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/delete_player_shop_elem_by_id/macro_delete.mcfunction: -------------------------------------------------------------------------------- 1 | # @macro {index: int, uid: int, id: int} 2 | 3 | # 从玩家商店总表中删除 4 | $data remove storage global_shop:storage g_playerShopList[$(index)] 5 | 6 | # 从玩家正在出售的物品列表中删除 7 | $data remove storage global_shop:storage g_playerSellingListMap.$(uid)[{tag:{global_shop:{id:$(id)}}}] -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/locate_index_in_player_shop_list_by_id/while/if.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation left glbs_common = mid glbs_common 2 | scoreboard players add left glbs_common 1 3 | 4 | execute if score left glbs_common <= right glbs_common run function global_shop:storage/store_manager/locate_index_in_player_shop_list_by_id/while -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/locate_index_in_recycle_shop_list_by_id/while/if.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation left glbs_common = mid glbs_common 2 | scoreboard players add left glbs_common 1 3 | 4 | execute if score left glbs_common <= right glbs_common run function global_shop:storage/store_manager/locate_index_in_recycle_shop_list_by_id/while -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/locate_index_in_sell_shop_list_by_id/while/else_if.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation right glbs_common = mid glbs_common 2 | scoreboard players remove right glbs_common 1 3 | 4 | execute if score left glbs_common <= right glbs_common run function global_shop:storage/store_manager/locate_index_in_sell_shop_list_by_id/while -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/14_to_17.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 14..15 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/14_to_15 2 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/16_to_17 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/14_to_20.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 14..17 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/14_to_17 2 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/18_to_20 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/14_to_26.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 14..20 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/14_to_20 2 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/21_to_26 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/21_to_26.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 21..23 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/21_to_23 2 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/24_to_26 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/change_mode/player_cash_exchange/other_op.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.player_enter.editing\"","color":"red"}] 4 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/perform/position_change.mcfunction: -------------------------------------------------------------------------------- 1 | execute on passengers if entity @s[type=minecraft:player] run tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"use.position_change\"","color":"red"}] 2 | 3 | function global_shop:logic/menu/kill -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_return_list_elem_by_uid_and_id/macro_get_elem.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/get_return_list_elem_by_uid_and_id/macro_get_elem 2 | # @macro {id: int, uid: int} 3 | 4 | $data modify storage global_shop:common g_itemData set from storage global_shop:storage g_returnListMap.$(uid)[{tag:{global_shop:{id:$(id)}}}] -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 更新周围的物品展示实体,先更新 order,超过范围说明要删除,否则检查在 g_itemsToDisplay 列表中对应位置的数据是否改变 2 | # @param orderDiff order 差值,需加上 3 | # @executor Menu 4 | 5 | execute on passengers if entity @s[type=minecraft:item_display,tag=!glbs_killed] run function global_shop:ui/display_manager/range_update_and_delete/1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/polymorphic_type/6_to_7.mcfunction: -------------------------------------------------------------------------------- 1 | # 退回的物品 6 2 | execute if score temp2 glbs_common = ItemDataType::RETURN glbs_common run return run function global_shop:logic/item_data/return_item_data/to_string 3 | # 货币 7 4 | execute if score temp2 glbs_common = ItemDataType::CASH glbs_common run function global_shop:logic/item_data/cash_item_data/to_string -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/polymorphic_type/8.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/item_data/polymorphic_type/8 2 | # @param g_itemData 3 | # @param g_text 4 | # @executor TextDisplay 5 | 6 | # 设置按钮的文本以 nbt 列表形式存储在 g_itemData.tag.global_shop.text,直接写入 g_text 7 | data modify storage global_shop:common g_text set from storage global_shop:common g_itemData.tag.global_shop.text -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/display_text.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/item_display_entity/display_text 2 | # @brief 将物品展示实体所含有的物品信息解析和展示到文本展示实体上 3 | # @param g_itemData 物品信息 4 | # @executor ItemDisplayEntity 5 | 6 | execute on vehicle on passengers if entity @s[type=minecraft:text_display] run function global_shop:logic/text_display/parse_and_set_text -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/locate_index_in_player_shop_list_by_id/while/else_if.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation right glbs_common = mid glbs_common 2 | scoreboard players remove right glbs_common 1 3 | 4 | execute if score left glbs_common <= right glbs_common run function global_shop:storage/store_manager/locate_index_in_player_shop_list_by_id/while -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/locate_index_in_recycle_shop_list_by_id/while/else_if.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation right glbs_common = mid glbs_common 2 | scoreboard players remove right glbs_common 1 3 | 4 | execute if score left glbs_common <= right glbs_common run function global_shop:storage/store_manager/locate_index_in_recycle_shop_list_by_id/while -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/return_expire_item/get_expire_num/while/if.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score temp2 glbs_common <= g_time glbs_common run return run function global_shop:storage/store_manager/return_expire_item/get_expire_num/while/if/1 2 | 3 | scoreboard players operation right glbs_common = mid glbs_common 4 | scoreboard players remove right glbs_common 1 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/select_item_to_summon.mcfunction: -------------------------------------------------------------------------------- 1 | # @param selectScore 根据分数选择生成物品展示实体,范围 [0, 26] 2 | 3 | execute if score selectScore glbs_common matches 0..13 run return run function global_shop:ui/display_manager/range_summon/select_item_to_summon/0_to_13 4 | function global_shop:ui/display_manager/range_summon/select_item_to_summon/14_to_26 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/4_to_6.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 4..5 run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/4_to_5 2 | execute if score selectScore glbs_common matches 6 run function global_shop:ui/display_manager/range_update_and_delete/2/6 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_cash_exchange_handler/handle/force_back/tellraw.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | # 提示 4 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.force_back\"","color":"red"}] 5 | # 音效 6 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/sell_shop_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 让主菜单向左转 2 行,对准入口 4 | scoreboard players set g_columnIncrement glbs_common -2 5 | function global_shop:logic/menu/handlers/menu_handler/change_mode/main 6 | # 音效 更换菜单 7 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/kill/kill_passengers/1.mcfunction: -------------------------------------------------------------------------------- 1 | execute if entity @s[type=minecraft:interaction] run function global_shop:logic/interactor/kill 2 | 3 | execute if entity @s[type=minecraft:text_display] run function global_shop:logic/text_display/kill 4 | 5 | execute if entity @s[type=minecraft:item_display] run function global_shop:logic/item_display_entity/kill -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/1m/return_expire_item.mcfunction: -------------------------------------------------------------------------------- 1 | # 如果同时使用的玩家数量 <= 最大同时使用数量的一半,进行过期物品处理 2 | scoreboard players operation temp glbs_common = g_connectNum glbs_common 3 | scoreboard players operation temp glbs_common *= 2 glbs_common 4 | execute if score temp glbs_common <= MAX_CONNECT_NUM glbs_common run function global_shop:storage/store_manager/return_expire_item -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/add_diviver.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/item_data/add_diviver 2 | # 前面没内容则不要分割线 3 | execute unless data storage global_shop:common g_text run return 0 4 | 5 | # 换行(分割线单独一行) 6 | function global_shop:logic/item_data/add_seperator 7 | # 写入分割线 8 | data modify storage global_shop:common g_text append value {"text":"------------","color":"gray"} -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_cash_exchange_handler/handle/player_left_click/deposit/no_cash_on_hand.mcfunction: -------------------------------------------------------------------------------- 1 | # 通知 2 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.exchange.no_hold_cash\"","color":"red"}] 3 | # 音效 4 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/temp_world_entity/marker/carry.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 临时标记 4 | # 00000d3a-0000-0d3a-0000-17cc000017cc 5 | summon minecraft:marker ~ ~ ~ {Tags:["global_shop"],UUID:[I;3386,3386,6092,6092]} 6 | 7 | ride 00000d3a-0000-0d3a-0000-17cc000017cc dismount 8 | tp 00000d3a-0000-0d3a-0000-17cc000017cc @s 9 | ride 00000d3a-0000-0d3a-0000-17cc000017cc mount @s -------------------------------------------------------------------------------- /data/global_shop/functions/logic/text_display/parse_and_set_text.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/text_display/parse_and_set_text 2 | # @param g_itemData 3 | # @executor TextDisplay 4 | 5 | # 解析文本 6 | function global_shop:logic/item_data/to_string 7 | 8 | # 写入文本 9 | data merge entity @s {text_opacity:-1b,background:-283703273,text:'{"nbt":"g_text","storage":"global_shop:common","interpret":1}'} -------------------------------------------------------------------------------- /data/global_shop/functions/settings/get_permission.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 玩家执行该函数,获得商店管理员权限 2 | # @executor Player 3 | 4 | scoreboard players operation @s glbs_permission = Permission::ADMIN glbs_common 5 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},"\u00a7eYou are now GlobalShop op!"] 6 | execute at @s run function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_player_sold_list_elem_by_uid_and_id/macro_get_elem.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/get_player_sold_list_elem_by_uid_and_id/macro_get_elem 2 | # @macro {id: int, uid: int} 3 | 4 | $data modify storage global_shop:common g_itemData set from storage global_shop:storage g_playerSoldListMap.$(uid)[{tag:{global_shop:{id:$(id)}}}] -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/11_to_13.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 11..12 run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/11_to_12 2 | execute if score selectScore glbs_common matches 13 run function global_shop:ui/display_manager/range_update_and_delete/2/13 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/18_to_20.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 18..19 run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/18_to_19 2 | execute if score selectScore glbs_common matches 20 run function global_shop:ui/display_manager/range_update_and_delete/2/20 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/21_to_23.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 21..22 run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/21_to_22 2 | execute if score selectScore glbs_common matches 23 run function global_shop:ui/display_manager/range_update_and_delete/2/23 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update/24_to_26.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score selectScore glbs_common matches 24..25 run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/24_to_25 2 | execute if score selectScore glbs_common matches 26 run function global_shop:ui/display_manager/range_update_and_delete/2/26 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_lore/2.mcfunction: -------------------------------------------------------------------------------- 1 | data modify storage global_shop:common g_text append value {"text":"","extra":[{"storage":"global_shop:common","nbt":"g_itemData.tag.display.Lore[0]","interpret":1},{"storage":"global_shop:storage","nbt":"char.LINE_BREAK_WITH_PADDING","interpret":1},{"storage":"global_shop:common","nbt":"g_itemData.tag.display.Lore[1]","interpret":1}]} -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_sold_handler/handle/item_not_exist.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | function global_shop:logic/menu/handlers/player_shop_view_my_sold_handler/refresh 4 | 5 | # 音效 失败 6 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/player_shop_view_my_sold_handler/handle/item_not_exist/tip -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_return_handler/handle/item_not_exist.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | function global_shop:logic/menu/handlers/player_shop_view_return_handler/refresh 4 | 5 | # 音效 失败 6 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/player_shop_view_return_handler/handle/item_not_exist/tip -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/check_if_player_using_shop_around.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 检查玩家周围是否有其他玩家正在使用商店 2 | # @executor Player 3 | # @return 0 代表没有, 1 代表有 4 | 5 | scoreboard players set temp glbs_common 0 6 | 7 | execute as @a[distance=..10] on vehicle if entity @s[tag=global_shop] run scoreboard players set temp glbs_common 1 8 | 9 | return run scoreboard players get temp glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/settings/return_expire_item.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Admin 2 | 3 | function global_shop:storage/store_manager/return_expire_item 4 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},"\u00a7areturn expire item num: ",{"score":{"objective":"glbs_common","name":"temp2"},"color":"yellow"}] 5 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_player_bought_list_elem_by_uid_and_id/macro_get_elem.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/get_player_bought_list_elem_by_uid_and_id/macro_get_elem 2 | # @macro {id: int, uid: int} 3 | 4 | $data modify storage global_shop:common g_itemData set from storage global_shop:storage g_playerBoughtListMap.$(uid)[{tag:{global_shop:{id:$(id)}}}] -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_player_selling_list_elem_by_uid_and_id/macro_get_elem.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/get_player_selling_list_elem_by_uid_and_id/macro_get_elem 2 | # @macro {id: int, uid: int} 3 | 4 | $data modify storage global_shop:common g_itemData set from storage global_shop:storage g_playerSellingListMap.$(uid)[{tag:{global_shop:{id:$(id)}}}] -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_summon/while.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation selectScore glbs_common = begin glbs_common 2 | function global_shop:ui/display_manager/range_summon/select_item_to_summon 3 | 4 | scoreboard players add begin glbs_common 1 5 | execute if score begin glbs_common < end glbs_common run function global_shop:ui/display_manager/range_summon/while -------------------------------------------------------------------------------- /data/global_shop/functions/logic/inputter/reset_and_disable.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 将玩家所有输入记分板置 0,夺去修改权限 2 | # executor Player 3 | 4 | # reset 才能夺去 enable(使用 set 会导致玩家仍然可以利用上一次被 enable 的权限) 5 | scoreboard players reset @s glbs_inputter_1 6 | # 保证有分数 7 | scoreboard players set @s glbs_inputter_1 0 8 | 9 | scoreboard players reset @s glbs_inputter_2 10 | scoreboard players set @s glbs_inputter_2 0 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_bought_handler/handle/item_not_exist.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | function global_shop:logic/menu/handlers/player_shop_view_my_bought_handler/refresh 4 | 5 | # 音效 失败 6 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/player_shop_view_my_bought_handler/handle/item_not_exist/tip -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/open_menu_success/init_passengers/1.mcfunction: -------------------------------------------------------------------------------- 1 | execute if entity @s[type=minecraft:player] run function global_shop:logic/player/init_state 2 | 3 | execute if entity @s[type=minecraft:interaction] run function global_shop:logic/interactor/init_state 4 | 5 | execute if entity @s[type=minecraft:text_display] run function global_shop:logic/text_display/init_state -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/summon/carry_text_display_without_animation.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor ItemDisplayEntity 2 | 3 | tag @s add glbs_to_carry_text_display 4 | 5 | execute summon minecraft:text_display run function global_shop:ui/display_manager/summon_single_item/summon/carry_text_display/summon_without_animation 6 | 7 | tag @s remove glbs_to_carry_text_display -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/update_whole_page/1.mcfunction: -------------------------------------------------------------------------------- 1 | # 去掉高亮 2 | execute if entity @s[tag=glbs_item_highlight] run function global_shop:logic/item_display_entity/set_state_normal 3 | 4 | # 自身 id 与拿到的物品数据 id 不同,更新数据和显示 5 | scoreboard players operation selectScore glbs_common = @s glbs_order 6 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update -------------------------------------------------------------------------------- /data/global_shop/functions/logic/interactor/get_right_click_action/get_player_uuid.mcfunction: -------------------------------------------------------------------------------- 1 | execute store result score temp5 glbs_common run data get entity @s UUID[0] 2 | execute store result score temp6 glbs_common run data get entity @s UUID[1] 3 | execute store result score temp7 glbs_common run data get entity @s UUID[2] 4 | execute store result score temp8 glbs_common run data get entity @s UUID[3] -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/polymorphic_type/4_to_5.mcfunction: -------------------------------------------------------------------------------- 1 | # 玩家历史购买的物品 4 2 | execute if score temp2 glbs_common = ItemDataType::MY_BOUGHT glbs_common run return run function global_shop:logic/item_data/my_bought_item_data/to_string 3 | # 玩家历史出售的物品 5 4 | execute if score temp2 glbs_common = ItemDataType::MY_SOLD glbs_common run function global_shop:logic/item_data/my_sold_item_data/to_string -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/set_price/disabled.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players set @s glbs_inputter_1 0 2 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.set_price.disabled\"","color":"red"}] 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_selling_handler/handle/item_not_exist.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | function global_shop:logic/menu/handlers/player_shop_view_my_selling_handler/refresh 4 | 5 | # 音效 失败 6 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/player_shop_view_my_selling_handler/handle/item_not_exist/tip -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/invalid_block.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"open.illegal_block.1\"","color":"red"},"\n",{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"open.illegal_block.2\"","color":"red"}] 2 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/0_to_2.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 0 run return run function global_shop:logic/player/modify_item_count/0 2 | execute if score slot glbs_common matches 1 run return run function global_shop:logic/player/modify_item_count/1 3 | execute if score slot glbs_common matches 2 run function global_shop:logic/player/modify_item_count/2 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/3_to_5.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 3 run return run function global_shop:logic/player/modify_item_count/3 2 | execute if score slot glbs_common matches 4 run return run function global_shop:logic/player/modify_item_count/4 3 | execute if score slot glbs_common matches 5 run function global_shop:logic/player/modify_item_count/5 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/6_to_8.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 6 run return run function global_shop:logic/player/modify_item_count/6 2 | execute if score slot glbs_common matches 7 run return run function global_shop:logic/player/modify_item_count/7 3 | execute if score slot glbs_common matches 8 run function global_shop:logic/player/modify_item_count/8 -------------------------------------------------------------------------------- /data/global_shop/functions/load/no_fully_execute.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"error.incomplete_execution.1\"","color":"red"},"\n",{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"error.incomplete_execution.2\"","color":"red"}] 2 | function global_shop:sound/break -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/polymorphic_type/0_to_1.mcfunction: -------------------------------------------------------------------------------- 1 | # 控件 0 2 | execute if score temp2 glbs_common = ItemDataType::CONTROL glbs_common run return run function global_shop:logic/item_data/control_item_data/to_string 3 | 4 | # 玩家商店的物品 1 5 | execute if score temp2 glbs_common = ItemDataType::PLAYER_SHOP glbs_common run function global_shop:logic/item_data/player_shop_item_data/to_string -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/player_left_click/try_set_item/hold_cash.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Admin 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"menu_handler.cash_use_in_illigal_place\"","color":"red"}] 4 | 5 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/player_left_click/change_mode_to_player_shop_main.mcfunction: -------------------------------------------------------------------------------- 1 | # 从主菜单进入玩家商店主界面,无需校准列 2 | scoreboard players set g_columnIncrement glbs_common 0 3 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_main 4 | # 音效 更换菜单 5 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/rotatable_menu_handler/handle/player_left_click/click_control_null_item.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 玩家左键时点击空项,不会有任何效果 2 | # @executor Menu 3 | 4 | # 清除 lastAction_ 5 | scoreboard players operation @s glbs_last_action = Action::NO_ACTION_THIS_PLAYER glbs_common 6 | 7 | # log 8 | #execute on passengers if entity @s[type=minecraft:player] run tellraw @s ["左键空项或菜单外,无效果"] -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/ban_deban_player/ban/force_exit.mcfunction: -------------------------------------------------------------------------------- 1 | execute on vehicle run function global_shop:logic/menu/kill 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"admin_settings.ban_player.notify_banned_player\"","color":"red"}] 4 | 5 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/12_to_14.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 12 run return run function global_shop:logic/player/modify_item_count/12 2 | execute if score slot glbs_common matches 13 run return run function global_shop:logic/player/modify_item_count/13 3 | execute if score slot glbs_common matches 14 run function global_shop:logic/player/modify_item_count/14 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/15_to_17.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 15 run return run function global_shop:logic/player/modify_item_count/15 2 | execute if score slot glbs_common matches 16 run return run function global_shop:logic/player/modify_item_count/16 3 | execute if score slot glbs_common matches 17 run function global_shop:logic/player/modify_item_count/17 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/18_to_20.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 18 run return run function global_shop:logic/player/modify_item_count/18 2 | execute if score slot glbs_common matches 19 run return run function global_shop:logic/player/modify_item_count/19 3 | execute if score slot glbs_common matches 20 run function global_shop:logic/player/modify_item_count/20 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/21_to_23.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 21 run return run function global_shop:logic/player/modify_item_count/21 2 | execute if score slot glbs_common matches 22 run return run function global_shop:logic/player/modify_item_count/22 3 | execute if score slot glbs_common matches 23 run function global_shop:logic/player/modify_item_count/23 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/24_to_26.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 24 run return run function global_shop:logic/player/modify_item_count/24 2 | execute if score slot glbs_common matches 25 run return run function global_shop:logic/player/modify_item_count/25 3 | execute if score slot glbs_common matches 26 run function global_shop:logic/player/modify_item_count/26 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/27_to_29.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 27 run return run function global_shop:logic/player/modify_item_count/27 2 | execute if score slot glbs_common matches 28 run return run function global_shop:logic/player/modify_item_count/28 3 | execute if score slot glbs_common matches 29 run function global_shop:logic/player/modify_item_count/29 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/30_to_32.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 30 run return run function global_shop:logic/player/modify_item_count/30 2 | execute if score slot glbs_common matches 31 run return run function global_shop:logic/player/modify_item_count/31 3 | execute if score slot glbs_common matches 32 run function global_shop:logic/player/modify_item_count/32 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/33_to_35.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 33 run return run function global_shop:logic/player/modify_item_count/33 2 | execute if score slot glbs_common matches 34 run return run function global_shop:logic/player/modify_item_count/34 3 | execute if score slot glbs_common matches 35 run function global_shop:logic/player/modify_item_count/35 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/9_to_11.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 9 run return run function global_shop:logic/player/modify_item_count/9 2 | execute if score slot glbs_common matches 10 run return run function global_shop:logic/player/modify_item_count/10 3 | execute if score slot glbs_common matches 11 run function global_shop:logic/player/modify_item_count/11 -------------------------------------------------------------------------------- /data/global_shop/functions/adapters/money_scoreboard_adapter/get_money.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 获取玩家金钱,适配服务器自定义记分板 2 | # @executor Player 3 | 4 | data remove storage global_shop:common temp 5 | data modify storage global_shop:common temp.scoreboard set from storage global_shop:storage g_scoreboard 6 | function global_shop:adapters/money_scoreboard_adapter/get_money/macro_get_money with storage global_shop:common temp -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/disappear.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 让物品展示实体缩小消失 2 | # @executor ItemDisplayEntity 3 | 4 | data modify entity @s transformation.translation[2] set value -5.0f 5 | data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{scale:[0.0f,0.0f,0.0f]},Glowing:0b} 6 | 7 | execute on passengers run function global_shop:logic/text_display/disappear -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/recycle_shop_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到主菜单 4 | # 让主菜单向左转 3 列,对准入口 5 | scoreboard players set g_columnIncrement glbs_common -3 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/main 7 | # 音效 更换菜单 8 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/polymorphic_type/2_to_3.mcfunction: -------------------------------------------------------------------------------- 1 | # 出售商店的物品 2 2 | execute if score temp2 glbs_common = ItemDataType::SELL_SHOP glbs_common run return run function global_shop:logic/item_data/sell_shop_item_data/to_string 3 | 4 | # 回收商店的物品 3 5 | execute if score temp2 glbs_common = ItemDataType::RECYCLE_SHOP glbs_common run function global_shop:logic/item_data/recycle_shop_item_data/to_string -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_setting_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到主菜单 4 | # 让主菜单向右转 2 行,对准入口 5 | scoreboard players set g_columnIncrement glbs_common 2 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/main 7 | # 音效 更换菜单 8 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/open_menu_success/easter_egg.mcfunction: -------------------------------------------------------------------------------- 1 | # @return 0 - 失败;1 - 成功 2 | 3 | # 箱子矿车必须不携带 Tags(避免操作其它数据包的矿车) 4 | execute if data entity @s Tags run return 0 5 | 6 | data merge entity @s {CustomDisplayTile:true,DisplayOffset:5,DisplayState:{Name:"minecraft:light_blue_shulker_box"},CustomName:'"\\u00a7f>> \\u00a7bGlobal Shop"',CustomNameVisible:1b,Tags:["glbs_has_painted"]} 7 | 8 | return 1 -------------------------------------------------------------------------------- /data/global_shop/functions/text/init.mcfunction: -------------------------------------------------------------------------------- 1 | data remove storage global_shop:common temp 2 | data modify storage global_shop:common temp.lang set from storage global_shop:storage g_lang.lang 3 | 4 | data remove storage global_shop:storage g_lang 5 | data modify storage global_shop:storage g_lang.lang set from storage global_shop:common temp.lang 6 | 7 | function global_shop:text/init/macro with storage global_shop:common temp -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/on_item_summon/do.mcfunction: -------------------------------------------------------------------------------- 1 | tag @s remove glbs_to_set_state_normal 2 | 3 | # 如果玩家转动角度过大,看向新生成的物品,物品会被添加高亮标签,但在此处延迟变大和高亮(因为用正常处理逻辑会导致下一轮处理才让物品高亮,后来改为本轮高亮,所以必须一开始就加标签标记处理) 4 | execute if entity @s[tag=glbs_item_highlight] run return run function global_shop:logic/item_display_entity/set_state_highlight_delay 5 | 6 | function global_shop:logic/item_display_entity/set_state_normal -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到玩家商店主菜单 4 | # 让主菜单向右转 2 行,对准入口 5 | scoreboard players set g_columnIncrement glbs_common 2 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_main 7 | # 音效 更换菜单 8 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/0_to_8.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 0..2 run return run function global_shop:logic/player/modify_item_count/0_to_2 2 | execute if score slot glbs_common matches 3..5 run return run function global_shop:logic/player/modify_item_count/3_to_5 3 | execute if score slot glbs_common matches 6..8 run function global_shop:logic/player/modify_item_count/6_to_8 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/summon/merge_template.mcfunction: -------------------------------------------------------------------------------- 1 | # 初始状态,无法看见 2 | # 标签 glbs_to_set_state_normal 用于标记该物品展示实体在之后的游戏刻变为正常大小 3 | data merge entity @s {Tags:["global_shop","glbs_to_set_state_normal"],billboard:"fixed",item_display:"gui",transformation:{translation:[0.0f,0.0f,-5.0f],scale:[0.0f,0.0f,0.0f],right_rotation:[0.0f,1.0f,0.0f,0.0f]},item:{Count:1b},brightness:{block:15,sky:15}} -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/item_id_translate_json_get_translate.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 提取 g_itemIdTranslateJson 的 translate 2 | # @macro {input: string} 3 | # @$param input 就是 g_itemIdTranslateJson 4 | # @param g_itemIdTranslateString 出参 5 | 6 | $data modify storage global_shop:common temp set value $(input) 7 | data modify storage global_shop:common g_itemIdTranslateString set from storage global_shop:common temp.translate -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_handler/handle/player_left_click_confirm/give_item_to_player_and_tip.mcfunction: -------------------------------------------------------------------------------- 1 | function global_shop:logic/player/give_item 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"player_shop.buy.success\"","color":"green"}] 4 | 5 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到主菜单 4 | # 让主菜单向左转 1 行,对准入口 5 | scoreboard players set g_columnIncrement glbs_common -1 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/main 7 | # 音效 更换菜单 8 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/polymorphic_mode/11_to_12.mcfunction: -------------------------------------------------------------------------------- 1 | # 编辑浏览出售商店的处理逻辑 11 2 | execute if score @s glbs_mode = Mode::EDIT_VIEW_RECYCLE_SHOP glbs_common run return run function global_shop:logic/menu/handlers/edit_view_recycle_shop_handler/handle 3 | 4 | # 编辑货币交换的处理逻辑 12 5 | execute if score @s glbs_mode = Mode::EDIT_CASH_EXCHANGE glbs_common run function global_shop:logic/menu/handlers/edit_cash_exchange_handler/handle -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/parse_player_name/get_name.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 提取 g_playerNameJson 的 hoverEvent.contents.name 2 | # @macro {input: RawJson} 3 | # @$param input 就是 g_playerNameJson 4 | # @param g_playerNameJson 出参 5 | 6 | $data modify storage global_shop:common temp set value $(input) 7 | data modify storage global_shop:common g_playerNameJson.name set from storage global_shop:common temp.hoverEvent.contents.name -------------------------------------------------------------------------------- /data/global_shop/functions/logic/interactor/get_left_click_action.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 判断玩家左键 2 | # @executor Interactor 3 | # @return Action 4 | 5 | # 获取 ACTION 6 | execute store result score temp glbs_common run function global_shop:logic/interactor/get_left_click_action/get_action 7 | # 清除 ACTION 8 | function global_shop:logic/interactor/clear_left_click_action 9 | 10 | return run scoreboard players get temp glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/player_left_click/change_mode/admin_setting.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/menu/handlers/edit_main_menu_handler/handle/player_left_click/change_mode/admin_setting 2 | function global_shop:logic/menu/handlers/menu_handler/change_mode/admin_setting 3 | 4 | # 音效 更换菜单 5 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_left_click/tellraw_money.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/player_shop_main_menu_handler/handle/player_left_click/tellraw_money/1 4 | 5 | # 记录上一次左键的物品的序号 order 6 | function global_shop:logic/menu/handlers/menu_handler/handle/update_last_click_order -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/recycle_shop_handler/handle/item_not_exist.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/menu/handlers/recycle_shop_handler/handle/item_not_exist 2 | # @executor Menu 3 | 4 | function global_shop:logic/menu/handlers/recycle_shop_handler/refresh 5 | 6 | # 音效 失败 7 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/recycle_shop_handler/handle/item_not_exist/tip -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/18_to_26.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 18..20 run return run function global_shop:logic/player/modify_item_count/18_to_20 2 | execute if score slot glbs_common matches 21..23 run return run function global_shop:logic/player/modify_item_count/21_to_23 3 | execute if score slot glbs_common matches 24..26 run function global_shop:logic/player/modify_item_count/24_to_26 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/27_to_35.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 27..29 run return run function global_shop:logic/player/modify_item_count/27_to_29 2 | execute if score slot glbs_common matches 30..32 run return run function global_shop:logic/player/modify_item_count/30_to_32 3 | execute if score slot glbs_common matches 33..35 run function global_shop:logic/player/modify_item_count/33_to_35 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/modify_item_count/9_to_17.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score slot glbs_common matches 9..11 run return run function global_shop:logic/player/modify_item_count/9_to_11 2 | execute if score slot glbs_common matches 12..14 run return run function global_shop:logic/player/modify_item_count/12_to_14 3 | execute if score slot glbs_common matches 15..17 run function global_shop:logic/player/modify_item_count/15_to_17 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/interactor/get_right_click_action.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 获取玩家右键信息并清除 2 | # @executor Interactor 3 | # @return Action 4 | 5 | # 获取 ACTION 6 | execute store result score temp glbs_common run function global_shop:logic/interactor/get_right_click_action/get_action 7 | # 清除 ACTION 8 | function global_shop:logic/interactor/clear_right_click_action 9 | 10 | return run scoreboard players get temp glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_bought_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到玩家商店主菜单 4 | # 让主菜单向左转 2 行,对准入口 5 | scoreboard players set g_columnIncrement glbs_common -2 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_main 7 | # 音效 更换菜单 8 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_selling_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到玩家商店主菜单 4 | # 让主菜单向右转 1 行,对准入口 5 | scoreboard players set g_columnIncrement glbs_common 1 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_main 7 | # 音效 更换菜单 8 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_sold_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到玩家商店主菜单 4 | # 让主菜单向左转 3 行,对准入口 5 | scoreboard players set g_columnIncrement glbs_common -3 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_main 7 | # 音效 更换菜单 8 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_return_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 切换到玩家商店主菜单 4 | # 让主菜单向左转 1 行,对准入口 5 | scoreboard players set g_columnIncrement glbs_common -1 6 | function global_shop:logic/menu/handlers/menu_handler/change_mode/player_shop_main 7 | # 音效 更换菜单 8 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/get_angle_diff/1.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation i4 glbs_common = i3 glbs_common 2 | scoreboard players add i4 glbs_common 360 3 | 4 | execute if score i4 glbs_common matches -180..180 run scoreboard players operation i5 glbs_common = i4 glbs_common 5 | execute unless score i4 glbs_common matches -180..180 run function global_shop:logic/menu/handlers/menu_handler/get_angle_diff/2 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_lore/1_to_4.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score size glbs_common matches 1 run return run function global_shop:logic/item_data/parse_lore/1 2 | execute if score size glbs_common matches 2 run return run function global_shop:logic/item_data/parse_lore/2 3 | execute if score size glbs_common matches 3 run return run function global_shop:logic/item_data/parse_lore/3 4 | function global_shop:logic/item_data/parse_lore/4 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_lore/5_to_8.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score size glbs_common matches 5 run return run function global_shop:logic/item_data/parse_lore/5 2 | execute if score size glbs_common matches 6 run return run function global_shop:logic/item_data/parse_lore/6 3 | execute if score size glbs_common matches 7 run return run function global_shop:logic/item_data/parse_lore/7 4 | function global_shop:logic/item_data/parse_lore/8 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/handle/invalid_player_input.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | scoreboard players set @s glbs_inputter_1 0 4 | scoreboard players enable @s glbs_inputter 5 | 6 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"menu.no_select\"","color":"red"}] 7 | 8 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_lore/9_to_12.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score size glbs_common matches 9 run return run function global_shop:logic/item_data/parse_lore/9 2 | execute if score size glbs_common matches 10 run return run function global_shop:logic/item_data/parse_lore/10 3 | execute if score size glbs_common matches 11 run return run function global_shop:logic/item_data/parse_lore/11 4 | function global_shop:logic/item_data/parse_lore/12 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/set_price/illegal_price.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players set @s glbs_inputter_1 0 2 | scoreboard players enable @s glbs_inputter_1 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.set_price.negative\"","color":"red"}] 4 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_handler/handle/player_left_click_confirm/sell_by_myself/tip_and_get_player_uid.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation uid glbs_common = @s glbs_uid 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"player_shop.buy.yourself\"","color":"green"}] 4 | 5 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_return_handler/handle/player_left_click_confirm/tip_and_get_player_uid.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation uid glbs_common = @s glbs_uid 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"view_return.take_back.success\"","color":"green"}] 4 | 5 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/uninstall/confirm/fail.mcfunction: -------------------------------------------------------------------------------- 1 | data remove storage global_shop:common admin_input 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"admin_settings.uninstall.fail\"","color":"red"}," \u00a7c\"",{"text":"i want to uninstall","color":"dark_red","bold":true},"\u00a7c\""] 4 | 5 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/register_player/parse_player_name_fail.mcfunction: -------------------------------------------------------------------------------- 1 | # 取消分配 uid 2 | scoreboard players reset @s glbs_uid 3 | scoreboard players remove g_nextUid glbs_common 1 4 | 5 | tellraw @a [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"text":"[ERROR] Failed to parse player name when player registers for Global Shop.","color":"red"}] 6 | function global_shop:sound/fail 7 | 8 | return 1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_left_click/sell_item.mcfunction: -------------------------------------------------------------------------------- 1 | # 清除左键信息 2 | execute on passengers if entity @s[type=minecraft:interaction] run function global_shop:logic/interactor/clear_left_click_action 3 | 4 | # 检查玩家是否达到最大物品存储数目 5 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/player_shop_main_menu_handler/handle/player_left_click/sell_item/check -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_view_my_selling_handler/handle/player_left_click_confirm/tip_and_get_player_uid.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players operation uid glbs_common = @s glbs_uid 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"view_selling.take_back.success\"","color":"green"}] 4 | 5 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/10t.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/scheduler/10t 2 | 3 | # log 4 | #say 10t 5 | 6 | # 完整执行标记检查 7 | execute unless score g_tickTag glbs_common matches 0 run return run function global_shop:logic/scheduler/not_fully_execute 8 | scoreboard players add g_tickTag glbs_common 1 9 | # 调入口 10 | function global_shop:logic/shop/perform 11 | # 续:完整执行标记检查 12 | scoreboard players set g_tickTag glbs_common 0 -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/try_modify_money_scoreboard/invalid_scoreboard.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"admin_settings.money_sc.no_exist.1\"","color":"red"},"\n",{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"admin_settings.money_sc.no_exist.2\"","color":"red"}] 2 | 3 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/test/store_manager_test/locate_index_in_player_shop_list_by_id_test.mcfunction: -------------------------------------------------------------------------------- 1 | # 测试 StoreManager::LocateIndexInPlayerShopListById 2 | # @macro {id: int} 3 | 4 | $scoreboard players set id glbs_common $(id) 5 | 6 | execute store result score temp glbs_common run function global_shop:storage/store_manager/locate_index_in_player_shop_list_by_id 7 | 8 | tellraw @s ["\u00a7breturn: ",{"score":{"objective":"glbs_common","name":"temp"}}] -------------------------------------------------------------------------------- /data/global_shop/functions/adapters/money_scoreboard_adapter/add_money.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 增加玩家金钱,适配服务器自定义记分板 2 | # @param addAmount 要增加的数额 3 | # @executor Player 4 | # @return 增加后的数额 5 | 6 | data remove storage global_shop:common temp 7 | data modify storage global_shop:common temp.scoreboard set from storage global_shop:storage g_scoreboard 8 | return run function global_shop:adapters/money_scoreboard_adapter/add_money/macro_add_money with storage global_shop:common temp -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_sell_shop_handler/handle/item_not_exist.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/menu/handlers/edit_view_sell_shop_handler/handle/item_not_exist 2 | # @executor Menu 3 | 4 | function global_shop:logic/menu/handlers/edit_view_sell_shop_handler/refresh 5 | 6 | # 音效 失败 7 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/edit_view_sell_shop_handler/handle/item_not_exist/tip -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/update_whole_page.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 更新整页(全部)物品展示实体。检查在 g_itemsToDisplay 列表中对应位置的数据,id 改变时说明数据改变,应重新写入 2 | # @executor Menu 3 | 4 | # 清除文本展示实体的文字 5 | execute on passengers if entity @s[type=minecraft:text_display] run function global_shop:logic/text_display/clear_text 6 | 7 | execute on passengers if entity @s[type=minecraft:item_display,tag=!glbs_killed] run function global_shop:ui/display_manager/update_whole_page/1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/revert.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 把 g_itemData 中的物品数据还原成刚从玩家手里拿到的状态,将抹去 tag.global_shop,必要时应提前获取即将删除的记录量 2 | # @param g_itemData 物品数据 3 | 4 | data remove storage global_shop:common g_itemData.tag.global_shop 5 | # tag 为空则去掉 tag:{} 6 | execute store result score temp glbs_common run data get storage global_shop:common g_itemData.tag 7 | execute if score temp glbs_common matches 0 run data remove storage global_shop:common g_itemData.tag -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/admin_add_sell_item/main_hand_has_no_item.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"sell_shop.set_fail.empty_hand\"","color":"red"}] 2 | 3 | scoreboard players set @s glbs_inputter_1 0 4 | scoreboard players enable @s glbs_inputter_1 5 | 6 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_enchantment/append_level_string.mcfunction: -------------------------------------------------------------------------------- 1 | #是原版,判断是否不需要展示等级 2 | scoreboard players set glbs_common isLevel1 0 3 | function global_shop:logic/item_data/parse_enchantment/macro/if_level1 with storage global_shop:common enchIdString 4 | execute if score ifLevel1 glbs_common matches 1 run return 0 5 | 6 | function global_shop:logic/item_data/parse_enchantment/macro/append_level_string with storage global_shop:common temp.enchantments[0] -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/admin_add_recycle_item/main_hand_has_no_item.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"recycle_shop.set_fail.empty_hand\"","color":"red"}] 2 | 3 | scoreboard players set @s glbs_inputter_1 0 4 | scoreboard players enable @s glbs_inputter_1 5 | 6 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_view_recycle_shop_handler/handle/item_not_exist.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/menu/handlers/edit_view_recycle_shop_handler/handle/item_not_exist 2 | # @executor Menu 3 | 4 | function global_shop:logic/menu/handlers/edit_view_recycle_shop_handler/refresh 5 | 6 | # 音效 失败 7 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/edit_view_recycle_shop_handler/handle/item_not_exist/tip -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/change_mode/edit_cash_exchange/other_op.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.admin_enter.multi.1\"","color":"red"},"\n",{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"cash.admin_enter.multi.2\"","color":"red"}] 4 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/get_uid_by_name.mcfunction: -------------------------------------------------------------------------------- 1 | # @param global_shop:common admin_input 玩家名字 2 | # @param playerUid 出参,0 代表玩家还没注册(或者命令执行出错),>= 1 代表该玩家的 uid 3 | 4 | scoreboard players set playerUid glbs_common 0 5 | 6 | data remove storage global_shop:common temp 7 | data modify storage global_shop:common temp.name set from storage global_shop:common admin_input 8 | function global_shop:logic/player/get_uid_by_name/macro_get with storage global_shop:common temp -------------------------------------------------------------------------------- /data/global_shop/functions/settings_/reset_dynamic_data/fail.mcfunction: -------------------------------------------------------------------------------- 1 | data remove storage global_shop:common admin_input 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"admin_settings.reset_dynamic_data.fail\"","color":"red"}," \u00a7c\"",{"text":"i want to clear dynamic data","color":"dark_red","bold":true},"\u00a7c\""] 4 | 5 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/adapters/money_scoreboard_adapter/reduce_money.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 扣除玩家金钱,适配服务器自定义记分板 2 | # @param reduce 要扣除的数额 3 | # @executor Player 4 | # @return 扣除后剩余的数额 5 | 6 | data remove storage global_shop:common temp 7 | data modify storage global_shop:common temp.scoreboard set from storage global_shop:storage g_scoreboard 8 | return run function global_shop:adapters/money_scoreboard_adapter/reduce_money/macro_reduce_money with storage global_shop:common temp -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_sell_item/main_hand_has_no_item.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"player_shop_main.sell.empty_hand\"","color":"red"}] 2 | 3 | function global_shop:sound/fail 4 | 5 | scoreboard players set @s glbs_inputter_1 0 6 | scoreboard players enable @s glbs_inputter_1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/open_menu_success/init_state.mcfunction: -------------------------------------------------------------------------------- 1 | ride @p[tag=glbs_temp] dismount 2 | ride @p[tag=glbs_temp] mount @s 3 | 4 | execute store result score @s glbs_x run data get entity @s Pos[0] 5 | execute store result score @s glbs_y run data get entity @s Pos[1] 6 | execute store result score @s glbs_z run data get entity @s Pos[2] 7 | 8 | function global_shop:logic/menu/menu/open_menu_success/init_passengers 9 | 10 | tag @s remove glbs_temp -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/give_item.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/player/give_item 2 | # @param g_itemData 物品的信息 3 | # @executor player 4 | 5 | # 在设置物品的时候,用这个标签选中玩家 6 | tag @s add glbs_item_owner 7 | # 生成并设置物品的nbt信息 8 | summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:stone",Count:1b},Tags:["glbs_just"]} 9 | execute as @e[tag=glbs_just,limit=1,sort=nearest,distance=0..0.1] run function global_shop:logic/player/give_item/modify 10 | tag @s remove glbs_item_owner -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/give_money.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/player/give_money 2 | # @param g_itemData 物品的信息 3 | # @executor player 4 | 5 | # 在设置物品的时候,用这个标签选中玩家 6 | tag @s add glbs_item_owner 7 | # 生成并设置物品的nbt信息 8 | summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:stone",Count:1b},Tags:["glbs_just"]} 9 | execute as @e[tag=glbs_just,limit=1,sort=nearest,distance=0..0.1] run function global_shop:logic/player/give_money/modify 10 | tag @s remove glbs_item_owner -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/rotatable_menu_handler/handle/update_last_click_id.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 旋转模式玩家左键时,更新上一次左键的物品的 id 2 | # @executor Menu 3 | 4 | # @other 目前旋转模式左键再次点击来确认的功能并不依赖 glbs_last_target 记分板, 5 | # 目前仅在玩家设置、管理员设置(这两个都是旋转模式)的界面,需要用 glbs_last_target 记录玩家 6 | # 上一次看向的设置控件的 id,便于在玩家使用 trigger 输入的时候判断玩家是在进行哪个设置 7 | # 建议在判断物品存在之后,再记录。 8 | 9 | # 记录玩家左键的物品 id 10 | scoreboard players operation @s glbs_last_target = @s glbs_last_view_id -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_data/parse_lore/13_to_16.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score size glbs_common matches 13 run return run function global_shop:logic/item_data/parse_lore/13 2 | execute if score size glbs_common matches 14 run return run function global_shop:logic/item_data/parse_lore/14 3 | execute if score size glbs_common matches 15 run return run function global_shop:logic/item_data/parse_lore/15 4 | # matches 16.. 5 | function global_shop:logic/item_data/parse_lore/16_or_more -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_cache_list_page/1.mcfunction: -------------------------------------------------------------------------------- 1 | # 轴对称变换后的 beginIndex_ 即为 temp1 2 | scoreboard players operation temp2 glbs_common = temp1 glbs_common 3 | scoreboard players operation temp2 glbs_common -= i glbs_common 4 | function global_shop:storage/store_manager/get_cache_list_page/get_elem_and_append 5 | 6 | scoreboard players add i glbs_common 1 7 | execute if score i glbs_common matches ..26 run function global_shop:storage/store_manager/get_cache_list_page/1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/menu/handlers/edit_main_menu_handler/handle/player_back 2 | # @executor Menu 3 | 4 | # 切换到主菜单 5 | # 让主菜单向右转 3 行,对准入口 6 | scoreboard players set g_columnIncrement glbs_common 3 7 | function global_shop:logic/menu/handlers/menu_handler/change_mode/main 8 | # 音效 更换菜单 9 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/rotatable_menu_handler/get_viewed_item_order.mcfunction: -------------------------------------------------------------------------------- 1 | execute on passengers if entity @s[type=minecraft:player] store result score temp glbs_common run data get entity @s Rotation[1] 2 | 3 | execute if score temp glbs_common matches -18..-7 run return 12 4 | 5 | execute if score temp glbs_common matches -6..6 run return 13 6 | 7 | execute if score temp glbs_common matches 7..18 run return 14 8 | 9 | # 返回 -1 代表玩家没有看向物品实体 10 | return -1 -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/cache_player_shop_return_list.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/cache_player_shop_return_list 2 | # @brief 将玩家退还的物品列表 global_shop:storage g_returnListMap[uid] 缓存到 global_shop:storage g_tempList 3 | # @macro {uid: int} 4 | # @param g_tempList 出参 5 | # @executor - 6 | 7 | data remove storage global_shop:storage g_tempList 8 | 9 | $data modify storage global_shop:storage g_tempList set from storage global_shop:storage g_returnListMap.$(uid) -------------------------------------------------------------------------------- /data/global_shop/functions/logic/scheduler/1s.mcfunction: -------------------------------------------------------------------------------- 1 | # log 2 | #say 1s 3 | # 增加时间 4 | scoreboard players add g_time glbs_common 1 5 | 6 | # 减少玩家与秒相关的计时 7 | execute as @a[scores={glbs_uid=1..}] run function global_shop:logic/scheduler/1s/handle_timing_in_seconds 8 | 9 | # 清除动画缩小延迟消失的实体 10 | execute as @e[tag=glbs_killed] run function global_shop:logic/scheduler/1s/kill_delay_disappear_entity 11 | 12 | # 玩家与秒相关的操作 13 | execute as @a run function global_shop:logic/scheduler/1s/player -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_cash_exchange_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/menu/handlers/player_cash_exchange_handler/handle/player_back 2 | # @executor Menu 3 | 4 | # 切换到主菜单 5 | # 让主菜单向右转 1 行,对准入口 6 | scoreboard players set g_columnIncrement glbs_common 1 7 | function global_shop:logic/menu/handlers/menu_handler/change_mode/main 8 | # 音效 更换菜单 9 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:sound/change_menu -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/give_item/modify.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/player/give_item/modify 2 | 3 | # 还原物品 4 | function global_shop:logic/item_data/revert 5 | # 设置物品的nbt数据 6 | data modify entity @s Item set from storage global_shop:common g_itemData 7 | # 设置物品实体相关量,PickupDelay 设置为 0 可以立刻捡起 8 | data merge entity @s {NoGravity:1b,PickupDelay:0} 9 | # 设置物品的捡起者,即give_item的执行者 10 | data modify entity @s Owner set from entity @p[tag=glbs_item_owner] UUID 11 | 12 | tag @s remove glbs_just -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/cache_player_shop_my_sold_list.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/cache_player_shop_my_sold_list 2 | # @brief 将玩家的历史出售列表 global_shop:storage g_playerSoldListMap[uid] 缓存到 global_shop:storage g_tempList 3 | # @macro {uid: int} 4 | # @param g_tempList 出参 5 | # @executor - 6 | 7 | data remove storage global_shop:storage g_tempList 8 | 9 | $data modify storage global_shop:storage g_tempList set from storage global_shop:storage g_playerSoldListMap.$(uid) -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_sell_shop_list_page/1.mcfunction: -------------------------------------------------------------------------------- 1 | # 轴对称变换后的 beginIndex_ 即为 temp1 2 | scoreboard players operation temp2 glbs_common = temp1 glbs_common 3 | scoreboard players operation temp2 glbs_common -= i glbs_common 4 | function global_shop:storage/store_manager/get_sell_shop_list_elem_by_index_and_append 5 | 6 | scoreboard players add i glbs_common 1 7 | execute if score i glbs_common matches ..26 run function global_shop:storage/store_manager/get_sell_shop_list_page/1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/set_state_normal.mcfunction: -------------------------------------------------------------------------------- 1 | data modify entity @s transformation.translation[2] set value -4.0f 2 | data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{scale:[0.6f,0.6f,0.6f]},Glowing:0b} 3 | 4 | tag @s remove glbs_item_highlight 5 | 6 | # 去掉变色 7 | team leave @s 8 | 9 | # 文本展示实体变大 10 | execute on passengers if entity @s[tag=glbs_to_set_state_normal] run function global_shop:logic/text_display/set_state_normal -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/0_enable.mcfunction: -------------------------------------------------------------------------------- 1 | #启用 2 | data remove storage global_shop:storage g_cashInfo[0].disable 3 | execute on vehicle on passengers if entity @s[scores={glbs_order=7},type=minecraft:item_display,tag=!glbs_killed] run data modify entity @s item set from storage global_shop:storage g_cashInfo[0].item 4 | function global_shop:logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/enable_tellraw -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/1_enable.mcfunction: -------------------------------------------------------------------------------- 1 | #启用 2 | data remove storage global_shop:storage g_cashInfo[1].disable 3 | execute on vehicle on passengers if entity @s[scores={glbs_order=10},type=minecraft:item_display,tag=!glbs_killed] run data modify entity @s item set from storage global_shop:storage g_cashInfo[1].item 4 | function global_shop:logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/enable_tellraw -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/2_enable.mcfunction: -------------------------------------------------------------------------------- 1 | #启用 2 | data remove storage global_shop:storage g_cashInfo[2].disable 3 | execute on vehicle on passengers if entity @s[scores={glbs_order=13},type=minecraft:item_display,tag=!glbs_killed] run data modify entity @s item set from storage global_shop:storage g_cashInfo[2].item 4 | function global_shop:logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/enable_tellraw -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/3_enable.mcfunction: -------------------------------------------------------------------------------- 1 | #启用 2 | data remove storage global_shop:storage g_cashInfo[3].disable 3 | execute on vehicle on passengers if entity @s[scores={glbs_order=16},type=minecraft:item_display,tag=!glbs_killed] run data modify entity @s item set from storage global_shop:storage g_cashInfo[3].item 4 | function global_shop:logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/enable_tellraw -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/4_enable.mcfunction: -------------------------------------------------------------------------------- 1 | #启用 2 | data remove storage global_shop:storage g_cashInfo[4].disable 3 | execute on vehicle on passengers if entity @s[scores={glbs_order=19},type=minecraft:item_display,tag=!glbs_killed] run data modify entity @s item set from storage global_shop:storage g_cashInfo[4].item 4 | function global_shop:logic/menu/handlers/edit_cash_exchange_handler/handle/trigger_input/disable_cash/enable_tellraw -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/recycle_shop_handler/handle/recycle/while_list_has_two_elems.mcfunction: -------------------------------------------------------------------------------- 1 | execute store result score slot glbs_common run data get storage global_shop:common g_checkSlotResult[0] 2 | data remove storage global_shop:common g_checkSlotResult[0] 3 | 4 | function global_shop:logic/player/clear_slot 5 | 6 | execute if data storage global_shop:common g_checkSlotResult[1] run function global_shop:logic/menu/handlers/recycle_shop_handler/handle/recycle/while_list_has_two_elems -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/get_money.mcfunction: -------------------------------------------------------------------------------- 1 | # 获取玩家金钱 2 | # @executor Player 3 | # @return 该玩家的金钱 4 | 5 | # 调用者需要保证其目前不依赖 temp glbs_common 记分板 6 | 7 | # 函数 global_shop:adapters/money_scoreboard_adapter/get_money 会将获取的金钱写入 temp glbs_common(不使用返回值,而直接使用出参,就可以初始化为 0,来避免 g_scoreboard 出现被管理员改为空等问题时,命令执行失败导致 temp 是脏数据) 8 | scoreboard players set temp glbs_common 0 9 | function global_shop:adapters/money_scoreboard_adapter/get_money 10 | return run scoreboard players get temp glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/cache_player_shop_my_bought_list.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/cache_player_shop_my_bought_list 2 | # @brief 将玩家的历史购买列表 global_shop:storage g_playerBoughtListMap[uid] 缓存到 global_shop:storage g_tempList 3 | # @macro {uid: int} 4 | # @param g_tempList 出参 5 | # @executor - 6 | 7 | data remove storage global_shop:storage g_tempList 8 | 9 | $data modify storage global_shop:storage g_tempList set from storage global_shop:storage g_playerBoughtListMap.$(uid) -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_recycle_shop_list_page/1.mcfunction: -------------------------------------------------------------------------------- 1 | # 轴对称变换后的 beginIndex_ 即为 temp1 2 | scoreboard players operation temp2 glbs_common = temp1 glbs_common 3 | scoreboard players operation temp2 glbs_common -= i glbs_common 4 | function global_shop:storage/store_manager/get_recycle_shop_list_elem_by_index_and_append 5 | 6 | scoreboard players add i glbs_common 1 7 | execute if score i glbs_common matches ..26 run function global_shop:storage/store_manager/get_recycle_shop_list_page/1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/player_left_click/unistall.mcfunction: -------------------------------------------------------------------------------- 1 | # 清除左键信息 2 | execute on passengers if entity @s[type=minecraft:interaction] run function global_shop:logic/interactor/clear_left_click_action 3 | 4 | # 引导管理员卸载全球商店 5 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/edit_main_menu_handler/handle/player_left_click/unistall/tip 6 | 7 | # 清除上一次左键的物品的序号 order 8 | scoreboard players set @s glbs_last_target -1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/menu_handler/get_viewed_item_order/1.mcfunction: -------------------------------------------------------------------------------- 1 | execute store result score temp1 glbs_common run function global_shop:logic/menu/handlers/menu_handler/get_viewed_item_order/2 2 | 3 | execute if score temp2 glbs_common matches -18..-7 run return run scoreboard players remove temp1 glbs_common 1 4 | 5 | execute if score temp2 glbs_common matches 7..18 run return run scoreboard players add temp1 glbs_common 1 6 | 7 | return run scoreboard players get temp1 glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/menu/open_menu_success/trigger_easter_egg.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | # temp 为 0 表示彩蛋触发失败,为 1 表示成功 4 | scoreboard players set temp glbs_common 0 5 | 6 | execute as @e[type=minecraft:chest_minecart,distance=..5,sort=random,limit=1] store result score temp glbs_common run function global_shop:logic/menu/menu/open_menu_success/easter_egg 7 | 8 | execute if score temp glbs_common matches 0 run return 0 9 | 10 | advancement grant @s only global_shop:trigger_easter_egg -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/get_player_shop_list_page/1.mcfunction: -------------------------------------------------------------------------------- 1 | # 轴对称变换后的 beginIndex_ 即为 temp1 2 | scoreboard players operation temp2 glbs_common = temp1 glbs_common 3 | scoreboard players operation temp2 glbs_common -= i glbs_common 4 | function global_shop:storage/store_manager/get_player_shop_list_elem_by_index_and_append 5 | 6 | scoreboard players add i glbs_common 1 7 | execute if score i glbs_common matches ..26 run function global_shop:storage/store_manager/get_player_shop_list_page/1 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/range_update_and_delete/select_item_to_update.mcfunction: -------------------------------------------------------------------------------- 1 | # @param selectScore,根据分数调用 global_shop:ui/display_manager/range_update_and_delete/2/$(selectScore,根据分数调用),范围 [0, 26] 2 | # @executor ItemDisplayEntity 3 | 4 | execute if score selectScore glbs_common matches 0..13 run return run function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/0_to_13 5 | function global_shop:ui/display_manager/range_update_and_delete/select_item_to_update/14_to_26 -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/cache_player_shop_my_selling_list.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:storage/store_manager/cache_player_shop_my_selling_list 2 | # @brief 将玩家正在出售的物品列表 global_shop:storage g_playerSellingListMap[uid] 缓存到 global_shop:storage g_tempList 3 | # @macro {uid: int} 4 | # @param g_tempList 出参 5 | # @executor - 6 | 7 | data remove storage global_shop:storage g_tempList 8 | 9 | $data modify storage global_shop:storage g_tempList set from storage global_shop:storage g_playerSellingListMap.$(uid) -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/check_position_change.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 检查商店坐标有没有变化 2 | # @executor Menu 3 | # @return 0 - 改变;1 - 未改变 4 | 5 | execute store result score x glbs_common run data get entity @s Pos[0] 6 | execute store result score y glbs_common run data get entity @s Pos[1] 7 | execute store result score z glbs_common run data get entity @s Pos[2] 8 | 9 | execute if score x glbs_common = @s glbs_x if score y glbs_common = @s glbs_y if score z glbs_common = @s glbs_z run return 1 10 | 11 | return 0 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/admin_add_sell_item/hold_cash.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"menu_handler.cash_use_in_illigal_place\"","color":"red"}] 4 | 5 | function global_shop:sound/fail 6 | 7 | scoreboard players set @s glbs_inputter_1 0 8 | 9 | # 重新 enable 10 | scoreboard players enable @s glbs_inputter_1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/main_menu_handler/handle/player_back.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Menu 2 | 3 | # 提示主菜单不可返回(shift 脱离 Menu 才能退出) 4 | execute on passengers if entity @s[type=minecraft:player] run function global_shop:logic/menu/handlers/main_menu_handler/handle/player_back/tip 5 | 6 | execute on passengers if entity @s[type=minecraft:interaction] run function global_shop:logic/interactor/clear_left_click_action 7 | 8 | scoreboard players operation @s glbs_last_action = Action::RIGHT_CLICK glbs_common -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/polymorphic_mode.mcfunction: -------------------------------------------------------------------------------- 1 | #> global_shop:logic/menu/polymorphic_mode 2 | # @brief 根据不同模式调不同 handler 处理逻辑 3 | # @executor Menu 4 | 5 | execute if score @s glbs_mode matches 0..6 run return run function global_shop:logic/menu/polymorphic_mode/0_to_6 6 | 7 | execute if score @s glbs_mode matches 7..12 run return run function global_shop:logic/menu/polymorphic_mode/7_to_12 8 | 9 | execute if score @s glbs_mode matches 13..15 run function global_shop:logic/menu/polymorphic_mode/13_to_15 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/player/ban_deban_player/deban.mcfunction: -------------------------------------------------------------------------------- 1 | # @param global_shop:common admin_input 要禁止/允许使用商店的玩家 2 | # @macro {name: string} 3 | # @executor Admin 4 | 5 | $scoreboard players reset $(name) glbs_ban 6 | 7 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:common","nbt":"admin_input","color":"yellow"}," ",{"text":"✖","color":"red"}," \u00a7f-> ",{"text":"✔","color":"green"}] 8 | 9 | function global_shop:sound/success -------------------------------------------------------------------------------- /data/global_shop/functions/storage/store_manager/append_to_player_sold_list.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 将物品写入该玩家的历史出售列表 2 | # @macro {playerUid: int} 3 | # @$param playerUid 玩家 uid 4 | # @param g_itemData 要插入的物品 5 | # @executor Player 6 | 7 | $data modify storage global_shop:storage g_playerSoldListMap.$(playerUid) append from storage global_shop:common g_itemData 8 | 9 | $execute if data storage global_shop:storage g_playerSoldListMap.$(playerUid)[27] run data remove storage global_shop:storage g_playerSoldListMap.$(playerUid)[0] -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/admin_add_recycle_item/hold_cash.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"menu_handler.cash_use_in_illigal_place\"","color":"red"}] 4 | 5 | function global_shop:sound/fail 6 | 7 | scoreboard players set @s glbs_inputter_1 0 8 | 9 | # 重新 enable 10 | scoreboard players enable @s glbs_inputter_1 -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/admin_add_sell_item/negative_num.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"sell_shop.set_fail.negative\"","color":"red"},{"score":{"objective":"glbs_inputter_1","name":"@s"},"color":"yellow"}] 2 | 3 | scoreboard players set @s glbs_inputter_1 0 4 | scoreboard players enable @s glbs_inputter_1 5 | 6 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_sell_item/hold_cash.mcfunction: -------------------------------------------------------------------------------- 1 | # @executor Player 2 | 3 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"menu_handler.cash_use_in_illigal_place\"","color":"red"}] 4 | 5 | function global_shop:sound/fail 6 | 7 | scoreboard players set @s glbs_inputter_1 0 8 | 9 | # 重新 enable 10 | scoreboard players enable @s glbs_inputter_1 -------------------------------------------------------------------------------- /data/global_shop/functions/ui/display_manager/summon_single_item/summon/adjust_pos_line_2.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 第二排,即中间一排的位置校准 2 | 3 | data modify entity @s transformation.translation[1] set value 1.0f 4 | 5 | execute on passengers run data modify entity @s transformation.translation[0] set value 0.2f 6 | execute on passengers run data modify entity @s transformation.translation[1] set value 0.8f 7 | 8 | #data modify entity @s transformation.translation set value [0.0f,1.0f,-4.0f] 9 | #data modify entity @s Rotation[1] set value 0.0f -------------------------------------------------------------------------------- /data/global_shop/functions/logic/item_display_entity/kill.mcfunction: -------------------------------------------------------------------------------- 1 | # @brief 清除物品展示实体和数据 2 | # @executor ItemDisplayEntity 3 | 4 | tag @s add glbs_killed 5 | tag @s add glbs_kill_delay 6 | 7 | tag @s remove glbs_item_highlight 8 | tag @s remove glbs_to_set_state_normal 9 | 10 | #文本展示实体改为与物品展示实体一起缩小 11 | #execute on passengers run function global_shop:logic/text_display/kill 12 | 13 | scoreboard players reset @s glbs_order 14 | 15 | team leave @s 16 | 17 | function global_shop:logic/item_display_entity/disappear -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/edit_main_menu_handler/handle/admin_add_recycle_item/negative_num.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"recycle_shop.set_fail.negative\"","color":"red"},{"score":{"objective":"glbs_inputter_1","name":"@s"},"color":"yellow"}] 2 | 3 | scoreboard players set @s glbs_inputter_1 0 4 | scoreboard players enable @s glbs_inputter_1 5 | 6 | function global_shop:sound/fail -------------------------------------------------------------------------------- /data/global_shop/functions/logic/menu/handlers/player_shop_main_menu_handler/handle/player_sell_item/negative_num.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @s [{"type":"nbt","storage":"global_shop:storage","nbt":"TELLRAW_PREFIX","interpret":true},{"type":"nbt","storage":"global_shop:storage","nbt":"g_lang.\"player_shop_main.sell.negative\"","color":"red"},{"score":{"objective":"glbs_inputter_1","name":"@s"},"color":"yellow"}] 2 | 3 | function global_shop:sound/fail 4 | 5 | scoreboard players set @s glbs_inputter_1 0 6 | scoreboard players enable @s glbs_inputter_1 --------------------------------------------------------------------------------