diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index f72383ca..00000000
--- a/.editorconfig
+++ /dev/null
@@ -1,1013 +0,0 @@
-[*]
-charset = utf-8
-end_of_line = lf
-indent_size = 4
-indent_style = space
-insert_final_newline = true
-max_line_length = 130
-tab_width = 4
-ij_continuation_indent_size = 8
-ij_formatter_off_tag = @formatter:off
-ij_formatter_on_tag = @formatter:on
-ij_formatter_tags_enabled = false
-ij_smart_tabs = false
-ij_wrap_on_typing = true
-
-[*.conf]
-indent_size = 2
-tab_width = 2
-ij_continuation_indent_size = 2
-ij_hocon_keep_blank_lines_before_right_brace = 2
-ij_hocon_keep_indents_on_empty_lines = false
-ij_hocon_keep_line_breaks = true
-ij_hocon_space_after_colon = true
-ij_hocon_space_after_comma = true
-ij_hocon_space_before_colon = true
-ij_hocon_space_before_comma = false
-ij_hocon_spaces_within_braces = false
-ij_hocon_spaces_within_brackets = false
-ij_hocon_spaces_within_method_call_parentheses = false
-
-[*.css]
-ij_css_align_closing_brace_with_properties = false
-ij_css_blank_lines_around_nested_selector = 1
-ij_css_blank_lines_between_blocks = 1
-ij_css_brace_placement = end_of_line
-ij_css_enforce_quotes_on_format = false
-ij_css_hex_color_long_format = false
-ij_css_hex_color_lower_case = false
-ij_css_hex_color_short_format = false
-ij_css_hex_color_upper_case = false
-ij_css_keep_blank_lines_in_code = 2
-ij_css_keep_indents_on_empty_lines = false
-ij_css_keep_single_line_blocks = false
-ij_css_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
-ij_css_space_after_colon = true
-ij_css_space_before_opening_brace = true
-ij_css_use_double_quotes = true
-ij_css_value_alignment = do_not_align
-
-[*.java]
-ij_java_align_consecutive_assignments = false
-ij_java_align_consecutive_variable_declarations = false
-ij_java_align_group_field_declarations = false
-ij_java_align_multiline_annotation_parameters = false
-ij_java_align_multiline_array_initializer_expression = false
-ij_java_align_multiline_assignment = false
-ij_java_align_multiline_binary_operation = false
-ij_java_align_multiline_chained_methods = false
-ij_java_align_multiline_extends_list = false
-ij_java_align_multiline_for = true
-ij_java_align_multiline_method_parentheses = false
-ij_java_align_multiline_parameters = true
-ij_java_align_multiline_parameters_in_calls = false
-ij_java_align_multiline_parenthesized_expression = false
-ij_java_align_multiline_records = true
-ij_java_align_multiline_resources = true
-ij_java_align_multiline_ternary_operation = false
-ij_java_align_multiline_text_blocks = false
-ij_java_align_multiline_throws_list = false
-ij_java_align_subsequent_simple_methods = false
-ij_java_align_throws_keyword = false
-ij_java_annotation_parameter_wrap = off
-ij_java_array_initializer_new_line_after_left_brace = false
-ij_java_array_initializer_right_brace_on_new_line = false
-ij_java_array_initializer_wrap = off
-ij_java_assert_statement_colon_on_next_line = false
-ij_java_assert_statement_wrap = off
-ij_java_assignment_wrap = off
-ij_java_binary_operation_sign_on_next_line = false
-ij_java_binary_operation_wrap = off
-ij_java_blank_lines_after_anonymous_class_header = 0
-ij_java_blank_lines_after_class_header = 1
-ij_java_blank_lines_after_imports = 1
-ij_java_blank_lines_after_package = 1
-ij_java_blank_lines_around_class = 1
-ij_java_blank_lines_around_field = 0
-ij_java_blank_lines_around_field_in_interface = 0
-ij_java_blank_lines_around_initializer = 1
-ij_java_blank_lines_around_method = 1
-ij_java_blank_lines_around_method_in_interface = 1
-ij_java_blank_lines_before_class_end = 1
-ij_java_blank_lines_before_imports = 1
-ij_java_blank_lines_before_method_body = 0
-ij_java_blank_lines_before_package = 0
-ij_java_block_brace_style = end_of_line
-ij_java_block_comment_at_first_column = true
-ij_java_call_parameters_new_line_after_left_paren = true
-ij_java_call_parameters_right_paren_on_new_line = true
-ij_java_call_parameters_wrap = on_every_item
-ij_java_case_statement_on_separate_line = true
-ij_java_catch_on_new_line = false
-ij_java_class_annotation_wrap = split_into_lines
-ij_java_class_brace_style = end_of_line
-ij_java_class_count_to_use_import_on_demand = 100000
-ij_java_class_names_in_javadoc = 1
-ij_java_do_not_indent_top_level_class_members = false
-ij_java_do_not_wrap_after_single_annotation = false
-ij_java_do_while_brace_force = always
-ij_java_doc_add_blank_line_after_description = true
-ij_java_doc_add_blank_line_after_param_comments = false
-ij_java_doc_add_blank_line_after_return = false
-ij_java_doc_add_p_tag_on_empty_lines = true
-ij_java_doc_align_exception_comments = true
-ij_java_doc_align_param_comments = true
-ij_java_doc_do_not_wrap_if_one_line = false
-ij_java_doc_enable_formatting = true
-ij_java_doc_enable_leading_asterisks = true
-ij_java_doc_indent_on_continuation = true
-ij_java_doc_keep_empty_lines = true
-ij_java_doc_keep_empty_parameter_tag = true
-ij_java_doc_keep_empty_return_tag = true
-ij_java_doc_keep_empty_throws_tag = true
-ij_java_doc_keep_invalid_tags = false
-ij_java_doc_param_description_on_new_line = false
-ij_java_doc_preserve_line_breaks = false
-ij_java_doc_use_throws_not_exception_tag = true
-ij_java_else_on_new_line = false
-ij_java_enum_constants_wrap = split_into_lines
-ij_java_extends_keyword_wrap = off
-ij_java_extends_list_wrap = normal
-ij_java_field_annotation_wrap = split_into_lines
-ij_java_finally_on_new_line = false
-ij_java_for_brace_force = always
-ij_java_for_statement_new_line_after_left_paren = false
-ij_java_for_statement_right_paren_on_new_line = false
-ij_java_for_statement_wrap = off
-ij_java_generate_final_locals = true
-ij_java_generate_final_parameters = true
-ij_java_if_brace_force = always
-ij_java_imports_layout = *, |, javax.**, java.**, |, $*
-ij_java_indent_case_from_switch = true
-ij_java_insert_inner_class_imports = false
-ij_java_insert_override_annotation = true
-ij_java_keep_blank_lines_before_right_brace = 2
-ij_java_keep_blank_lines_between_package_declaration_and_header = 2
-ij_java_keep_blank_lines_in_code = 2
-ij_java_keep_blank_lines_in_declarations = 2
-ij_java_keep_control_statement_in_one_line = true
-ij_java_keep_first_column_comment = true
-ij_java_keep_indents_on_empty_lines = false
-ij_java_keep_line_breaks = true
-ij_java_keep_multiple_expressions_in_one_line = false
-ij_java_keep_simple_blocks_in_one_line = false
-ij_java_keep_simple_classes_in_one_line = false
-ij_java_keep_simple_lambdas_in_one_line = false
-ij_java_keep_simple_methods_in_one_line = false
-ij_java_label_indent_absolute = false
-ij_java_label_indent_size = 0
-ij_java_lambda_brace_style = end_of_line
-ij_java_layout_static_imports_separately = true
-ij_java_line_comment_add_space = false
-ij_java_line_comment_at_first_column = true
-ij_java_method_annotation_wrap = split_into_lines
-ij_java_method_brace_style = end_of_line
-ij_java_method_call_chain_wrap = on_every_item
-ij_java_method_parameters_new_line_after_left_paren = true
-ij_java_method_parameters_right_paren_on_new_line = true
-ij_java_method_parameters_wrap = on_every_item
-ij_java_modifier_list_wrap = false
-ij_java_names_count_to_use_import_on_demand = 100000
-ij_java_new_line_after_lparen_in_record_header = false
-ij_java_parameter_annotation_wrap = off
-ij_java_parentheses_expression_new_line_after_left_paren = false
-ij_java_parentheses_expression_right_paren_on_new_line = false
-ij_java_place_assignment_sign_on_next_line = false
-ij_java_prefer_longer_names = false
-ij_java_prefer_parameters_wrap = true
-ij_java_record_components_wrap = normal
-ij_java_repeat_synchronized = true
-ij_java_replace_instanceof_and_cast = false
-ij_java_replace_null_check = true
-ij_java_replace_sum_lambda_with_method_ref = true
-ij_java_resource_list_new_line_after_left_paren = false
-ij_java_resource_list_right_paren_on_new_line = false
-ij_java_resource_list_wrap = off
-ij_java_rparen_on_new_line_in_record_header = false
-ij_java_space_after_closing_angle_bracket_in_type_argument = false
-ij_java_space_after_colon = true
-ij_java_space_after_comma = true
-ij_java_space_after_comma_in_type_arguments = true
-ij_java_space_after_for_semicolon = true
-ij_java_space_after_quest = true
-ij_java_space_after_type_cast = true
-ij_java_space_before_annotation_array_initializer_left_brace = false
-ij_java_space_before_annotation_parameter_list = false
-ij_java_space_before_array_initializer_left_brace = false
-ij_java_space_before_catch_keyword = true
-ij_java_space_before_catch_left_brace = true
-ij_java_space_before_catch_parentheses = true
-ij_java_space_before_class_left_brace = true
-ij_java_space_before_colon = true
-ij_java_space_before_colon_in_foreach = true
-ij_java_space_before_comma = false
-ij_java_space_before_do_left_brace = true
-ij_java_space_before_else_keyword = true
-ij_java_space_before_else_left_brace = true
-ij_java_space_before_finally_keyword = true
-ij_java_space_before_finally_left_brace = true
-ij_java_space_before_for_left_brace = true
-ij_java_space_before_for_parentheses = true
-ij_java_space_before_for_semicolon = false
-ij_java_space_before_if_left_brace = true
-ij_java_space_before_if_parentheses = true
-ij_java_space_before_method_call_parentheses = false
-ij_java_space_before_method_left_brace = true
-ij_java_space_before_method_parentheses = false
-ij_java_space_before_opening_angle_bracket_in_type_parameter = false
-ij_java_space_before_quest = true
-ij_java_space_before_switch_left_brace = true
-ij_java_space_before_switch_parentheses = true
-ij_java_space_before_synchronized_left_brace = true
-ij_java_space_before_synchronized_parentheses = true
-ij_java_space_before_try_left_brace = true
-ij_java_space_before_try_parentheses = true
-ij_java_space_before_type_parameter_list = false
-ij_java_space_before_while_keyword = true
-ij_java_space_before_while_left_brace = true
-ij_java_space_before_while_parentheses = true
-ij_java_space_inside_one_line_enum_braces = false
-ij_java_space_within_empty_array_initializer_braces = false
-ij_java_space_within_empty_method_call_parentheses = false
-ij_java_space_within_empty_method_parentheses = false
-ij_java_spaces_around_additive_operators = true
-ij_java_spaces_around_assignment_operators = true
-ij_java_spaces_around_bitwise_operators = true
-ij_java_spaces_around_equality_operators = true
-ij_java_spaces_around_lambda_arrow = true
-ij_java_spaces_around_logical_operators = true
-ij_java_spaces_around_method_ref_dbl_colon = false
-ij_java_spaces_around_multiplicative_operators = true
-ij_java_spaces_around_relational_operators = true
-ij_java_spaces_around_shift_operators = true
-ij_java_spaces_around_type_bounds_in_type_parameters = true
-ij_java_spaces_around_unary_operator = false
-ij_java_spaces_within_angle_brackets = false
-ij_java_spaces_within_annotation_parentheses = false
-ij_java_spaces_within_array_initializer_braces = false
-ij_java_spaces_within_braces = false
-ij_java_spaces_within_brackets = false
-ij_java_spaces_within_cast_parentheses = false
-ij_java_spaces_within_catch_parentheses = false
-ij_java_spaces_within_for_parentheses = false
-ij_java_spaces_within_if_parentheses = false
-ij_java_spaces_within_method_call_parentheses = false
-ij_java_spaces_within_method_parentheses = false
-ij_java_spaces_within_parentheses = false
-ij_java_spaces_within_switch_parentheses = false
-ij_java_spaces_within_synchronized_parentheses = false
-ij_java_spaces_within_try_parentheses = false
-ij_java_spaces_within_while_parentheses = false
-ij_java_special_else_if_treatment = true
-ij_java_subclass_name_suffix = Impl
-ij_java_ternary_operation_signs_on_next_line = true
-ij_java_ternary_operation_wrap = on_every_item
-ij_java_test_name_suffix = Test
-ij_java_throws_keyword_wrap = off
-ij_java_throws_list_wrap = normal
-ij_java_use_external_annotations = false
-ij_java_use_fq_class_names = false
-ij_java_use_relative_indents = false
-ij_java_use_single_class_imports = true
-ij_java_variable_annotation_wrap = off
-ij_java_visibility = public
-ij_java_while_brace_force = always
-ij_java_while_on_new_line = false
-ij_java_wrap_comments = false
-ij_java_wrap_first_method_in_call_chain = true
-ij_java_wrap_long_lines = false
-
-[*.nbtt]
-max_line_length = 150
-ij_continuation_indent_size = 4
-ij_nbtt_keep_indents_on_empty_lines = false
-ij_nbtt_space_after_colon = true
-ij_nbtt_space_after_comma = true
-ij_nbtt_space_before_colon = true
-ij_nbtt_space_before_comma = false
-ij_nbtt_spaces_within_brackets = false
-ij_nbtt_spaces_within_parentheses = false
-
-[*.properties]
-ij_properties_align_group_field_declarations = false
-ij_properties_keep_blank_lines = false
-ij_properties_key_value_delimiter = equals
-ij_properties_spaces_around_key_value_delimiter = false
-
-[*.sass]
-indent_size = 2
-ij_sass_align_closing_brace_with_properties = false
-ij_sass_blank_lines_around_nested_selector = 1
-ij_sass_blank_lines_between_blocks = 1
-ij_sass_brace_placement = 0
-ij_sass_enforce_quotes_on_format = false
-ij_sass_hex_color_long_format = false
-ij_sass_hex_color_lower_case = false
-ij_sass_hex_color_short_format = false
-ij_sass_hex_color_upper_case = false
-ij_sass_keep_blank_lines_in_code = 2
-ij_sass_keep_indents_on_empty_lines = false
-ij_sass_keep_single_line_blocks = false
-ij_sass_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
-ij_sass_space_after_colon = true
-ij_sass_space_before_opening_brace = true
-ij_sass_use_double_quotes = true
-ij_sass_value_alignment = 0
-
-[*.scss]
-indent_size = 2
-ij_scss_align_closing_brace_with_properties = false
-ij_scss_blank_lines_around_nested_selector = 1
-ij_scss_blank_lines_between_blocks = 1
-ij_scss_brace_placement = 0
-ij_scss_enforce_quotes_on_format = false
-ij_scss_hex_color_long_format = false
-ij_scss_hex_color_lower_case = false
-ij_scss_hex_color_short_format = false
-ij_scss_hex_color_upper_case = false
-ij_scss_keep_blank_lines_in_code = 2
-ij_scss_keep_indents_on_empty_lines = false
-ij_scss_keep_single_line_blocks = false
-ij_scss_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
-ij_scss_space_after_colon = true
-ij_scss_space_before_opening_brace = true
-ij_scss_use_double_quotes = true
-ij_scss_value_alignment = 0
-
-[.editorconfig]
-ij_editorconfig_align_group_field_declarations = false
-ij_editorconfig_space_after_colon = false
-ij_editorconfig_space_after_comma = true
-ij_editorconfig_space_before_colon = false
-ij_editorconfig_space_before_comma = false
-ij_editorconfig_spaces_around_assignment_operators = true
-
-[{*.ant, *.fxml, *.jhm, *.jnlp, *.jrxml, *.pom, *.rng, *.tld, *.wsdl, *.xml, *.xsd, *.xsl, *.xslt, *.xul}]
-ij_xml_align_attributes = true
-ij_xml_align_text = false
-ij_xml_attribute_wrap = normal
-ij_xml_block_comment_at_first_column = true
-ij_xml_keep_blank_lines = 2
-ij_xml_keep_indents_on_empty_lines = false
-ij_xml_keep_line_breaks = true
-ij_xml_keep_line_breaks_in_text = true
-ij_xml_keep_whitespaces = false
-ij_xml_keep_whitespaces_around_cdata = preserve
-ij_xml_keep_whitespaces_inside_cdata = false
-ij_xml_line_comment_at_first_column = true
-ij_xml_space_after_tag_name = false
-ij_xml_space_around_equals_in_attribute = false
-ij_xml_space_inside_empty_tag = false
-ij_xml_text_wrap = normal
-
-[{*.ats, *.ts}]
-ij_continuation_indent_size = 4
-ij_typescript_align_imports = false
-ij_typescript_align_multiline_array_initializer_expression = false
-ij_typescript_align_multiline_binary_operation = false
-ij_typescript_align_multiline_chained_methods = false
-ij_typescript_align_multiline_extends_list = false
-ij_typescript_align_multiline_for = true
-ij_typescript_align_multiline_parameters = true
-ij_typescript_align_multiline_parameters_in_calls = false
-ij_typescript_align_multiline_ternary_operation = false
-ij_typescript_align_object_properties = 0
-ij_typescript_align_union_types = false
-ij_typescript_align_var_statements = 0
-ij_typescript_array_initializer_new_line_after_left_brace = false
-ij_typescript_array_initializer_right_brace_on_new_line = false
-ij_typescript_array_initializer_wrap = off
-ij_typescript_assignment_wrap = off
-ij_typescript_binary_operation_sign_on_next_line = false
-ij_typescript_binary_operation_wrap = off
-ij_typescript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/**
-ij_typescript_blank_lines_after_imports = 1
-ij_typescript_blank_lines_around_class = 1
-ij_typescript_blank_lines_around_field = 0
-ij_typescript_blank_lines_around_field_in_interface = 0
-ij_typescript_blank_lines_around_function = 1
-ij_typescript_blank_lines_around_method = 1
-ij_typescript_blank_lines_around_method_in_interface = 1
-ij_typescript_block_brace_style = end_of_line
-ij_typescript_call_parameters_new_line_after_left_paren = false
-ij_typescript_call_parameters_right_paren_on_new_line = false
-ij_typescript_call_parameters_wrap = off
-ij_typescript_catch_on_new_line = false
-ij_typescript_chained_call_dot_on_new_line = true
-ij_typescript_class_brace_style = end_of_line
-ij_typescript_comma_on_new_line = false
-ij_typescript_do_while_brace_force = never
-ij_typescript_else_on_new_line = false
-ij_typescript_enforce_trailing_comma = keep
-ij_typescript_extends_keyword_wrap = off
-ij_typescript_extends_list_wrap = off
-ij_typescript_field_prefix = _
-ij_typescript_file_name_style = relaxed
-ij_typescript_finally_on_new_line = false
-ij_typescript_for_brace_force = never
-ij_typescript_for_statement_new_line_after_left_paren = false
-ij_typescript_for_statement_right_paren_on_new_line = false
-ij_typescript_for_statement_wrap = off
-ij_typescript_force_quote_style = false
-ij_typescript_force_semicolon_style = false
-ij_typescript_function_expression_brace_style = end_of_line
-ij_typescript_if_brace_force = never
-ij_typescript_import_merge_members = global
-ij_typescript_import_prefer_absolute_path = global
-ij_typescript_import_sort_members = true
-ij_typescript_import_sort_module_name = false
-ij_typescript_import_use_node_resolution = true
-ij_typescript_imports_wrap = on_every_item
-ij_typescript_indent_case_from_switch = true
-ij_typescript_indent_chained_calls = true
-ij_typescript_indent_package_children = 0
-ij_typescript_jsdoc_include_types = false
-ij_typescript_jsx_attribute_value = braces
-ij_typescript_keep_blank_lines_in_code = 2
-ij_typescript_keep_first_column_comment = true
-ij_typescript_keep_indents_on_empty_lines = false
-ij_typescript_keep_line_breaks = true
-ij_typescript_keep_simple_blocks_in_one_line = false
-ij_typescript_keep_simple_methods_in_one_line = false
-ij_typescript_line_comment_add_space = true
-ij_typescript_line_comment_at_first_column = false
-ij_typescript_method_brace_style = end_of_line
-ij_typescript_method_call_chain_wrap = off
-ij_typescript_method_parameters_new_line_after_left_paren = false
-ij_typescript_method_parameters_right_paren_on_new_line = false
-ij_typescript_method_parameters_wrap = off
-ij_typescript_object_literal_wrap = on_every_item
-ij_typescript_parentheses_expression_new_line_after_left_paren = false
-ij_typescript_parentheses_expression_right_paren_on_new_line = false
-ij_typescript_place_assignment_sign_on_next_line = false
-ij_typescript_prefer_as_type_cast = false
-ij_typescript_prefer_explicit_types_function_expression_returns = false
-ij_typescript_prefer_explicit_types_function_returns = false
-ij_typescript_prefer_explicit_types_vars_fields = false
-ij_typescript_prefer_parameters_wrap = false
-ij_typescript_reformat_c_style_comments = false
-ij_typescript_space_after_colon = true
-ij_typescript_space_after_comma = true
-ij_typescript_space_after_dots_in_rest_parameter = false
-ij_typescript_space_after_generator_mult = true
-ij_typescript_space_after_property_colon = true
-ij_typescript_space_after_quest = true
-ij_typescript_space_after_type_colon = true
-ij_typescript_space_after_unary_not = false
-ij_typescript_space_before_async_arrow_lparen = true
-ij_typescript_space_before_catch_keyword = true
-ij_typescript_space_before_catch_left_brace = true
-ij_typescript_space_before_catch_parentheses = true
-ij_typescript_space_before_class_lbrace = true
-ij_typescript_space_before_class_left_brace = true
-ij_typescript_space_before_colon = true
-ij_typescript_space_before_comma = false
-ij_typescript_space_before_do_left_brace = true
-ij_typescript_space_before_else_keyword = true
-ij_typescript_space_before_else_left_brace = true
-ij_typescript_space_before_finally_keyword = true
-ij_typescript_space_before_finally_left_brace = true
-ij_typescript_space_before_for_left_brace = true
-ij_typescript_space_before_for_parentheses = true
-ij_typescript_space_before_for_semicolon = false
-ij_typescript_space_before_function_left_parenth = true
-ij_typescript_space_before_generator_mult = false
-ij_typescript_space_before_if_left_brace = true
-ij_typescript_space_before_if_parentheses = true
-ij_typescript_space_before_method_call_parentheses = false
-ij_typescript_space_before_method_left_brace = true
-ij_typescript_space_before_method_parentheses = false
-ij_typescript_space_before_property_colon = false
-ij_typescript_space_before_quest = true
-ij_typescript_space_before_switch_left_brace = true
-ij_typescript_space_before_switch_parentheses = true
-ij_typescript_space_before_try_left_brace = true
-ij_typescript_space_before_type_colon = false
-ij_typescript_space_before_unary_not = false
-ij_typescript_space_before_while_keyword = true
-ij_typescript_space_before_while_left_brace = true
-ij_typescript_space_before_while_parentheses = true
-ij_typescript_spaces_around_additive_operators = true
-ij_typescript_spaces_around_arrow_function_operator = true
-ij_typescript_spaces_around_assignment_operators = true
-ij_typescript_spaces_around_bitwise_operators = true
-ij_typescript_spaces_around_equality_operators = true
-ij_typescript_spaces_around_logical_operators = true
-ij_typescript_spaces_around_multiplicative_operators = true
-ij_typescript_spaces_around_relational_operators = true
-ij_typescript_spaces_around_shift_operators = true
-ij_typescript_spaces_around_unary_operator = false
-ij_typescript_spaces_within_array_initializer_brackets = false
-ij_typescript_spaces_within_brackets = false
-ij_typescript_spaces_within_catch_parentheses = false
-ij_typescript_spaces_within_for_parentheses = false
-ij_typescript_spaces_within_if_parentheses = false
-ij_typescript_spaces_within_imports = false
-ij_typescript_spaces_within_interpolation_expressions = false
-ij_typescript_spaces_within_method_call_parentheses = false
-ij_typescript_spaces_within_method_parentheses = false
-ij_typescript_spaces_within_object_literal_braces = false
-ij_typescript_spaces_within_object_type_braces = true
-ij_typescript_spaces_within_parentheses = false
-ij_typescript_spaces_within_switch_parentheses = false
-ij_typescript_spaces_within_type_assertion = false
-ij_typescript_spaces_within_union_types = true
-ij_typescript_spaces_within_while_parentheses = false
-ij_typescript_special_else_if_treatment = true
-ij_typescript_ternary_operation_signs_on_next_line = false
-ij_typescript_ternary_operation_wrap = off
-ij_typescript_union_types_wrap = on_every_item
-ij_typescript_use_chained_calls_group_indents = false
-ij_typescript_use_double_quotes = true
-ij_typescript_use_explicit_js_extension = global
-ij_typescript_use_path_mapping = always
-ij_typescript_use_public_modifier = false
-ij_typescript_use_semicolon_after_statement = true
-ij_typescript_var_declaration_wrap = normal
-ij_typescript_while_brace_force = never
-ij_typescript_while_on_new_line = false
-ij_typescript_wrap_comments = false
-
-[{*.bash, *.sh, *.zsh}]
-indent_size = 2
-tab_width = 2
-ij_shell_binary_ops_start_line = false
-ij_shell_keep_column_alignment_padding = false
-ij_shell_minify_program = false
-ij_shell_redirect_followed_by_space = false
-ij_shell_switch_cases_indented = false
-
-[{*.cjs, *.js}]
-ij_continuation_indent_size = 4
-ij_javascript_align_imports = false
-ij_javascript_align_multiline_array_initializer_expression = false
-ij_javascript_align_multiline_binary_operation = false
-ij_javascript_align_multiline_chained_methods = false
-ij_javascript_align_multiline_extends_list = false
-ij_javascript_align_multiline_for = true
-ij_javascript_align_multiline_parameters = true
-ij_javascript_align_multiline_parameters_in_calls = false
-ij_javascript_align_multiline_ternary_operation = false
-ij_javascript_align_object_properties = 0
-ij_javascript_align_union_types = false
-ij_javascript_align_var_statements = 0
-ij_javascript_array_initializer_new_line_after_left_brace = false
-ij_javascript_array_initializer_right_brace_on_new_line = false
-ij_javascript_array_initializer_wrap = off
-ij_javascript_assignment_wrap = off
-ij_javascript_binary_operation_sign_on_next_line = false
-ij_javascript_binary_operation_wrap = off
-ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/**
-ij_javascript_blank_lines_after_imports = 1
-ij_javascript_blank_lines_around_class = 1
-ij_javascript_blank_lines_around_field = 0
-ij_javascript_blank_lines_around_function = 1
-ij_javascript_blank_lines_around_method = 1
-ij_javascript_block_brace_style = end_of_line
-ij_javascript_call_parameters_new_line_after_left_paren = false
-ij_javascript_call_parameters_right_paren_on_new_line = false
-ij_javascript_call_parameters_wrap = off
-ij_javascript_catch_on_new_line = false
-ij_javascript_chained_call_dot_on_new_line = true
-ij_javascript_class_brace_style = end_of_line
-ij_javascript_comma_on_new_line = false
-ij_javascript_do_while_brace_force = never
-ij_javascript_else_on_new_line = false
-ij_javascript_enforce_trailing_comma = keep
-ij_javascript_extends_keyword_wrap = off
-ij_javascript_extends_list_wrap = off
-ij_javascript_field_prefix = _
-ij_javascript_file_name_style = relaxed
-ij_javascript_finally_on_new_line = false
-ij_javascript_for_brace_force = never
-ij_javascript_for_statement_new_line_after_left_paren = false
-ij_javascript_for_statement_right_paren_on_new_line = false
-ij_javascript_for_statement_wrap = off
-ij_javascript_force_quote_style = false
-ij_javascript_force_semicolon_style = false
-ij_javascript_function_expression_brace_style = end_of_line
-ij_javascript_if_brace_force = never
-ij_javascript_import_merge_members = global
-ij_javascript_import_prefer_absolute_path = global
-ij_javascript_import_sort_members = true
-ij_javascript_import_sort_module_name = false
-ij_javascript_import_use_node_resolution = true
-ij_javascript_imports_wrap = on_every_item
-ij_javascript_indent_case_from_switch = true
-ij_javascript_indent_chained_calls = true
-ij_javascript_indent_package_children = 0
-ij_javascript_jsx_attribute_value = braces
-ij_javascript_keep_blank_lines_in_code = 2
-ij_javascript_keep_first_column_comment = true
-ij_javascript_keep_indents_on_empty_lines = false
-ij_javascript_keep_line_breaks = true
-ij_javascript_keep_simple_blocks_in_one_line = false
-ij_javascript_keep_simple_methods_in_one_line = false
-ij_javascript_line_comment_add_space = true
-ij_javascript_line_comment_at_first_column = false
-ij_javascript_method_brace_style = end_of_line
-ij_javascript_method_call_chain_wrap = off
-ij_javascript_method_parameters_new_line_after_left_paren = false
-ij_javascript_method_parameters_right_paren_on_new_line = false
-ij_javascript_method_parameters_wrap = off
-ij_javascript_object_literal_wrap = on_every_item
-ij_javascript_parentheses_expression_new_line_after_left_paren = false
-ij_javascript_parentheses_expression_right_paren_on_new_line = false
-ij_javascript_place_assignment_sign_on_next_line = false
-ij_javascript_prefer_as_type_cast = false
-ij_javascript_prefer_explicit_types_function_expression_returns = false
-ij_javascript_prefer_explicit_types_function_returns = false
-ij_javascript_prefer_explicit_types_vars_fields = false
-ij_javascript_prefer_parameters_wrap = false
-ij_javascript_reformat_c_style_comments = false
-ij_javascript_space_after_colon = true
-ij_javascript_space_after_comma = true
-ij_javascript_space_after_dots_in_rest_parameter = false
-ij_javascript_space_after_generator_mult = true
-ij_javascript_space_after_property_colon = true
-ij_javascript_space_after_quest = true
-ij_javascript_space_after_type_colon = true
-ij_javascript_space_after_unary_not = false
-ij_javascript_space_before_async_arrow_lparen = true
-ij_javascript_space_before_catch_keyword = true
-ij_javascript_space_before_catch_left_brace = true
-ij_javascript_space_before_catch_parentheses = true
-ij_javascript_space_before_class_lbrace = true
-ij_javascript_space_before_class_left_brace = true
-ij_javascript_space_before_colon = true
-ij_javascript_space_before_comma = false
-ij_javascript_space_before_do_left_brace = true
-ij_javascript_space_before_else_keyword = true
-ij_javascript_space_before_else_left_brace = true
-ij_javascript_space_before_finally_keyword = true
-ij_javascript_space_before_finally_left_brace = true
-ij_javascript_space_before_for_left_brace = true
-ij_javascript_space_before_for_parentheses = true
-ij_javascript_space_before_for_semicolon = false
-ij_javascript_space_before_function_left_parenth = true
-ij_javascript_space_before_generator_mult = false
-ij_javascript_space_before_if_left_brace = true
-ij_javascript_space_before_if_parentheses = true
-ij_javascript_space_before_method_call_parentheses = false
-ij_javascript_space_before_method_left_brace = true
-ij_javascript_space_before_method_parentheses = false
-ij_javascript_space_before_property_colon = false
-ij_javascript_space_before_quest = true
-ij_javascript_space_before_switch_left_brace = true
-ij_javascript_space_before_switch_parentheses = true
-ij_javascript_space_before_try_left_brace = true
-ij_javascript_space_before_type_colon = false
-ij_javascript_space_before_unary_not = false
-ij_javascript_space_before_while_keyword = true
-ij_javascript_space_before_while_left_brace = true
-ij_javascript_space_before_while_parentheses = true
-ij_javascript_spaces_around_additive_operators = true
-ij_javascript_spaces_around_arrow_function_operator = true
-ij_javascript_spaces_around_assignment_operators = true
-ij_javascript_spaces_around_bitwise_operators = true
-ij_javascript_spaces_around_equality_operators = true
-ij_javascript_spaces_around_logical_operators = true
-ij_javascript_spaces_around_multiplicative_operators = true
-ij_javascript_spaces_around_relational_operators = true
-ij_javascript_spaces_around_shift_operators = true
-ij_javascript_spaces_around_unary_operator = false
-ij_javascript_spaces_within_array_initializer_brackets = false
-ij_javascript_spaces_within_brackets = false
-ij_javascript_spaces_within_catch_parentheses = false
-ij_javascript_spaces_within_for_parentheses = false
-ij_javascript_spaces_within_if_parentheses = false
-ij_javascript_spaces_within_imports = false
-ij_javascript_spaces_within_interpolation_expressions = false
-ij_javascript_spaces_within_method_call_parentheses = false
-ij_javascript_spaces_within_method_parentheses = false
-ij_javascript_spaces_within_object_literal_braces = false
-ij_javascript_spaces_within_object_type_braces = true
-ij_javascript_spaces_within_parentheses = false
-ij_javascript_spaces_within_switch_parentheses = false
-ij_javascript_spaces_within_type_assertion = false
-ij_javascript_spaces_within_union_types = true
-ij_javascript_spaces_within_while_parentheses = false
-ij_javascript_special_else_if_treatment = true
-ij_javascript_ternary_operation_signs_on_next_line = false
-ij_javascript_ternary_operation_wrap = off
-ij_javascript_union_types_wrap = on_every_item
-ij_javascript_use_chained_calls_group_indents = false
-ij_javascript_use_double_quotes = true
-ij_javascript_use_explicit_js_extension = global
-ij_javascript_use_path_mapping = always
-ij_javascript_use_public_modifier = false
-ij_javascript_use_semicolon_after_statement = true
-ij_javascript_var_declaration_wrap = normal
-ij_javascript_while_brace_force = never
-ij_javascript_while_on_new_line = false
-ij_javascript_wrap_comments = false
-
-[{*.ft, *.vm, *.vsl}]
-ij_vtl_keep_indents_on_empty_lines = false
-
-[{*.gant, *.gradle, *.groovy, *.gy}]
-ij_groovy_align_group_field_declarations = false
-ij_groovy_align_multiline_array_initializer_expression = false
-ij_groovy_align_multiline_assignment = false
-ij_groovy_align_multiline_binary_operation = false
-ij_groovy_align_multiline_chained_methods = false
-ij_groovy_align_multiline_extends_list = false
-ij_groovy_align_multiline_for = true
-ij_groovy_align_multiline_list_or_map = true
-ij_groovy_align_multiline_method_parentheses = false
-ij_groovy_align_multiline_parameters = true
-ij_groovy_align_multiline_parameters_in_calls = false
-ij_groovy_align_multiline_resources = true
-ij_groovy_align_multiline_ternary_operation = false
-ij_groovy_align_multiline_throws_list = false
-ij_groovy_align_named_args_in_map = true
-ij_groovy_align_throws_keyword = false
-ij_groovy_array_initializer_new_line_after_left_brace = false
-ij_groovy_array_initializer_right_brace_on_new_line = false
-ij_groovy_array_initializer_wrap = off
-ij_groovy_assert_statement_wrap = off
-ij_groovy_assignment_wrap = off
-ij_groovy_binary_operation_wrap = off
-ij_groovy_blank_lines_after_class_header = 0
-ij_groovy_blank_lines_after_imports = 1
-ij_groovy_blank_lines_after_package = 1
-ij_groovy_blank_lines_around_class = 1
-ij_groovy_blank_lines_around_field = 0
-ij_groovy_blank_lines_around_field_in_interface = 0
-ij_groovy_blank_lines_around_method = 1
-ij_groovy_blank_lines_around_method_in_interface = 1
-ij_groovy_blank_lines_before_imports = 1
-ij_groovy_blank_lines_before_method_body = 0
-ij_groovy_blank_lines_before_package = 0
-ij_groovy_block_brace_style = end_of_line
-ij_groovy_block_comment_at_first_column = true
-ij_groovy_call_parameters_new_line_after_left_paren = false
-ij_groovy_call_parameters_right_paren_on_new_line = false
-ij_groovy_call_parameters_wrap = off
-ij_groovy_catch_on_new_line = false
-ij_groovy_class_annotation_wrap = split_into_lines
-ij_groovy_class_brace_style = end_of_line
-ij_groovy_class_count_to_use_import_on_demand = 5
-ij_groovy_do_while_brace_force = never
-ij_groovy_else_on_new_line = false
-ij_groovy_enum_constants_wrap = off
-ij_groovy_extends_keyword_wrap = off
-ij_groovy_extends_list_wrap = off
-ij_groovy_field_annotation_wrap = split_into_lines
-ij_groovy_finally_on_new_line = false
-ij_groovy_for_brace_force = never
-ij_groovy_for_statement_new_line_after_left_paren = false
-ij_groovy_for_statement_right_paren_on_new_line = false
-ij_groovy_for_statement_wrap = off
-ij_groovy_if_brace_force = never
-ij_groovy_import_annotation_wrap = 2
-ij_groovy_imports_layout = *, |, javax.**, java.**, |, $*
-ij_groovy_indent_case_from_switch = true
-ij_groovy_indent_label_blocks = true
-ij_groovy_insert_inner_class_imports = false
-ij_groovy_keep_blank_lines_before_right_brace = 2
-ij_groovy_keep_blank_lines_in_code = 2
-ij_groovy_keep_blank_lines_in_declarations = 2
-ij_groovy_keep_control_statement_in_one_line = true
-ij_groovy_keep_first_column_comment = true
-ij_groovy_keep_indents_on_empty_lines = false
-ij_groovy_keep_line_breaks = true
-ij_groovy_keep_multiple_expressions_in_one_line = false
-ij_groovy_keep_simple_blocks_in_one_line = false
-ij_groovy_keep_simple_classes_in_one_line = true
-ij_groovy_keep_simple_lambdas_in_one_line = true
-ij_groovy_keep_simple_methods_in_one_line = true
-ij_groovy_label_indent_absolute = false
-ij_groovy_label_indent_size = 0
-ij_groovy_lambda_brace_style = end_of_line
-ij_groovy_layout_static_imports_separately = true
-ij_groovy_line_comment_add_space = false
-ij_groovy_line_comment_at_first_column = true
-ij_groovy_method_annotation_wrap = split_into_lines
-ij_groovy_method_brace_style = end_of_line
-ij_groovy_method_call_chain_wrap = off
-ij_groovy_method_parameters_new_line_after_left_paren = false
-ij_groovy_method_parameters_right_paren_on_new_line = false
-ij_groovy_method_parameters_wrap = off
-ij_groovy_modifier_list_wrap = false
-ij_groovy_names_count_to_use_import_on_demand = 3
-ij_groovy_parameter_annotation_wrap = off
-ij_groovy_parentheses_expression_new_line_after_left_paren = false
-ij_groovy_parentheses_expression_right_paren_on_new_line = false
-ij_groovy_prefer_parameters_wrap = false
-ij_groovy_resource_list_new_line_after_left_paren = false
-ij_groovy_resource_list_right_paren_on_new_line = false
-ij_groovy_resource_list_wrap = off
-ij_groovy_space_after_assert_separator = true
-ij_groovy_space_after_colon = true
-ij_groovy_space_after_comma = true
-ij_groovy_space_after_comma_in_type_arguments = true
-ij_groovy_space_after_for_semicolon = true
-ij_groovy_space_after_quest = true
-ij_groovy_space_after_type_cast = true
-ij_groovy_space_before_annotation_parameter_list = false
-ij_groovy_space_before_array_initializer_left_brace = false
-ij_groovy_space_before_assert_separator = false
-ij_groovy_space_before_catch_keyword = true
-ij_groovy_space_before_catch_left_brace = true
-ij_groovy_space_before_catch_parentheses = true
-ij_groovy_space_before_class_left_brace = true
-ij_groovy_space_before_closure_left_brace = true
-ij_groovy_space_before_colon = true
-ij_groovy_space_before_comma = false
-ij_groovy_space_before_do_left_brace = true
-ij_groovy_space_before_else_keyword = true
-ij_groovy_space_before_else_left_brace = true
-ij_groovy_space_before_finally_keyword = true
-ij_groovy_space_before_finally_left_brace = true
-ij_groovy_space_before_for_left_brace = true
-ij_groovy_space_before_for_parentheses = true
-ij_groovy_space_before_for_semicolon = false
-ij_groovy_space_before_if_left_brace = true
-ij_groovy_space_before_if_parentheses = true
-ij_groovy_space_before_method_call_parentheses = false
-ij_groovy_space_before_method_left_brace = true
-ij_groovy_space_before_method_parentheses = false
-ij_groovy_space_before_quest = true
-ij_groovy_space_before_switch_left_brace = true
-ij_groovy_space_before_switch_parentheses = true
-ij_groovy_space_before_synchronized_left_brace = true
-ij_groovy_space_before_synchronized_parentheses = true
-ij_groovy_space_before_try_left_brace = true
-ij_groovy_space_before_try_parentheses = true
-ij_groovy_space_before_while_keyword = true
-ij_groovy_space_before_while_left_brace = true
-ij_groovy_space_before_while_parentheses = true
-ij_groovy_space_in_named_argument = true
-ij_groovy_space_in_named_argument_before_colon = false
-ij_groovy_space_within_empty_array_initializer_braces = false
-ij_groovy_space_within_empty_method_call_parentheses = false
-ij_groovy_spaces_around_additive_operators = true
-ij_groovy_spaces_around_assignment_operators = true
-ij_groovy_spaces_around_bitwise_operators = true
-ij_groovy_spaces_around_equality_operators = true
-ij_groovy_spaces_around_lambda_arrow = true
-ij_groovy_spaces_around_logical_operators = true
-ij_groovy_spaces_around_multiplicative_operators = true
-ij_groovy_spaces_around_regex_operators = true
-ij_groovy_spaces_around_relational_operators = true
-ij_groovy_spaces_around_shift_operators = true
-ij_groovy_spaces_within_annotation_parentheses = false
-ij_groovy_spaces_within_array_initializer_braces = false
-ij_groovy_spaces_within_braces = true
-ij_groovy_spaces_within_brackets = false
-ij_groovy_spaces_within_cast_parentheses = false
-ij_groovy_spaces_within_catch_parentheses = false
-ij_groovy_spaces_within_for_parentheses = false
-ij_groovy_spaces_within_gstring_injection_braces = false
-ij_groovy_spaces_within_if_parentheses = false
-ij_groovy_spaces_within_list_or_map = false
-ij_groovy_spaces_within_method_call_parentheses = false
-ij_groovy_spaces_within_method_parentheses = false
-ij_groovy_spaces_within_parentheses = false
-ij_groovy_spaces_within_switch_parentheses = false
-ij_groovy_spaces_within_synchronized_parentheses = false
-ij_groovy_spaces_within_try_parentheses = false
-ij_groovy_spaces_within_tuple_expression = false
-ij_groovy_spaces_within_while_parentheses = false
-ij_groovy_special_else_if_treatment = true
-ij_groovy_ternary_operation_wrap = off
-ij_groovy_throws_keyword_wrap = off
-ij_groovy_throws_list_wrap = off
-ij_groovy_use_flying_geese_braces = false
-ij_groovy_use_fq_class_names = false
-ij_groovy_use_fq_class_names_in_javadoc = true
-ij_groovy_use_relative_indents = false
-ij_groovy_use_single_class_imports = true
-ij_groovy_variable_annotation_wrap = off
-ij_groovy_while_brace_force = never
-ij_groovy_while_on_new_line = false
-ij_groovy_wrap_long_lines = false
-
-[{*.gradle.kts, *.kt, *.kts, *.main.kts}]
-ij_kotlin_align_in_columns_case_branch = false
-ij_kotlin_align_multiline_binary_operation = false
-ij_kotlin_align_multiline_extends_list = false
-ij_kotlin_align_multiline_method_parentheses = false
-ij_kotlin_align_multiline_parameters = true
-ij_kotlin_align_multiline_parameters_in_calls = false
-ij_kotlin_allow_trailing_comma = false
-ij_kotlin_allow_trailing_comma_on_call_site = false
-ij_kotlin_assignment_wrap = off
-ij_kotlin_blank_lines_after_class_header = 0
-ij_kotlin_blank_lines_around_block_when_branches = 0
-ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1
-ij_kotlin_block_comment_at_first_column = true
-ij_kotlin_call_parameters_new_line_after_left_paren = false
-ij_kotlin_call_parameters_right_paren_on_new_line = false
-ij_kotlin_call_parameters_wrap = off
-ij_kotlin_catch_on_new_line = false
-ij_kotlin_class_annotation_wrap = split_into_lines
-ij_kotlin_continuation_indent_for_chained_calls = true
-ij_kotlin_continuation_indent_for_expression_bodies = true
-ij_kotlin_continuation_indent_in_argument_lists = true
-ij_kotlin_continuation_indent_in_elvis = true
-ij_kotlin_continuation_indent_in_if_conditions = true
-ij_kotlin_continuation_indent_in_parameter_lists = true
-ij_kotlin_continuation_indent_in_supertype_lists = true
-ij_kotlin_else_on_new_line = false
-ij_kotlin_enum_constants_wrap = off
-ij_kotlin_extends_list_wrap = off
-ij_kotlin_field_annotation_wrap = split_into_lines
-ij_kotlin_finally_on_new_line = false
-ij_kotlin_if_rparen_on_new_line = false
-ij_kotlin_import_nested_classes = false
-ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
-ij_kotlin_keep_blank_lines_before_right_brace = 2
-ij_kotlin_keep_blank_lines_in_code = 2
-ij_kotlin_keep_blank_lines_in_declarations = 2
-ij_kotlin_keep_first_column_comment = true
-ij_kotlin_keep_indents_on_empty_lines = false
-ij_kotlin_keep_line_breaks = true
-ij_kotlin_lbrace_on_next_line = false
-ij_kotlin_line_comment_add_space = false
-ij_kotlin_line_comment_at_first_column = true
-ij_kotlin_method_annotation_wrap = split_into_lines
-ij_kotlin_method_call_chain_wrap = off
-ij_kotlin_method_parameters_new_line_after_left_paren = false
-ij_kotlin_method_parameters_right_paren_on_new_line = false
-ij_kotlin_method_parameters_wrap = off
-ij_kotlin_name_count_to_use_star_import = 5
-ij_kotlin_name_count_to_use_star_import_for_members = 3
-ij_kotlin_parameter_annotation_wrap = off
-ij_kotlin_space_after_comma = true
-ij_kotlin_space_after_extend_colon = true
-ij_kotlin_space_after_type_colon = true
-ij_kotlin_space_before_catch_parentheses = true
-ij_kotlin_space_before_comma = false
-ij_kotlin_space_before_extend_colon = true
-ij_kotlin_space_before_for_parentheses = true
-ij_kotlin_space_before_if_parentheses = true
-ij_kotlin_space_before_lambda_arrow = true
-ij_kotlin_space_before_type_colon = false
-ij_kotlin_space_before_when_parentheses = true
-ij_kotlin_space_before_while_parentheses = true
-ij_kotlin_spaces_around_additive_operators = true
-ij_kotlin_spaces_around_assignment_operators = true
-ij_kotlin_spaces_around_equality_operators = true
-ij_kotlin_spaces_around_function_type_arrow = true
-ij_kotlin_spaces_around_logical_operators = true
-ij_kotlin_spaces_around_multiplicative_operators = true
-ij_kotlin_spaces_around_range = false
-ij_kotlin_spaces_around_relational_operators = true
-ij_kotlin_spaces_around_unary_operator = false
-ij_kotlin_spaces_around_when_arrow = true
-ij_kotlin_variable_annotation_wrap = off
-ij_kotlin_while_on_new_line = false
-ij_kotlin_wrap_elvis_expressions = 1
-ij_kotlin_wrap_expression_body_functions = 0
-ij_kotlin_wrap_first_method_in_call_chain = false
-
-[{*.har, *.jsb2, *.jsb3, *.json, .babelrc, .eslintrc, .stylelintrc, bowerrc, jest.config, mcmod.info}]
-indent_size = 2
-ij_json_keep_blank_lines_in_code = 0
-ij_json_keep_indents_on_empty_lines = false
-ij_json_keep_line_breaks = true
-ij_json_space_after_colon = true
-ij_json_space_after_comma = true
-ij_json_space_before_colon = true
-ij_json_space_before_comma = false
-ij_json_spaces_within_braces = false
-ij_json_spaces_within_brackets = false
-ij_json_wrap_long_lines = false
-
-[{*.htm, *.html, *.sht, *.shtm, *.shtml}]
-ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3
-ij_html_align_attributes = true
-ij_html_align_text = false
-ij_html_attribute_wrap = normal
-ij_html_block_comment_at_first_column = true
-ij_html_do_not_align_children_of_min_lines = 0
-ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p
-ij_html_do_not_indent_children_of_tags = html, body, thead, tbody, tfoot
-ij_html_enforce_quotes = false
-ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var
-ij_html_keep_blank_lines = 2
-ij_html_keep_indents_on_empty_lines = false
-ij_html_keep_line_breaks = true
-ij_html_keep_line_breaks_in_text = true
-ij_html_keep_whitespaces = false
-ij_html_keep_whitespaces_inside = span, pre, textarea
-ij_html_line_comment_at_first_column = true
-ij_html_new_line_after_last_attribute = never
-ij_html_new_line_before_first_attribute = never
-ij_html_quote_style = double
-ij_html_remove_new_line_before_tags = br
-ij_html_space_after_tag_name = false
-ij_html_space_around_equality_in_attribute = false
-ij_html_space_inside_empty_tag = false
-ij_html_text_wrap = normal
-ij_html_uniform_ident = false
-
-[{*.yaml, *.yml}]
-indent_size = 2
-ij_yaml_keep_indents_on_empty_lines = false
-ij_yaml_keep_line_breaks = true
-ij_yaml_space_before_colon = true
-ij_yaml_spaces_within_braces = true
-ij_yaml_spaces_within_brackets = true
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
deleted file mode 100644
index f79683cd..00000000
--- a/.github/CODEOWNERS
+++ /dev/null
@@ -1 +0,0 @@
-* @OneLiteFeatherNET/bettergopaint-core
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index 98485282..00000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-# These are supported funding model platforms
-
-patreon: TheMeinerLP # Replace with a single Patreon username
-github: TheMeinerLP
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 8b0009d7..c7a3eaf6 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,48 +1,12 @@
name: Bug report
description: Create a report to help us improve
-labels: 'Requires Testing'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report for goPaint! Fill out the following form to your best ability to help us fix the problem.
- Only use this if you're absolutely sure that you found a bug and can reproduce it. For anything else, use: [our Discord server](https://discord.com/invite/jpRVrjd).
-
- - type: dropdown
- attributes:
- label: Server Implementation
- description: Which server Implementation are you using? If your server implementation is not listed, it is not supported. Switch to a supported version first.
- multiple: false
- options:
- - Paper
- - Spigot
- - Tuinity
- validations:
- required: true
-
- - type: dropdown
- attributes:
- label: Server Version
- description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first.
- multiple: false
- options:
- - '1.20'
- - '1.19.4'
- - '1.19.3'
- - '1.19.2'
- - '1.19.1'
- - '1.19'
- - '1.18.2'
- - '1.18.1'
- - '1.18'
- - '1.17.2'
- - '1.17.1'
- - '1.16.5'
- - '1.15.2'
- - '1.14.4'
- validations:
- required: true
+ Only use this if you're absolutely sure that you found a bug and can reproduce it. For anything else, use: [our Discord server](https://thenextlvl.net/discord).
- type: textarea
attributes:
@@ -88,8 +52,8 @@ body:
- type: input
attributes:
label: goPaint Version
- description: What version of BetterGoPaint are you running? (`/version BetterGoPaint`)
- placeholder: "For example: BetterGoPaint version 1.0.0-SNAPSHOT+fa92c8abf8a66c08621e66109a64407ec223bdae"
+ description: What version of goPaintAdvanced are you running? (`/version goPaintAdvanced`)
+ placeholder: "For example: version 1.1.0"
validations:
required: true
@@ -98,7 +62,7 @@ body:
label: Checklist
description: Make sure you have followed each of the steps outlined here.
options:
- - label: I am using the newest build from https://github.com/TheMeinerLP/BetterGoPaint and the issue still persists.
+ - label: I am using the newest build from https://github.com/TheNextLvl-net/goPaintAdvanced and the issue still persists.
required: true
- type: textarea
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
deleted file mode 100644
index 72c7ed1d..00000000
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-blank_issues_enabled: false
-contact_links:
- - name: "OneLiteFeather' Discord"
- url: https://discord.onelitefeather.net
- about: The support Discord, please ask questions and seek support here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 83df45d5..0927f214 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -6,9 +6,9 @@ body:
- type: markdown
attributes:
value: |
- Thanks for taking the time to fill out this feature request for BetterGoPaint! Fill out the following form to your best
- ability to help us understand your feature request and greately improve the change of it getting added.
- For anything else than a feature request, use: [our Discord server](https://discord.onelitefeather.net).
+ Thanks for taking the time to fill out this feature request for goPaintAdvanced! Fill out the following form to your best
+ ability to help us understand your feature request and greatly improve the change of it getting added.
+ For anything else than a feature request, use: [our Discord server](https://thenextlvl.net/discord).
- type: textarea
attributes:
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 7ec366b6..00000000
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,16 +0,0 @@
-## Overview
-
-
-**Fixes {Link to issue}**
-
-## Description
-
-## Checklist
-
-- [] I included all information required in the sections above
-- [] I tested my changes and approved their functionality
-- [] I ensured my changes do not break other parts of the code
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
deleted file mode 100644
index 13813730..00000000
--- a/.github/release-drafter.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-_extends: .github
-template: |
- ## What’s Changed
-
- $CHANGES
\ No newline at end of file
diff --git a/.github/renovate.json b/.github/renovate.json
deleted file mode 100644
index 3298442b..00000000
--- a/.github/renovate.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "extends": [
- "config:base",
- ":semanticCommitsDisabled"
- ],
- "ignoreDeps": [],
- "labels": ["Renovate"],
- "rebaseWhen": "conflicted",
- "schedule": ["on the first day of the month"]
-}
\ No newline at end of file
diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml
deleted file mode 100644
index f06fd791..00000000
--- a/.github/workflows/build-pr.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: Build PR
-on: [pull_request]
-jobs:
- build_pr:
- if: github.repository_owner == 'OneLiteFeatherNET'
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, windows-latest, macos-latest]
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v4
- - name: Validate Gradle Wrapper
- uses: gradle/wrapper-validation-action@v1
- - name: Setup Java
- uses: actions/setup-java@v4
- with:
- distribution: temurin
- java-version: 21
- - name: Build on ${{ matrix.os }}
- run: ./gradlew clean build
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..93677fe1
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,28 @@
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
+# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
+
+name: Java CI with Gradle
+on: [ pull_request, push ]
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK 21
+ uses: actions/setup-java@v4
+ with:
+ java-version: '21'
+ distribution: 'temurin'
+ - name: Build with Gradle
+ uses: gradle/actions/setup-gradle@v3
+ with:
+ arguments: shadowJar
+ - name: Upload a Build Artifact
+ uses: actions/upload-artifact@v4
+ with:
+ path: build/libs/*
+ if-no-files-found: error
\ No newline at end of file
diff --git a/.github/workflows/close_invalid_prs.yml b/.github/workflows/close_invalid_prs.yml
deleted file mode 100644
index 03b5e823..00000000
--- a/.github/workflows/close_invalid_prs.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-name: Close invalid PRs
-
-on:
- pull_request_target:
- types: [ opened ]
-
-jobs:
- run:
- if: ${{ github.repository != github.event.pull_request.head.repo.full_name && github.head_ref == 'master' }}
- runs-on: ubuntu-latest
- steps:
- - uses: superbrothers/close-pull-request@v3
- with:
- comment: "Please do not open pull requests from the `develop` branch, create a new branch instead."
\ No newline at end of file
diff --git a/.github/workflows/hangar-publish.yml b/.github/workflows/hangar-publish.yml
new file mode 100644
index 00000000..0bbd0eac
--- /dev/null
+++ b/.github/workflows/hangar-publish.yml
@@ -0,0 +1,24 @@
+name: Hangar Publish
+
+on:
+ release:
+ types:
+ - prereleased
+ - released
+
+jobs:
+ build:
+ env:
+ HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK 21
+ uses: actions/setup-java@v4
+ with:
+ java-version: '21'
+ distribution: 'temurin'
+ - name: Publish with Gradle to Hangar
+ uses: gradle/actions/setup-gradle@v3
+ with:
+ arguments: publishAllPublicationsToHangar
\ No newline at end of file
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
deleted file mode 100644
index c058a07c..00000000
--- a/.github/workflows/publish.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-name: Publish
-on:
- push:
- branches:
- - master
- - dev
-jobs:
- build:
- # Run on all label events (won't be duplicated) or all push events or on PR syncs not from the same repo
- if: github.repository_owner == 'OneLiteFeatherNET'
- runs-on: ubuntu-latest
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v4
- - name: Validate Gradle Wrapper
- uses: gradle/wrapper-validation-action@v1
- - name: Setup Java
- uses: actions/setup-java@v4
- with:
- distribution: temurin
- cache: gradle
- java-version: 21
- - name: Publish
- env:
- HANGAR_SECRET: ${{secrets.HANGAR_KEY}}
- MODRINTH_TOKEN: ${{ secrets.MODRINTH_KEY }}
- run: ./gradlew build modrinth publishAllPublicationsToHangar --stacktrace
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
deleted file mode 100644
index 7dcc4c8c..00000000
--- a/.github/workflows/release-drafter.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: draft release
-on:
- push:
- branches:
- - master
- pull_request:
- types: [opened, reopened, synchronize]
- pull_request_target:
- types: [opened, reopened, synchronize]
-permissions:
- contents: read
-jobs:
- update_release_draft:
- permissions:
- contents: write
- pull-requests: write
- if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
- runs-on: ubuntu-latest
- steps:
- - uses: release-drafter/release-drafter@v5
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index df5647d0..00000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Changelog
-
-## [Unreleased]
-
-### Added
-- Hard requirement of FastAsyncWorldEdit
-- Modrinth support
-- Hangar support
-
-### Changed
-- XMaterial support now compatible with 1.18 upwards
-- Settings system
-- [Own BStats page](https://bstats.org/plugin/bukkit/BetterGoPaint/18734)
-- Build gradle - Improved many thing
-- Remove reflection code
-
-### Deprecated
-
-### Removed
-- NMS Code
-- Hard Coded XMaterial
-- Authlib from Mojang
-### Fixed
-
-### Security
diff --git a/HEADER.txt b/HEADER.txt
deleted file mode 100644
index f2ec848d..00000000
--- a/HEADER.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * goPaint is designed to simplify painting inside of Minecraft.
- * Copyright (C) Arcaniax-Development
- * Copyright (C) Arcaniax team and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
diff --git a/README.md b/README.md
index 46d8a23f..1e8e528e 100644
--- a/README.md
+++ b/README.md
@@ -1,44 +1,41 @@
-
-
-
+![](https://i.imgur.com/ulEwPm9.jpg)
---
-BetterGoPaint is a plugin that's designed to simplify painting inside of Minecraft.
-This plugin is a [fork](https://github.com/Arcaniax-Development/goPaint_1.14) of original one, but with many improvements and
-fixes.
-
+goPaint is a plugin that's designed to simplify painting inside of Minecraft.
+This plugin is a fork of the [original](https://github.com/Arcaniax-Development/goPaint_1.14) one,
+but with many improvements and fixes.
+We aim to be always up-to-date and use new technology instead of hanging on to old and dead code.
## Major Changes
+
### Done
+
- Improved configuration file
-- Better XMaterial Support
-- Modrinth auto deployment
+- Added internationalization
+- Dropped XMaterial Support
- Hangar auto deployment
- New CI Development builds
-- New download link
- Better build gradle
-- **Drop 1.13-1.19.4 support. Please use the original plugin!**
+- **Dropped legacy support. Update or use the original plugin!**
### To-Do
-- Fix performance impacts
-- Memory leaks
+
- Better FAWE integration
-- Reduce duplicated code
-- Stability
-- Replace default commands with cloud framework
+- Replace commands with brigadier
## Links
-* [Download](https://hangar.papermc.io/TheMeinerLP/BetterGoPaint)
- * [Mirror](https://modrinth.com/plugin/bettergopaint)
-* [Development Builds](https://hangar.papermc.io/TheMeinerLP/BetterGoPaint)
- * [Mirror](https://modrinth.com/plugin/bettergopaint)
-* [Discord](https://discord.onelitefeather.net)
-* [Issues](https://github.com/TheMeinerLP/BetterGoPaint/issues)
+* [Download](https://hangar.papermc.io/TheNextLvl/goPaintAdvanced)
+* [Discord](https://thenextlvl.net/discord)
+* [Issues](https://github.com/TheNextLvl-net/goPaintAdvanced/issues)
# Building
-Gradle is the recommended way to build the project. Use `./gradlew shadowJar` in the main project directory to build the project.
+
+Gradle is the recommended way to build the project. Use `./gradlew shadowJar` in the main project directory to build the
+project.
## Suggestions
-Suggestions are welcome! We have a separate issue form for suggestions, that can be found [here](https://github.com/TheMeinerLP/BetterGoPaint/issues).
+
+Suggestions are welcome! We have a separate issue form for suggestions, that can be
+found [here](https://github.com/TheNextLvl-net/goPaintAdvanced/issues).
diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts
deleted file mode 100644
index cc02e636..00000000
--- a/build-logic/build.gradle.kts
+++ /dev/null
@@ -1,7 +0,0 @@
-plugins {
- `kotlin-dsl`
-}
-
-repositories {
- gradlePluginPortal()
-}
diff --git a/build-logic/src/main/kotlin/extensions.kt b/build-logic/src/main/kotlin/extensions.kt
deleted file mode 100644
index 0c696da7..00000000
--- a/build-logic/src/main/kotlin/extensions.kt
+++ /dev/null
@@ -1,43 +0,0 @@
-import org.gradle.api.Project
-import org.gradle.api.publish.PublishingExtension
-import org.gradle.api.publish.maven.MavenPublication
-import org.gradle.kotlin.dsl.configure
-import org.gradle.kotlin.dsl.get
-import org.gradle.kotlin.dsl.named
-import java.io.ByteArrayOutputStream
-
-fun Project.publishShadowJar() {
- configurePublication {
- artifact(tasks["shadowJar"])
- artifact(tasks["sourcesJar"])
- }
-}
-
-private fun Project.configurePublication(configurer: MavenPublication.() -> Unit) {
- extensions.configure {
- publications.named("mavenJava") {
- apply(configurer)
- }
- }
-}
-
-fun Project.latestCommitHash(): String {
- return runGitCommand(listOf("rev-parse", "--short", "HEAD"))
-}
-
-fun Project.latestCommitMessage(): String {
- return runGitCommand(listOf("log", "-1", "--pretty=%B"))
-}
-
-fun Project.branchName(): String {
- return runGitCommand(listOf("rev-parse", "--abbrev-ref", "HEAD"))
-}
-
-fun Project.runGitCommand(args: List): String {
- val byteOut = ByteArrayOutputStream()
- exec {
- commandLine = listOf("git") + args
- standardOutput = byteOut
- }
- return byteOut.toString(Charsets.UTF_8.name()).trim()
-}
diff --git a/build-logic/src/main/kotlin/olf.build-logic.gradle.kts b/build-logic/src/main/kotlin/olf.build-logic.gradle.kts
deleted file mode 100644
index e69de29b..00000000
diff --git a/build.gradle.kts b/build.gradle.kts
index 6efc8bb9..7939d57b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,76 +1,50 @@
import io.papermc.hangarpublishplugin.model.Platforms
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
import net.minecrell.pluginyml.paper.PaperPluginDescription
-import xyz.jpenilla.runpaper.task.RunServer
-import kotlin.system.exitProcess
plugins {
- id("idea")
id("java")
id("java-library")
- id("olf.build-logic")
- alias(libs.plugins.spotless)
- alias(libs.plugins.minotaur)
- alias(libs.plugins.shadow)
- alias(libs.plugins.hangar.publish.plugin)
- alias(libs.plugins.plugin.yml.paper)
- alias(libs.plugins.run.paper)
+ id("io.github.goooler.shadow") version "8.1.7"
+ id("io.papermc.hangar-publish-plugin") version "0.1.2"
+ id("net.minecrell.plugin-yml.paper") version "0.6.0"
+ id("xyz.jpenilla.run-paper") version "2.1.0"
}
-if (!File("$rootDir/.git").exists()) {
- logger.lifecycle("""
- **************************************************************************************
- You need to fork and clone this repository! Don't download a .zip file.
- If you need assistance, consult the GitHub docs: https://docs.github.com/get-started/quickstart/fork-a-repo
- **************************************************************************************
- """.trimIndent()
- ).also { exitProcess(1) }
-}
-
-allprojects {
- group = "net.onelitefeather.bettergopaint"
- version = property("projectVersion") as String // from gradle.properties
-}
-group = "net.onelitefeather.bettergopaint"
-
-val supportedMinecraftVersions = listOf(
- "1.20",
- "1.20.1",
- "1.20.2",
- "1.20.3",
- "1.20.4",
- "1.20.5",
- "1.20.6"
-)
+group = "net.thenextlvl.gopaint"
+version = "1.1.0"
repositories {
mavenCentral()
+ maven("https://repo.thenextlvl.net/releases")
maven("https://papermc.io/repo/repository/maven-public/")
}
dependencies {
+ compileOnly("org.projectlombok:lombok:1.18.32")
+ compileOnly("net.thenextlvl.core:annotations:2.0.1")
// Paper / Spigot
- compileOnly(libs.paper)
+ compileOnly("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT")
// Fawe / WorldEdit
- implementation(platform(libs.fawe.bom))
- compileOnlyApi(libs.fawe.bukkit)
- // Utils
- implementation(libs.serverlib)
- implementation(libs.paperlib)
+ implementation(platform("com.intellectualsites.bom:bom-newest:1.27"))
+ compileOnlyApi("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit")
// Stats
- implementation(libs.bstats)
+ implementation("org.bstats:bstats-bukkit:3.0.2")
+ // Internationalization
+ implementation("net.thenextlvl.core:i18n:1.0.18")
// Commands
- implementation(libs.cloud.annotations)
- implementation(libs.cloud.minecraft.extras)
- implementation(libs.cloud.paper)
- annotationProcessor(libs.cloud.annotations)
+ implementation("org.incendo:cloud-minecraft-extras:2.0.0-beta.8")
+ implementation("org.incendo:cloud-paper:2.0.0-beta.8")
+ implementation("org.incendo:cloud-annotations:2.0.0-rc.2")
+ annotationProcessor("org.incendo:cloud-annotations:2.0.0-rc.2")
+ annotationProcessor("org.projectlombok:lombok:1.18.32")
}
paper {
- name = "BetterGoPaint"
- main = "net.onelitefeather.bettergopaint.BetterGoPaint"
- authors = listOf("Arcaniax", "TheMeinerLP")
+ name = "goPaintAdvanced"
+ main = "net.thenextlvl.gopaint.GoPaintPlugin"
+ authors = listOf("Arcaniax", "TheMeinerLP", "NonSwag")
apiVersion = "1.20"
serverDependencies {
@@ -80,109 +54,54 @@ paper {
}
}
- website = "https://github.com/OneLiteFeatherNET/BetterGoPaint"
+ website = "https://thenextlvl.net"
provides = listOf("goPaint")
permissions {
- register("bettergopaint.command.admin.reload") {
+ register("gopaint.command.admin.reload") {
default = BukkitPluginDescription.Permission.Default.OP
}
- register("bettergopaint.use") {
+ register("gopaint.use") {
default = BukkitPluginDescription.Permission.Default.OP
}
- register("bettergopaint.admin") {
+ register("gopaint.admin") {
default = BukkitPluginDescription.Permission.Default.FALSE
}
- register("bettergopaint.world.bypass") {
+ register("gopaint.world.bypass") {
default = BukkitPluginDescription.Permission.Default.FALSE
}
}
}
-
-spotless {
- java {
- licenseHeaderFile(rootProject.file("HEADER.txt"))
- target("**/*.java")
- }
-}
-
java {
- toolchain.languageVersion.set(JavaLanguageVersion.of(21))
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
-tasks {
- jar {
- archiveClassifier.set("unshaded")
- }
- compileJava {
- options.release.set(21)
- options.encoding = "UTF-8"
- }
- shadowJar {
- archiveClassifier.set("")
- dependencies {
- relocate("com.cryptomorin.xseries", "${rootProject.group}.xseries")
- relocate("org.incendo.serverlib", "${rootProject.group}.serverlib")
- relocate("org.bstats", "${rootProject.group}.metrics")
- relocate("io.papermc.lib", "${rootProject.group}.paperlib")
- }
- }
- build {
- dependsOn(shadowJar)
- }
- supportedMinecraftVersions.forEach { serverVersion ->
- register("run-$serverVersion") {
- minecraftVersion(serverVersion)
- jvmArgs("-DPaper.IgnoreJavaVersion=true", "-Dcom.mojang.eula.agree=true")
- group = "run paper"
- runDirectory.set(file("run-$serverVersion"))
- pluginJars(rootProject.tasks.shadowJar.map { it.archiveFile }.get())
- }
+tasks.shadowJar {
+ dependencies {
+ relocate("org.incendo.serverlib", "${rootProject.group}.serverlib")
+ relocate("org.bstats", "${rootProject.group}.metrics")
}
}
-val branch = rootProject.branchName()
-val baseVersion = project.version as String
-val isRelease = !baseVersion.contains('-')
-val isMainBranch = branch == "master"
-if (!isRelease || isMainBranch) { // Only publish releases from the main branch
- val suffixedVersion = if (isRelease) baseVersion else baseVersion + "+" + System.getenv("GITHUB_RUN_NUMBER")
- val changelogContent = if (isRelease) {
- "See [GitHub](https://github.com/OneLiteFeatherNET/BetterGoPaint) for release notes."
- } else {
- val commitHash = rootProject.latestCommitHash()
- "[$commitHash](https://github.com/OneLiteFeatherNET/BetterGoPaint/commit/$commitHash) ${rootProject.latestCommitMessage()}"
- }
- hangarPublish {
- publications.register("BetterGoPaint") {
- version.set(suffixedVersion)
- channel.set(if (isRelease) "Release" else if (isMainBranch) "Snapshot" else "Alpha")
- changelog.set(changelogContent)
- apiKey.set(System.getenv("HANGAR_SECRET"))
- id.set("BetterGoPaint")
- platforms {
- register(Platforms.PAPER) {
- jar.set(tasks.shadowJar.flatMap { it.archiveFile })
- platformVersions.set(supportedMinecraftVersions)
- }
- }
- }
- }
+tasks.runServer {
+ minecraftVersion("1.20.6")
+ jvmArgs("-Dcom.mojang.eula.agree=true")
+}
- modrinth {
- token.set(System.getenv("MODRINTH_TOKEN"))
- projectId.set("qf7sNg9A")
- versionType.set(if (isRelease) "release" else if (isMainBranch) "beta" else "alpha")
- versionNumber.set(suffixedVersion)
- versionName.set(suffixedVersion)
- changelog.set(changelogContent)
- uploadFile.set(tasks.shadowJar.flatMap { it.archiveFile })
- gameVersions.addAll(supportedMinecraftVersions)
- loaders.add("paper")
- loaders.add("bukkit")
- loaders.add("folia")
+val versionString: String = project.version as String
+val isRelease: Boolean = !versionString.contains("-pre")
+
+hangarPublish { // docs - https://docs.papermc.io/misc/hangar-publishing
+ publications.register("plugin") {
+ id.set("goPaintAdvanced")
+ version.set(versionString)
+ channel.set(if (isRelease) "Release" else "Snapshot")
+ apiKey.set(System.getenv("HANGAR_API_TOKEN"))
+ platforms.register(Platforms.PAPER) {
+ jar.set(tasks.shadowJar.flatMap { it.archiveFile })
+ platformVersions.set(listOf("1.20.6"))
+ }
}
}
diff --git a/gradle.properties b/gradle.properties
deleted file mode 100644
index 5f560d2e..00000000
--- a/gradle.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-projectVersion=1.1.0-SNAPSHOT
-
-org.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
-org.gradle.daemon=true
-org.gradle.configureondemand=true
-org.gradle.parallel=true
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
deleted file mode 100644
index a828a13f..00000000
--- a/gradle/libs.versions.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-[versions]
-minecraft = "1.20.6-R0.1-SNAPSHOT"
-intellectualsites = "1.27"
-bstats = "3.0.2"
-cloud-minecraft = "2.0.0-beta.8"
-cloud-annotations = "2.0.0-rc.2"
-
-[libraries]
-paper = { group = "io.papermc.paper", name = "paper-api", version.ref = "minecraft" }
-fawe-bom = { group = "com.intellectualsites.bom", name = "bom-newest", version.ref = "intellectualsites" }
-fawe-bukkit = { group = "com.fastasyncworldedit", name = "FastAsyncWorldEdit-Bukkit" }
-serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib" }
-paperlib = { group = "io.papermc", name = "paperlib" }
-bstats = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" }
-cloud-annotations = { group = "org.incendo", name = "cloud-annotations", version.ref = "cloud-annotations" }
-cloud-minecraft-extras = { group = "org.incendo", name = "cloud-minecraft-extras", version.ref = "cloud-minecraft" }
-cloud-paper = { group = "org.incendo", name = "cloud-paper", version.ref = "cloud-minecraft" }
-
-[plugins]
-spotless = { id = "com.diffplug.spotless", version = "6.18.0" }
-minotaur = { id = "com.modrinth.minotaur", version = "2.+" }
-shadow = { id = "io.github.goooler.shadow", version = "8.1.7" }
-hangar-publish-plugin = { id = "io.papermc.hangar-publish-plugin", version = "0.1.2" }
-plugin-yml-paper = { id = "net.minecrell.plugin-yml.paper", version = "0.6.0" }
-run-paper = { id = "xyz.jpenilla.run-paper", version = "2.1.0" }
diff --git a/renovate.json b/renovate.json
deleted file mode 100644
index f94e25ff..00000000
--- a/renovate.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "extends": [
- "config:base",
- ":semanticCommitsDisabled"
- ],
- "labels": ["Renovate"],
- "rebaseWhen": "conflicted",
- "schedule": ["on the first day of the month"]
-}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 1427e0e7..19cc1a34 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -1,2 +1 @@
-rootProject.name = "BetterGoPaint"
-includeBuild("build-logic")
+rootProject.name = "goPaintAdvanced"
diff --git a/src/main/java/net/onelitefeather/bettergopaint/utils/curve/BezierSpline.java b/src/main/java/net/onelitefeather/bettergopaint/utils/curve/BezierSpline.java
deleted file mode 100644
index a30dcf3f..00000000
--- a/src/main/java/net/onelitefeather/bettergopaint/utils/curve/BezierSpline.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * goPaint is designed to simplify painting inside of Minecraft.
- * Copyright (C) Arcaniax-Development
- * Copyright (C) Arcaniax team and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package net.onelitefeather.bettergopaint.utils.curve;
-
-
-import org.bukkit.Location;
-import org.bukkit.World;
-import org.bukkit.util.Vector;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.LinkedList;
-
-public class BezierSpline {
-
- private final @NotNull LinkedList knotsList;
- private Location[] knots;
- private @NotNull BezierSplineSegment[] segments;
- private double length = 0;
- private Location anchorPoint;
-
- public BezierSpline() {
- knotsList = new LinkedList<>();
- segments = new BezierSplineSegment[0];
- }
-
- public BezierSpline(@NotNull LinkedList knotsList) {
- this.knotsList = knotsList;
- recalculate();
- }
-
- private void recalculate() {
- knots = knotsList.toArray(new Location[0]);
- segments = new BezierSplineSegment[knots.length - 1];
- for (int i = 0; i < knots.length - 1; i++) {
- segments[i] = new BezierSplineSegment(knots[i], knots[i + 1]);
- }
- calculateControlPoints();
- calculateLength();
- }
-
- public void addKnot(@NotNull Location location) {
- knotsList.add(location);
- recalculate();
- }
-
- public void removeKnot(int n) {
- if (n < knots.length) {
- knotsList.remove(n);
- recalculate();
- }
- }
-
- public double getCurveLength() {
- return length;
- }
-
- public void calculateLength() {
- length = 0;
- for (BezierSplineSegment segment : segments) {
- segment.calculateCurveLength();
- length += segment.getCurveLength();
- }
- }
-
- public int getSegmentsCount() {
- return segments.length;
- }
-
- public BezierSplineSegment getCurveSegment(int n) {
- assert (n < segments.length);
- return segments[n];
- }
-
- public double getT(double blocks) {
- if (length == 0) {
- calculateLength();
- }
-
- assert (blocks >= 0);
- assert (blocks <= length);
- if (blocks == 0) {
- return 0;
- }
- if (blocks == length) {
- return segments.length;
- }
- double current = 0;
- int i = 0;
-
- for (i = 0; i < segments.length; ++i) {
- current += segments[i].getCurveLength();
- if (current > blocks) {
- current -= segments[i].getCurveLength();
- break;
- }
- }
- if (i >= segments.length) {
- return segments.length;
- }
- return i + segments[i].getT(blocks - current);
- }
-
- public @NotNull Location getPoint(double point) {
- if (point >= segments.length) {
- return getPoint(segments.length - 1, 1);
- } else {
- return getPoint((int) Math.floor(point), point - Math.floor(point));
- }
- }
-
- public @NotNull Location getPoint(int n, double f) {
- assert (n < segments.length);
- assert (0 <= f && f <= 1);
- BezierSplineSegment segment = segments[n];
- return segment.getPoint(f);
- }
-
- public double getdTdS(double f) {
- if (f >= segments.length) {
- return segments[segments.length - 1].getdTdS(1);
- } else {
- return segments[(int) Math.floor(f)].getdTdS(f - Math.floor(f));
- }
- }
-
- public double getHAngle(double f) {
- assert (f <= segments.length);
- if (f >= segments.length) {
- return segments[segments.length - 1].getHAngle(1);
- } else {
- return segments[(int) Math.floor(f)].getHAngle(f - Math.floor(f));
- }
- }
-
- public void calculateControlPoints() {
- /*
- * Do not touch.
- */
- if (segments == null) {
- return;
- }
-
- if (segments.length == 0) {
- return;
- }
-
- Double xflat, yflat, zflat;
- xflat = knots[0].getX();
- yflat = knots[0].getY();
- zflat = knots[0].getZ();
- for (Location l : knots) {
- if (l.getBlockX() != xflat) {
- xflat = null;
- break;
- }
- }
- for (Location l : knots) {
- if (l.getBlockY() != yflat) {
- yflat = null;
- break;
- }
- }
- for (Location l : knots) {
- if (l.getBlockZ() != zflat) {
- zflat = null;
- break;
- }
- }
-
- if (segments.length == 1) {
- Location midpoint = new Location(segments[0].getP0().getWorld(), 0, 0, 0);
- midpoint
- .setX((segments[0].getP0().getX() + segments[0].getP3().getX()) / 2);
- midpoint
- .setY((segments[0].getP0().getY() + segments[0].getP3().getY()) / 2);
- midpoint
- .setZ((segments[0].getP0().getZ() + segments[0].getP3().getZ()) / 2);
- segments[0].setP1(midpoint);
- segments[0].setP2(midpoint.clone());
- } else {
- segments[0].setA(0);
- segments[0].setB(2);
- segments[0].setC(1);
- segments[0].getR().setX(knots[0].getX() + 2 * knots[1].getX());
- segments[0].getR().setY(knots[0].getY() + 2 * knots[1].getY());
- segments[0].getR().setZ(knots[0].getZ() + 2 * knots[1].getZ());
- int n = knots.length - 1;
- int i;
- float m;
-
- for (i = 1; i < n - 1; i++) {
- segments[i].setA(1);
- segments[i].setB(4);
- segments[i].setC(1);
- segments[i].getR().setX(4 * knots[i].getX() + 2 * knots[i + 1].getX());
- segments[i].getR().setY(4 * knots[i].getY() + 2 * knots[i + 1].getY());
- segments[i].getR().setZ(4 * knots[i].getZ() + 2 * knots[i + 1].getZ());
- }
-
- segments[n - 1].setA(2);
- segments[n - 1].setB(7);
- segments[n - 1].setC(0);
- segments[n - 1].getR().setX(8 * knots[n - 1].getX() + knots[n].getX());
- segments[n - 1].getR().setY(8 * knots[n - 1].getY() + knots[n].getY());
- segments[n - 1].getR().setZ(8 * knots[n - 1].getZ() + knots[n].getZ());
-
- for (i = 1; i < n; i++) {
- m = segments[i].getA() / segments[i - 1].getB();
- segments[i].setB(segments[i].getB() - m * segments[i - 1].getC());
- segments[i].getR().setX(
- segments[i].getR().getX() - m * segments[i - 1].getR().getX());
- segments[i].getR().setY(
- segments[i].getR().getY() - m * segments[i - 1].getR().getY());
- segments[i].getR().setZ(
- segments[i].getR().getZ() - m * segments[i - 1].getR().getZ());
- }
- segments[n - 1].getP1().setX(
- segments[n - 1].getR().getX() / segments[n - 1].getB());
- segments[n - 1].getP1().setY(
- segments[n - 1].getR().getY() / segments[n - 1].getB());
- segments[n - 1].getP1().setZ(
- segments[n - 1].getR().getZ() / segments[n - 1].getB());
-
- for (i = n - 2; i >= 0; i--) {
- segments[i].getP1().setX(
- (segments[i].getR().getX() - segments[i].getC()
- * segments[i + 1].getP1().getX())
- / segments[i].getB());
- segments[i].getP1().setY(
- (segments[i].getR().getY() - segments[i].getC()
- * segments[i + 1].getP1().getY())
- / segments[i].getB());
- segments[i].getP1().setZ(
- (segments[i].getR().getZ() - segments[i].getC()
- * segments[i + 1].getP1().getZ())
- / segments[i].getB());
- }
-
- for (i = 0; i < n - 1; i++) {
- segments[i].getP2().setX(
- 2 * knots[i + 1].getX() - segments[i + 1].getP1().getX());
- segments[i].getP2().setY(
- 2 * knots[i + 1].getY() - segments[i + 1].getP1().getY());
- segments[i].getP2().setZ(
- 2 * knots[i + 1].getZ() - segments[i + 1].getP1().getZ());
- }
- segments[n - 1].getP2().setX(
- 0.5 * (knots[n].getX() + segments[n - 1].getP1().getX()));
- segments[n - 1].getP2().setY(
- 0.5 * (knots[n].getY() + segments[n - 1].getP1().getY()));
- segments[n - 1].getP2().setZ(
- 0.5 * (knots[n].getZ() + segments[n - 1].getP1().getZ()));
- }
-
- if (xflat != null) {
- for (BezierSplineSegment cs : segments) {
- cs.setX(xflat);
- }
- }
- if (yflat != null) {
- for (BezierSplineSegment cs : segments) {
- cs.setY(yflat);
- }
- }
- if (zflat != null) {
- for (BezierSplineSegment cs : segments) {
- cs.setZ(zflat);
- }
- }
- }
-
- public void shift(@NotNull Vector vector) {
- for (Location location : knotsList) {
- location.add(vector);
- }
- recalculate();
- }
-
- public void scale(double d) {
- for (Location l : knotsList) {
- l.subtract(anchorPoint);
- l.multiply(d);
- l.add(anchorPoint);
- }
- recalculate();
- }
-
- public void scale(@NotNull Vector vector) {
- for (Location l : knotsList) {
- l.subtract(anchorPoint);
- l.setX(l.getX() * vector.getX());
- l.setY(l.getY() * vector.getY());
- l.setZ(l.getZ() * vector.getZ());
- l.add(anchorPoint);
- }
- recalculate();
- }
-
- public @Nullable World getWorld() {
- if (knots == null) {
- return null;
- }
- if (knots.length == 0) {
- return null;
- }
- return knots[0].getWorld();
- }
-
- @Override
- public String toString() {
- if (knots == null) {
- return "0 points.";
- }
- return knots.length + " points.";
- }
-
- public @NotNull String toName() {
- return "Curve";
- }
-
- public @NotNull BezierSpline emptySystem() {
- return new BezierSpline();
- }
-
- public @NotNull String toShorthand() {
- return "curve";
- }
-
-}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/utils/curve/BezierSplineSegment.java b/src/main/java/net/onelitefeather/bettergopaint/utils/curve/BezierSplineSegment.java
deleted file mode 100644
index 6e31b143..00000000
--- a/src/main/java/net/onelitefeather/bettergopaint/utils/curve/BezierSplineSegment.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * goPaint is designed to simplify painting inside of Minecraft.
- * Copyright (C) Arcaniax-Development
- * Copyright (C) Arcaniax team and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package net.onelitefeather.bettergopaint.utils.curve;
-
-import org.bukkit.Location;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.Objects;
-
-public class BezierSplineSegment {
-
- private final double[] lengths = new double[20];
- private @NotNull Location p0, p1, p2, p3;
- private float a, b, c;
- private @Nullable Double xFlat, yFlat, zFlat;
- private @NotNull Location r;
- private double curveLength;
-
- public BezierSplineSegment(@NotNull Location p0, @NotNull Location p3) {
- this.p0 = p0;
- this.p3 = p3;
- p1 = new Location(p0.getWorld(), 0, 0, 0);
- p2 = new Location(p0.getWorld(), 0, 0, 0);
- r = new Location(p0.getWorld(), 0, 0, 0);
- }
-
- public double getCurveLength() {
- return curveLength;
- }
-
- public void setX(double xflat2) {
- p0.setX(xflat2);
- p1.setX(xflat2);
- p2.setX(xflat2);
- p3.setX(xflat2);
- xFlat = xflat2;
- }
-
- public void setY(double yflat2) {
- p0.setY(yflat2);
- p1.setY(yflat2);
- p2.setY(yflat2);
- p3.setY(yflat2);
- yFlat = yflat2;
- }
-
- public void setZ(double zflat2) {
- p0.setZ(zflat2);
- p1.setZ(zflat2);
- p2.setZ(zflat2);
- p3.setZ(zflat2);
- zFlat = zflat2;
- }
-
- public void calculateCurveLength() {
- Location current = p0.clone();
- double step = 0.05;
- lengths[0] = 0;
- Location temp;
- for (int i = 1; i < 20; i++) {
- temp = getPoint(i * step);
- lengths[i] = lengths[i - 1] + temp.distance(current);
- current = temp;
- }
- curveLength = lengths[19];
- }
-
- public double getdXdT(double t) {
- assert (t >= 0);
- assert (t <= 1);
- return 3 * (1 - t) * (1 - t) * (p1.getX() - p0.getX()) + 6 * (1 - t) * t
- * (p2.getX() - p1.getX()) + 3 * t * t * (p3.getX() - p2.getX());
- }
-
- public double getdYdT(double t) {
- assert (t <= 1);
- return 3 * (1 - t) * (1 - t) * (p1.getY() - p0.getY()) + 6 * (1 - t) * t
- * (p2.getY() - p1.getY()) + 3 * t * t * (p3.getY() - p2.getY());
- }
-
- public double getdZdT(double t) {
- assert (t >= 0);
- assert (t <= 1);
- return 3 * (1 - t) * (1 - t) * (p1.getZ() - p0.getZ()) + 6 * (1 - t) * t
- * (p2.getZ() - p1.getZ()) + 3 * t * t * (p3.getZ() - p2.getZ());
- }
-
- public double getdTdS(double t) {
- double dZdT = getdZdT(t);
- double dXdT = getdXdT(t);
- double dYdT = getdYdT(t);
- return 1 / Math.sqrt(dZdT * dZdT + dXdT * dXdT + dYdT * dYdT);
- }
-
- public double getHAngle(double t) {
- // Positive x is 0, positive z is pi/2, negative x is pi, negative z is
- // 3*pi/2
- double dZdT = getdZdT(t);
- double dXdT = getdXdT(t);
- if (dXdT == 0) {
- if (dZdT < 0) {
- return Math.PI / 2;
- } else {
- return -Math.PI / 2;
- }
- }
-
- if (dXdT < 0) {
- return Math.PI + Math.atan(dZdT / dXdT);
- }
- return Math.atan(dZdT / dXdT);
- }
-
- public double getT(double d) {
- assert (d >= 0);
- assert (d <= curveLength);
- if (d == 0) {
- return 0;
- }
- if (d == curveLength) {
- return 1;
- }
- int i = 0;
- for (i = 0; i < 20; i++) {
- if (d == lengths[i]) {
- return i / 19d;
- }
- if (d < lengths[i]) {
- break;
- }
- }
- return (i + (d - lengths[i - 1]) / (lengths[i] - lengths[i - 1])) / 20;
- }
-
- public Location getPoint(double f) {
- Location result = new Location(p0.getWorld(), 0, 0, 0);
- result.setX(Objects.requireNonNullElseGet(xFlat, () -> (Math.pow(1 - f, 3) * p0.getX())
- + (3 * Math.pow(1 - f, 2) * f * p1.getX())
- + (3 * (1 - f) * f * f * p2.getX()) + (Math.pow(f, 3) * p3.getX())));
- result.setY(Objects.requireNonNullElseGet(yFlat, () -> (Math.pow(1 - f, 3) * p0.getY())
- + (3 * Math.pow(1 - f, 2) * f * p1.getY())
- + (3 * (1 - f) * f * f * p2.getY()) + (Math.pow(f, 3) * p3.getY())));
- result.setZ(Objects.requireNonNullElseGet(zFlat, () -> (Math.pow(1 - f, 3) * p0.getZ())
- + (3 * Math.pow(1 - f, 2) * f * p1.getZ())
- + (3 * (1 - f) * f * f * p2.getZ()) + (Math.pow(f, 3) * p3.getZ())));
- return result;
- }
-
- public double getLinearLength() {
- return p0.distance(p3);
- }
-
- public @NotNull Location getP0() {
- return p0;
- }
-
- public void setP0(@NotNull Location p0) {
- this.p0 = p0;
- }
-
- public @NotNull Location getP1() {
- return p1;
- }
-
- public void setP1(@NotNull Location p1) {
- this.p1 = p1;
- }
-
- public @NotNull Location getP2() {
- return p2;
- }
-
- public void setP2(@NotNull Location p2) {
- this.p2 = p2;
- }
-
- public @NotNull Location getP3() {
- return p3;
- }
-
- public void setP3(@NotNull Location p3) {
- this.p3 = p3;
- }
-
- public float getA() {
- return a;
- }
-
- public void setA(float a) {
- this.a = a;
- }
-
- public float getB() {
- return b;
- }
-
- public void setB(float b) {
- this.b = b;
- }
-
- public float getC() {
- return c;
- }
-
- public void setC(float c) {
- this.c = c;
- }
-
- public @NotNull Location getR() {
- return r;
- }
-
- public void setR(@NotNull Location r) {
- this.r = r;
- }
-
-}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/BetterGoPaint.java b/src/main/java/net/thenextlvl/gopaint/GoPaintPlugin.java
similarity index 64%
rename from src/main/java/net/onelitefeather/bettergopaint/BetterGoPaint.java
rename to src/main/java/net/thenextlvl/gopaint/GoPaintPlugin.java
index 0b951a45..b6f72993 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/BetterGoPaint.java
+++ b/src/main/java/net/thenextlvl/gopaint/GoPaintPlugin.java
@@ -16,22 +16,28 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint;
+package net.thenextlvl.gopaint;
import com.fastasyncworldedit.core.Fawe;
+import core.i18n.file.ComponentBundle;
+import lombok.Getter;
+import lombok.experimental.Accessors;
import net.kyori.adventure.text.minimessage.MiniMessage;
-import net.onelitefeather.bettergopaint.brush.PlayerBrushManager;
-import net.onelitefeather.bettergopaint.command.GoPaintCommand;
-import net.onelitefeather.bettergopaint.command.ReloadCommand;
-import net.onelitefeather.bettergopaint.listeners.ConnectListener;
-import net.onelitefeather.bettergopaint.listeners.InteractListener;
-import net.onelitefeather.bettergopaint.listeners.InventoryListener;
-import net.onelitefeather.bettergopaint.objects.other.Settings;
+import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
+import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
+import net.thenextlvl.gopaint.brush.PlayerBrushManager;
+import net.thenextlvl.gopaint.command.GoPaintCommand;
+import net.thenextlvl.gopaint.command.ReloadCommand;
+import net.thenextlvl.gopaint.listeners.ConnectListener;
+import net.thenextlvl.gopaint.listeners.InteractListener;
+import net.thenextlvl.gopaint.listeners.InventoryListener;
+import net.thenextlvl.gopaint.objects.other.Settings;
import org.bstats.bukkit.Metrics;
import org.bstats.charts.SimplePie;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
@@ -39,25 +45,36 @@
import org.incendo.cloud.bukkit.CloudBukkitCapabilities;
import org.incendo.cloud.execution.ExecutionCoordinator;
import org.incendo.cloud.paper.LegacyPaperCommandManager;
-import org.incendo.serverlib.ServerLib;
-import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
+import java.util.Locale;
import java.util.Objects;
import java.util.logging.Level;
-public class BetterGoPaint extends JavaPlugin implements Listener {
+@Getter
+@Accessors(fluent = true)
+public class GoPaintPlugin extends JavaPlugin implements Listener {
- public static final @NotNull String PAPER_DOCS = "https://jd.papermc.io/paper/1.20.6/org/bukkit/Material.html#enum-constant-summary";
+ public static final String PAPER_DOCS = "https://jd.papermc.io/paper/1.20.6/org/bukkit/Material.html#enum-constant-summary";
- public static final @NotNull String USE_PERMISSION = "bettergopaint.use";
- public static final @NotNull String ADMIN_PERMISSION = "bettergopaint.admin";
- public static final @NotNull String RELOAD_PERMISSION = "bettergopaint.command.admin.reload";
- public static final @NotNull String WORLD_BYPASS_PERMISSION = "bettergopaint.world.bypass";
+ public static final String USE_PERMISSION = "gopaint.use";
+ public static final String ADMIN_PERMISSION = "gopaint.admin";
+ public static final String RELOAD_PERMISSION = "gopaint.command.admin.reload";
+ public static final String WORLD_BYPASS_PERMISSION = "gopaint.world.bypass";
- private final @NotNull PlayerBrushManager brushManager = new PlayerBrushManager();
- private final @NotNull Metrics metrics = new Metrics(this, 18734);
+ private final File translations = new File(getDataFolder(), "translations");
+ private final ComponentBundle bundle = new ComponentBundle(translations, audience ->
+ audience instanceof Player player ? player.locale() : Locale.US)
+ .register("messages", Locale.US)
+ .register("messages_german", Locale.GERMANY)
+ .miniMessage(bundle -> MiniMessage.builder().tags(TagResolver.resolver(
+ TagResolver.standard(),
+ Placeholder.component("prefix", bundle.component(Locale.US, "prefix"))
+ )).build());
+
+ private final PlayerBrushManager brushManager = new PlayerBrushManager(bundle);
+ private final Metrics metrics = new Metrics(this, 22279);
@Override
public void onLoad() {
@@ -69,12 +86,9 @@ public void onLoad() {
@Override
public void onEnable() {
- // Check if we are in a safe environment
- ServerLib.checkUnsafeForks();
-
- // disable if goPaint and BetterGoPaint are installed simultaneously
+ // disable if goPaint and goPaintAdvanced are installed simultaneously
if (hasOriginalGoPaint()) {
- getComponentLogger().error("BetterGoPaint is a replacement for goPaint. Please use one instead of both");
+ getComponentLogger().error("goPaintAdvanced is a replacement for goPaint. Please use one instead of both");
getComponentLogger().error("This plugin is now disabling to prevent future errors");
getServer().getPluginManager().disablePlugin(this);
return;
@@ -89,11 +103,6 @@ public void onEnable() {
getServer().getPluginManager().disablePlugin(this);
}
- //noinspection UnnecessaryUnicodeEscape
- getComponentLogger().info(MiniMessage.miniMessage().deserialize(
- "Made with \u2665 in Germany"
- ));
-
registerListeners();
registerCommands();
}
@@ -120,9 +129,9 @@ private void registerCommands() {
private void registerListeners() {
PluginManager pm = getServer().getPluginManager();
- pm.registerEvents(new InventoryListener(getBrushManager()), this);
+ pm.registerEvents(new InventoryListener(brushManager()), this);
pm.registerEvents(new InteractListener(this), this);
- pm.registerEvents(new ConnectListener(getBrushManager()), this);
+ pm.registerEvents(new ConnectListener(brushManager()), this);
}
private boolean hasOriginalGoPaint() {
@@ -147,8 +156,4 @@ private boolean hasOriginalGoPaint() {
}
}
- public @NotNull PlayerBrushManager getBrushManager() {
- return brushManager;
- }
-
}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/brush/BrushSettings.java b/src/main/java/net/thenextlvl/gopaint/brush/BrushSettings.java
similarity index 96%
rename from src/main/java/net/onelitefeather/bettergopaint/brush/BrushSettings.java
rename to src/main/java/net/thenextlvl/gopaint/brush/BrushSettings.java
index d0201a5b..69da3d7e 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/brush/BrushSettings.java
+++ b/src/main/java/net/thenextlvl/gopaint/brush/BrushSettings.java
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.brush;
+package net.thenextlvl.gopaint.brush;
-import net.onelitefeather.bettergopaint.objects.brush.Brush;
-import net.onelitefeather.bettergopaint.objects.other.SurfaceMode;
+import net.thenextlvl.gopaint.objects.brush.Brush;
+import net.thenextlvl.gopaint.objects.other.SurfaceMode;
import org.bukkit.Axis;
import org.bukkit.Material;
import org.jetbrains.annotations.ApiStatus;
diff --git a/src/main/java/net/onelitefeather/bettergopaint/brush/ExportedPlayerBrush.java b/src/main/java/net/thenextlvl/gopaint/brush/ExportedPlayerBrush.java
similarity index 74%
rename from src/main/java/net/onelitefeather/bettergopaint/brush/ExportedPlayerBrush.java
rename to src/main/java/net/thenextlvl/gopaint/brush/ExportedPlayerBrush.java
index 1e432a18..4c7a7168 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/brush/ExportedPlayerBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/brush/ExportedPlayerBrush.java
@@ -16,30 +16,24 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.brush;
+package net.thenextlvl.gopaint.brush;
-import net.onelitefeather.bettergopaint.objects.brush.Brush;
-import net.onelitefeather.bettergopaint.objects.other.Settings;
-import net.onelitefeather.bettergopaint.objects.other.SurfaceMode;
+import net.thenextlvl.gopaint.objects.brush.Brush;
+import net.thenextlvl.gopaint.objects.other.Settings;
+import net.thenextlvl.gopaint.objects.other.SurfaceMode;
import org.bukkit.Axis;
import org.bukkit.Material;
import org.bukkit.inventory.meta.ItemMeta;
-import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.security.SecureRandom;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Random;
+import java.util.*;
public record ExportedPlayerBrush(
- @NotNull Brush brush,
+ Brush brush,
@Nullable Material mask,
- @NotNull List blocks,
- @NotNull Axis axis,
+ List blocks,
+ Axis axis,
SurfaceMode surfaceMode,
int size,
int chance,
@@ -51,9 +45,9 @@ public record ExportedPlayerBrush(
double angleHeightDifference
) implements BrushSettings {
- private static final @NotNull Random RANDOM = new SecureRandom();
+ private static final Random RANDOM = new SecureRandom();
- public ExportedPlayerBrush(@NotNull Builder builder) {
+ public ExportedPlayerBrush(Builder builder) {
this(
builder.brush,
builder.mask,
@@ -82,12 +76,12 @@ public boolean maskEnabled() {
}
@Override
- public @NotNull Material randomBlock() {
+ public Material randomBlock() {
return blocks().get(random().nextInt(blocks().size()));
}
@Override
- public @NotNull Random random() {
+ public Random random() {
return RANDOM;
}
@@ -97,11 +91,11 @@ public static Builder builder(Brush brush) {
public static final class Builder {
- private final @NotNull Brush brush;
+ private final Brush brush;
- private @NotNull List blocks = Collections.emptyList();
- private @NotNull Axis axis = Settings.settings().GENERIC.DEFAULT_AXIS;
- private @NotNull SurfaceMode surfaceMode = SurfaceMode.DISABLED;
+ private List blocks = Collections.emptyList();
+ private Axis axis = Settings.settings().GENERIC.DEFAULT_AXIS;
+ private SurfaceMode surfaceMode = SurfaceMode.DISABLED;
private @Nullable Material mask;
@@ -114,78 +108,78 @@ public static final class Builder {
private int mixingStrength;
private double angleHeightDifference;
- private Builder(@NotNull Brush brush) {
+ private Builder(Brush brush) {
this.brush = brush;
}
- public @NotNull Builder surfaceMode(SurfaceMode surfaceMode) {
+ public Builder surfaceMode(SurfaceMode surfaceMode) {
this.surfaceMode = surfaceMode;
return this;
}
- public @NotNull Builder blocks(@NotNull List blocks) {
+ public Builder blocks(List blocks) {
this.blocks = blocks;
return this;
}
- public @NotNull Builder mask(@Nullable Material mask) {
+ public Builder mask(@Nullable Material mask) {
this.mask = mask;
return this;
}
- public @NotNull Builder size(int size) {
+ public Builder size(int size) {
this.size = size;
return this;
}
- public @NotNull Builder chance(int chance) {
+ public Builder chance(int chance) {
this.chance = chance;
return this;
}
- public @NotNull Builder thickness(int thickness) {
+ public Builder thickness(int thickness) {
this.thickness = thickness;
return this;
}
- public @NotNull Builder angleDistance(int angleDistance) {
+ public Builder angleDistance(int angleDistance) {
this.angleDistance = angleDistance;
return this;
}
- public @NotNull Builder fractureDistance(int fractureDistance) {
+ public Builder fractureDistance(int fractureDistance) {
this.fractureDistance = fractureDistance;
return this;
}
- public @NotNull Builder falloffStrength(int falloffStrength) {
+ public Builder falloffStrength(int falloffStrength) {
this.falloffStrength = falloffStrength;
return this;
}
- public @NotNull Builder mixingStrength(int mixingStrength) {
+ public Builder mixingStrength(int mixingStrength) {
this.mixingStrength = mixingStrength;
return this;
}
- public @NotNull Builder angleHeightDifference(double angleHeightDifference) {
+ public Builder angleHeightDifference(double angleHeightDifference) {
this.angleHeightDifference = angleHeightDifference;
return this;
}
- public @NotNull Builder axis(@NotNull Axis axis) {
+ public Builder axis(Axis axis) {
this.axis = axis;
return this;
}
- public @NotNull ExportedPlayerBrush build() {
+ public ExportedPlayerBrush build() {
return new ExportedPlayerBrush(this);
}
}
@Deprecated(forRemoval = true)
- public static ExportedPlayerBrush parse(@NotNull Brush brush, @NotNull ItemMeta itemMeta) {
+ public static ExportedPlayerBrush parse(Brush brush, ItemMeta itemMeta) {
ExportedPlayerBrush.Builder builder = ExportedPlayerBrush.builder(brush);
Optional.ofNullable(itemMeta.getLore()).ifPresent(lore -> lore.stream()
.map(line -> line.replace("§8", ""))
diff --git a/src/main/java/net/onelitefeather/bettergopaint/brush/PlayerBrush.java b/src/main/java/net/thenextlvl/gopaint/brush/PlayerBrush.java
similarity index 79%
rename from src/main/java/net/onelitefeather/bettergopaint/brush/PlayerBrush.java
rename to src/main/java/net/thenextlvl/gopaint/brush/PlayerBrush.java
index 92772926..7418d882 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/brush/PlayerBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/brush/PlayerBrush.java
@@ -16,24 +16,19 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.brush;
+package net.thenextlvl.gopaint.brush;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextDecoration;
-import net.onelitefeather.bettergopaint.objects.brush.AngleBrush;
-import net.onelitefeather.bettergopaint.objects.brush.Brush;
-import net.onelitefeather.bettergopaint.objects.brush.DiscBrush;
-import net.onelitefeather.bettergopaint.objects.brush.FractureBrush;
-import net.onelitefeather.bettergopaint.objects.brush.GradientBrush;
-import net.onelitefeather.bettergopaint.objects.brush.OverlayBrush;
-import net.onelitefeather.bettergopaint.objects.brush.SplatterBrush;
-import net.onelitefeather.bettergopaint.objects.brush.SprayBrush;
-import net.onelitefeather.bettergopaint.objects.brush.UnderlayBrush;
-import net.onelitefeather.bettergopaint.objects.other.Settings;
-import net.onelitefeather.bettergopaint.objects.other.SurfaceMode;
-import net.onelitefeather.bettergopaint.utils.GUI;
+import net.thenextlvl.gopaint.objects.brush.*;
+import net.thenextlvl.gopaint.objects.other.Settings;
+import net.thenextlvl.gopaint.objects.other.SurfaceMode;
+import net.thenextlvl.gopaint.utils.GUI;
import org.bukkit.Axis;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
@@ -41,7 +36,6 @@
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
-import org.jetbrains.annotations.NotNull;
import java.security.SecureRandom;
import java.util.ArrayList;
@@ -52,10 +46,13 @@
/**
* The PlayerBrush class represents the brush settings of a player.
*/
+@Getter
+@Setter
+@Accessors(fluent = true)
public final class PlayerBrush implements BrushSettings {
- private final @NotNull PlayerBrushManager brushManager;
- private final @NotNull Random random = new SecureRandom();
+ private final PlayerBrushManager brushManager;
+ private final Random random = new SecureRandom();
private boolean maskEnabled;
private boolean enabled;
@@ -67,16 +64,16 @@ public final class PlayerBrush implements BrushSettings {
private int falloffStrength;
private int mixingStrength;
private double angleHeightDifference;
- private @NotNull Axis axis;
- private @NotNull SurfaceMode surfaceMode;
+ private Axis axis;
+ private SurfaceMode surfaceMode;
- private @NotNull Brush brush;
- private @NotNull Material mask;
- private final @NotNull List blocks = new ArrayList<>();
+ private Brush brush;
+ private Material mask;
+ private final List blocks = new ArrayList<>();
- private final @NotNull Inventory gui;
+ private final Inventory gui;
- public PlayerBrush(@NotNull PlayerBrushManager brushManager) {
+ public PlayerBrush(PlayerBrushManager brushManager) {
this.brushManager = brushManager;
surfaceMode = Settings.settings().GENERIC.SURFACE_MODE;
@@ -97,93 +94,10 @@ public PlayerBrush(@NotNull PlayerBrushManager brushManager) {
gui = GUI.create(this);
}
- public @NotNull Material randomBlock() {
+ public Material randomBlock() {
return blocks().get(random.nextInt(blocks().size()));
}
- @Override
- public @NotNull Brush brush() {
- return brush;
- }
-
- public void setBrush(@NotNull Brush brush) {
- this.brush = brush;
- }
-
- @Override
- public @NotNull Random random() {
- return random;
- }
-
- @Override
- public int falloffStrength() {
- return falloffStrength;
- }
-
- @Override
- public int mixingStrength() {
- return mixingStrength;
- }
-
- @Override
- public double angleHeightDifference() {
- return this.angleHeightDifference;
- }
-
- @Override
- public int angleDistance() {
- return this.angleDistance;
- }
-
- @Override
- public int fractureDistance() {
- return this.fractureDistance;
- }
-
- @Override
- public @NotNull Material mask() {
- return mask;
- }
-
- @Override
- public @NotNull List blocks() {
- return blocks;
- }
-
- @Override
- public int size() {
- return size;
- }
-
- public boolean enabled() {
- return enabled;
- }
-
- @Override
- public boolean maskEnabled() {
- return maskEnabled;
- }
-
- @Override
- public int chance() {
- return chance;
- }
-
- @Override
- public SurfaceMode surfaceMode() {
- return surfaceMode;
- }
-
- @Override
- public int thickness() {
- return thickness;
- }
-
- @Override
- public @NotNull Axis axis() {
- return axis;
- }
-
public void updateInventory() {
GUI.update(gui, this);
}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/brush/PlayerBrushManager.java b/src/main/java/net/thenextlvl/gopaint/brush/PlayerBrushManager.java
similarity index 64%
rename from src/main/java/net/onelitefeather/bettergopaint/brush/PlayerBrushManager.java
rename to src/main/java/net/thenextlvl/gopaint/brush/PlayerBrushManager.java
index f08d4e85..0950f634 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/brush/PlayerBrushManager.java
+++ b/src/main/java/net/thenextlvl/gopaint/brush/PlayerBrushManager.java
@@ -16,23 +16,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.brush;
+package net.thenextlvl.gopaint.brush;
import com.google.common.collect.ImmutableList;
-import net.onelitefeather.bettergopaint.objects.brush.AngleBrush;
-import net.onelitefeather.bettergopaint.objects.brush.Brush;
-import net.onelitefeather.bettergopaint.objects.brush.BucketBrush;
-import net.onelitefeather.bettergopaint.objects.brush.DiscBrush;
-import net.onelitefeather.bettergopaint.objects.brush.FractureBrush;
-import net.onelitefeather.bettergopaint.objects.brush.GradientBrush;
-import net.onelitefeather.bettergopaint.objects.brush.OverlayBrush;
-import net.onelitefeather.bettergopaint.objects.brush.PaintBrush;
-import net.onelitefeather.bettergopaint.objects.brush.SphereBrush;
-import net.onelitefeather.bettergopaint.objects.brush.SplatterBrush;
-import net.onelitefeather.bettergopaint.objects.brush.SprayBrush;
-import net.onelitefeather.bettergopaint.objects.brush.UnderlayBrush;
+import core.i18n.file.ComponentBundle;
+import lombok.Getter;
+import net.thenextlvl.gopaint.objects.brush.*;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.HashMap;
@@ -45,21 +35,24 @@
* The PlayerBrushManager class manages the brush selection for each player.
*/
public class PlayerBrushManager {
+ private final HashMap playerBrushes = new HashMap<>();
+ private final @Getter List brushes;
- private final @NotNull HashMap playerBrushes = new HashMap<>();
- private final @NotNull List brushes = ImmutableList.of(
- new SphereBrush(),
- new SprayBrush(),
- new SplatterBrush(),
- new DiscBrush(),
- new BucketBrush(),
- new AngleBrush(),
- new OverlayBrush(),
- new UnderlayBrush(),
- new FractureBrush(),
- new GradientBrush(),
- new PaintBrush()
- );
+ public PlayerBrushManager(ComponentBundle bundle) {
+ brushes = ImmutableList.of(
+ new SphereBrush(),
+ new SprayBrush(),
+ new SplatterBrush(),
+ new DiscBrush(),
+ new BucketBrush(),
+ new AngleBrush(),
+ new OverlayBrush(),
+ new UnderlayBrush(),
+ new FractureBrush(),
+ new GradientBrush(),
+ new PaintBrush(bundle)
+ );
+ }
/**
* Retrieves the brush for the given player.
@@ -67,7 +60,7 @@ public class PlayerBrushManager {
* @param player The player for which to retrieve the brush.
* @return The brush for the specified player.
*/
- public @NotNull PlayerBrush getBrush(@NotNull Player player) {
+ public PlayerBrush getBrush(Player player) {
return playerBrushes.computeIfAbsent(player.getUniqueId(), ignored -> new PlayerBrush(this));
}
@@ -78,7 +71,7 @@ public class PlayerBrushManager {
* @param brush The brush for which to retrieve the lore.
* @return The lore for the specified brush.
*/
- public @NotNull String getBrushLore(@NotNull Brush brush) {
+ public String getBrushLore(Brush brush) {
return brushes.stream().map(current -> {
if (current.equals(brush)) {
return "§e" + current.getName() + "\n";
@@ -94,27 +87,18 @@ public class PlayerBrushManager {
* @param name The name of the brush to look for.
* @return An optional containing the brush handler, or empty if not found.
*/
- public @NotNull Optional getBrushHandler(String name) {
+ public Optional getBrushHandler(String name) {
return brushes.stream()
.filter(brush -> name.contains(brush.getName()))
.findAny();
}
- /**
- * Retrieves the list of available brushes.
- *
- * @return The list of available brushes.
- */
- public @NotNull List getBrushes() {
- return brushes;
- }
-
/**
* Removes the player from the {@link #playerBrushes} map.
*
* @param player The player who should be removed.
*/
- public void removeBrush(@NotNull Player player) {
+ public void removeBrush(Player player) {
playerBrushes.remove(player.getUniqueId());
}
@@ -124,7 +108,7 @@ public void removeBrush(@NotNull Player player) {
* @param brush The current brush, if null returns the first brush in the list.
* @return The next brush in the list, or the first brush if the current brush is null.
*/
- public @NotNull Brush cycleForward(@Nullable Brush brush) {
+ public Brush cycleForward(@Nullable Brush brush) {
if (brush == null) {
return brushes.getFirst();
}
@@ -141,7 +125,7 @@ public void removeBrush(@NotNull Player player) {
* @param brush The current brush.
* @return The previous brush in the list, or the first brush if the current brush is null.
*/
- public @NotNull Brush cycleBack(@Nullable Brush brush) {
+ public Brush cycleBack(@Nullable Brush brush) {
if (brush == null) {
return brushes.getFirst();
}
diff --git a/src/main/java/net/thenextlvl/gopaint/brush/package-info.java b/src/main/java/net/thenextlvl/gopaint/brush/package-info.java
new file mode 100644
index 00000000..3377417b
--- /dev/null
+++ b/src/main/java/net/thenextlvl/gopaint/brush/package-info.java
@@ -0,0 +1,10 @@
+@TypesAreNotNullByDefault
+@FieldsAreNotNullByDefault
+@MethodsReturnNotNullByDefault
+@ParametersAreNotNullByDefault
+package net.thenextlvl.gopaint.brush;
+
+import core.annotation.FieldsAreNotNullByDefault;
+import core.annotation.MethodsReturnNotNullByDefault;
+import core.annotation.ParametersAreNotNullByDefault;
+import core.annotation.TypesAreNotNullByDefault;
\ No newline at end of file
diff --git a/src/main/java/net/onelitefeather/bettergopaint/command/GoPaintCommand.java b/src/main/java/net/thenextlvl/gopaint/command/GoPaintCommand.java
similarity index 52%
rename from src/main/java/net/onelitefeather/bettergopaint/command/GoPaintCommand.java
rename to src/main/java/net/thenextlvl/gopaint/command/GoPaintCommand.java
index eb4b1d18..fba8dddc 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/command/GoPaintCommand.java
+++ b/src/main/java/net/thenextlvl/gopaint/command/GoPaintCommand.java
@@ -16,105 +16,96 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.command;
+package net.thenextlvl.gopaint.command;
-import net.onelitefeather.bettergopaint.BetterGoPaint;
-import net.onelitefeather.bettergopaint.objects.other.Settings;
-import net.onelitefeather.bettergopaint.brush.PlayerBrush;
+import lombok.Getter;
+import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
+import net.thenextlvl.gopaint.GoPaintPlugin;
+import net.thenextlvl.gopaint.brush.PlayerBrush;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginIdentifiableCommand;
import org.bukkit.entity.Player;
-import org.bukkit.plugin.Plugin;
-import org.jetbrains.annotations.NotNull;
import java.util.List;
+@Getter
public class GoPaintCommand extends Command implements PluginIdentifiableCommand {
+ private final GoPaintPlugin plugin;
- private final BetterGoPaint plugin;
-
- public GoPaintCommand(BetterGoPaint main) {
+ public GoPaintCommand(GoPaintPlugin main) {
super("gopaint", "goPaint command", "/gp size|toggle|info|reload", List.of("gp"));
plugin = main;
}
@Override
- public boolean execute(
- @NotNull final CommandSender sender,
- @NotNull final String commandLabel,
- final @NotNull String[] args
- ) {
+ public boolean execute(CommandSender sender, String commandLabel, String[] args) {
if (!(sender instanceof final Player p)) {
return false;
}
- PlayerBrush pb = plugin.getBrushManager().getBrush(p);
- String prefix = Settings.settings().GENERIC.PREFIX;
- if (!p.hasPermission(BetterGoPaint.USE_PERMISSION)) {
- p.sendRichMessage(prefix + "You are lacking the permission bettergopaint.use");
+ PlayerBrush pb = plugin.brushManager().getBrush(p);
+ if (!p.hasPermission(GoPaintPlugin.USE_PERMISSION)) {
+ plugin.bundle().sendMessage(p, "command.gopaint.permission");
return true;
}
if (args.length == 0) {
- if (p.hasPermission(BetterGoPaint.ADMIN_PERMISSION)) {
- p.sendRichMessage(prefix + "/gp size|toggle|info|reload");
+ if (p.hasPermission(GoPaintPlugin.ADMIN_PERMISSION)) {
+ plugin.bundle().sendMessage(p, "command.gopaint.usage.admin");
return true;
}
- p.sendRichMessage(prefix + "/gp size|toggle|info");
+ plugin.bundle().sendMessage(p, "command.gopaint.usage");
return true;
} else if (args.length == 1) {
if (args[0].equalsIgnoreCase("size")) {
- p.sendRichMessage(prefix + "/gp size [number]");
+ plugin.bundle().sendMessage(p, "command.gopaint.usage.size");
return true;
} else if (args[0].equalsIgnoreCase("toggle")) {
if (pb.enabled()) {
pb.toggle();
- p.sendRichMessage(prefix + "Disabled brush");
+ plugin.bundle().sendMessage(p, "command.gopaint.brush.disabled");
} else {
pb.toggle();
- p.sendRichMessage(prefix + "Enabled brush");
+ plugin.bundle().sendMessage(p, "command.gopaint.brush.enabled");
}
return true;
} else if ((args[0].equalsIgnoreCase("reload") || args[0].equalsIgnoreCase("r")) && p.hasPermission(
- BetterGoPaint.ADMIN_PERMISSION)) {
+ GoPaintPlugin.ADMIN_PERMISSION)) {
plugin.reloadConfig();
- p.sendRichMessage(prefix + "Reloaded");
+ plugin.bundle().sendMessage(p, "command.gopaint.reloaded");
return true;
} else if (args[0].equalsIgnoreCase("info") || args[0].equalsIgnoreCase("i")) {
- p.sendRichMessage(prefix + "Created by: TheMeinerLP");
- p.sendRichMessage(prefix + "Links: Twitter");
+ plugin.bundle().sendMessage(p, "command.gopaint.info.creator");
+ plugin.bundle().sendMessage(p, "command.gopaint.info.link");
return true;
}
- if (p.hasPermission(BetterGoPaint.ADMIN_PERMISSION)) {
- p.sendRichMessage(prefix + "/gp size|toggle|info|reload");
+ if (p.hasPermission(GoPaintPlugin.ADMIN_PERMISSION)) {
+ plugin.bundle().sendMessage(p, "command.gopaint.usage.admin");
return true;
}
- p.sendRichMessage(prefix + "/gp size|toggle|info");
+ plugin.bundle().sendMessage(p, "command.gopaint.usage");
return true;
} else if (args.length == 2) {
if (args[0].equalsIgnoreCase("size") || args[0].equalsIgnoreCase("s")) {
try {
int sizeAmount = Integer.parseInt(args[1]);
pb.setSize(sizeAmount);
- p.sendRichMessage(prefix + "Size set to: " + pb.size());
+ plugin.bundle().sendMessage(p, "command.gopaint.brush.size",
+ Placeholder.parsed("size", String.valueOf(pb.size()))
+ );
return true;
} catch (Exception e) {
- p.sendRichMessage(prefix + "/gb size [number]");
+ plugin.bundle().sendMessage(p, "command.gopaint.usage.size");
return true;
}
}
- if (p.hasPermission(BetterGoPaint.ADMIN_PERMISSION)) {
- p.sendRichMessage(prefix + "/gp size|toggle|info|reload");
+ if (p.hasPermission(GoPaintPlugin.ADMIN_PERMISSION)) {
+ plugin.bundle().sendMessage(p, "command.gopaint.usage.admin");
return true;
}
- p.sendRichMessage(prefix + "/gp size|toggle|info");
+ plugin.bundle().sendMessage(p, "command.gopaint.usage");
return true;
}
return false;
}
- @Override
- public @NotNull Plugin getPlugin() {
- return plugin;
- }
-
}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/command/ReloadCommand.java b/src/main/java/net/thenextlvl/gopaint/command/ReloadCommand.java
similarity index 74%
rename from src/main/java/net/onelitefeather/bettergopaint/command/ReloadCommand.java
rename to src/main/java/net/thenextlvl/gopaint/command/ReloadCommand.java
index 184cd516..d36bcb7f 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/command/ReloadCommand.java
+++ b/src/main/java/net/thenextlvl/gopaint/command/ReloadCommand.java
@@ -16,24 +16,21 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.command;
+package net.thenextlvl.gopaint.command;
-import net.onelitefeather.bettergopaint.BetterGoPaint;
+import lombok.RequiredArgsConstructor;
+import net.thenextlvl.gopaint.GoPaintPlugin;
import org.bukkit.entity.Player;
import org.incendo.cloud.annotations.Command;
import org.incendo.cloud.annotations.Permission;
+@RequiredArgsConstructor
public final class ReloadCommand {
-
- private final BetterGoPaint betterGoPaint;
-
- public ReloadCommand(final BetterGoPaint betterGoPaint) {
- this.betterGoPaint = betterGoPaint;
- }
+ private final GoPaintPlugin plugin;
@Command("bgp|gp reload")
- @Permission(BetterGoPaint.RELOAD_PERMISSION)
+ @Permission(GoPaintPlugin.RELOAD_PERMISSION)
public void onReload(Player player) {
- betterGoPaint.reloadConfig();
+ plugin.reloadConfig();
}
}
diff --git a/src/main/java/net/thenextlvl/gopaint/command/package-info.java b/src/main/java/net/thenextlvl/gopaint/command/package-info.java
new file mode 100644
index 00000000..f602b2b3
--- /dev/null
+++ b/src/main/java/net/thenextlvl/gopaint/command/package-info.java
@@ -0,0 +1,11 @@
+
+@TypesAreNotNullByDefault
+@FieldsAreNotNullByDefault
+@MethodsReturnNotNullByDefault
+@ParametersAreNotNullByDefault
+package net.thenextlvl.gopaint.command;
+
+import core.annotation.FieldsAreNotNullByDefault;
+import core.annotation.MethodsReturnNotNullByDefault;
+import core.annotation.ParametersAreNotNullByDefault;
+import core.annotation.TypesAreNotNullByDefault;
\ No newline at end of file
diff --git a/src/main/java/net/onelitefeather/bettergopaint/listeners/ConnectListener.java b/src/main/java/net/thenextlvl/gopaint/listeners/ConnectListener.java
similarity index 84%
rename from src/main/java/net/onelitefeather/bettergopaint/listeners/ConnectListener.java
rename to src/main/java/net/thenextlvl/gopaint/listeners/ConnectListener.java
index 22d80899..5254bf6a 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/listeners/ConnectListener.java
+++ b/src/main/java/net/thenextlvl/gopaint/listeners/ConnectListener.java
@@ -16,25 +16,21 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.listeners;
+package net.thenextlvl.gopaint.listeners;
-import net.onelitefeather.bettergopaint.brush.PlayerBrushManager;
+import lombok.RequiredArgsConstructor;
+import net.thenextlvl.gopaint.brush.PlayerBrushManager;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerQuitEvent;
+@RequiredArgsConstructor
public class ConnectListener implements Listener {
-
private final PlayerBrushManager brushManager;
- public ConnectListener(PlayerBrushManager brushManager) {
- this.brushManager = brushManager;
- }
-
@EventHandler(priority = EventPriority.LOWEST)
public void onQuit(PlayerQuitEvent event) {
brushManager.removeBrush(event.getPlayer());
}
-
}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/listeners/InteractListener.java b/src/main/java/net/thenextlvl/gopaint/listeners/InteractListener.java
similarity index 72%
rename from src/main/java/net/onelitefeather/bettergopaint/listeners/InteractListener.java
rename to src/main/java/net/thenextlvl/gopaint/listeners/InteractListener.java
index 950da9f3..bd28bccc 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/listeners/InteractListener.java
+++ b/src/main/java/net/thenextlvl/gopaint/listeners/InteractListener.java
@@ -16,16 +16,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.listeners;
+package net.thenextlvl.gopaint.listeners;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
+import lombok.RequiredArgsConstructor;
import net.kyori.adventure.text.TextComponent;
-import net.onelitefeather.bettergopaint.BetterGoPaint;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.brush.ExportedPlayerBrush;
-import net.onelitefeather.bettergopaint.brush.PlayerBrush;
-import net.onelitefeather.bettergopaint.objects.brush.Brush;
-import net.onelitefeather.bettergopaint.objects.other.Settings;
+import net.thenextlvl.gopaint.GoPaintPlugin;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.brush.ExportedPlayerBrush;
+import net.thenextlvl.gopaint.brush.PlayerBrush;
+import net.thenextlvl.gopaint.objects.brush.Brush;
+import net.thenextlvl.gopaint.objects.other.Settings;
import org.bukkit.FluidCollisionMode;
import org.bukkit.Location;
import org.bukkit.block.Block;
@@ -40,19 +41,15 @@
import java.util.Optional;
+@RequiredArgsConstructor
public final class InteractListener implements Listener {
-
- private final BetterGoPaint plugin;
-
- public InteractListener(BetterGoPaint plugin) {
- this.plugin = plugin;
- }
+ private final GoPaintPlugin plugin;
@EventHandler(priority = EventPriority.LOWEST)
public void onClick(PlayerInteractEvent event) {
Player player = event.getPlayer();
- if (!player.hasPermission(BetterGoPaint.USE_PERMISSION)) {
+ if (!player.hasPermission(GoPaintPlugin.USE_PERMISSION)) {
return;
}
@@ -62,7 +59,7 @@ public void onClick(PlayerInteractEvent event) {
}
if (event.getAction().isLeftClick() && item.getType() == Settings.settings().GENERIC.DEFAULT_BRUSH) {
- PlayerBrush brush = plugin.getBrushManager().getBrush(player);
+ PlayerBrush brush = plugin.brushManager().getBrush(player);
player.openInventory(brush.getInventory());
event.setCancelled(true);
return;
@@ -85,10 +82,8 @@ public void onClick(PlayerInteractEvent event) {
return;
}
- final boolean hasNotWorldBaypassPermission = !player.hasPermission(BetterGoPaint.WORLD_BYPASS_PERMISSION);
-
- if (hasNotWorldBaypassPermission && Settings.settings().GENERIC.DISABLED_WORLDS
- .contains(location.getWorld().getName())) {
+ if (!player.hasPermission(GoPaintPlugin.WORLD_BYPASS_PERMISSION)
+ && Settings.settings().GENERIC.DISABLED_WORLDS.contains(location.getWorld().getName())) {
return;
}
@@ -98,12 +93,12 @@ public void onClick(PlayerInteractEvent event) {
if (itemMeta != null && itemMeta.hasLore() && itemMeta.displayName() instanceof TextComponent name) {
- Optional brush = plugin.getBrushManager().getBrushHandler(name.content());
+ Optional brush = plugin.brushManager().getBrushHandler(name.content());
//noinspection removal
brushSettings = brush.map(current -> ExportedPlayerBrush.parse(current, itemMeta)).orElse(null);
} else if (item.getType().equals(Settings.settings().GENERIC.DEFAULT_BRUSH)) {
- brushSettings = plugin.getBrushManager().getBrush(player);
+ brushSettings = plugin.brushManager().getBrush(player);
} else {
return;
}
@@ -117,10 +112,7 @@ public void onClick(PlayerInteractEvent event) {
() -> brushSettings.brush().paint(location, player, brushSettings), false, true
);
} else {
- player.sendRichMessage(
- Settings.settings().GENERIC.PREFIX + "Your brush is disabled, left click to enable the brush."
- );
+ plugin.bundle().sendMessage(player, "brush.disabled");
}
}
-
}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/listeners/InventoryListener.java b/src/main/java/net/thenextlvl/gopaint/listeners/InventoryListener.java
similarity index 89%
rename from src/main/java/net/onelitefeather/bettergopaint/listeners/InventoryListener.java
rename to src/main/java/net/thenextlvl/gopaint/listeners/InventoryListener.java
index 431ccc85..e47d1109 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/listeners/InventoryListener.java
+++ b/src/main/java/net/thenextlvl/gopaint/listeners/InventoryListener.java
@@ -16,23 +16,24 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.listeners;
+package net.thenextlvl.gopaint.listeners;
+import lombok.RequiredArgsConstructor;
import net.kyori.adventure.text.TextComponent;
-import net.onelitefeather.bettergopaint.brush.PlayerBrush;
-import net.onelitefeather.bettergopaint.brush.PlayerBrushManager;
-import net.onelitefeather.bettergopaint.objects.brush.AngleBrush;
-import net.onelitefeather.bettergopaint.objects.brush.Brush;
-import net.onelitefeather.bettergopaint.objects.brush.DiscBrush;
-import net.onelitefeather.bettergopaint.objects.brush.FractureBrush;
-import net.onelitefeather.bettergopaint.objects.brush.GradientBrush;
-import net.onelitefeather.bettergopaint.objects.brush.OverlayBrush;
-import net.onelitefeather.bettergopaint.objects.brush.PaintBrush;
-import net.onelitefeather.bettergopaint.objects.brush.SplatterBrush;
-import net.onelitefeather.bettergopaint.objects.brush.SprayBrush;
-import net.onelitefeather.bettergopaint.objects.brush.UnderlayBrush;
-import net.onelitefeather.bettergopaint.objects.other.Settings;
-import net.onelitefeather.bettergopaint.utils.GUI;
+import net.thenextlvl.gopaint.brush.PlayerBrush;
+import net.thenextlvl.gopaint.brush.PlayerBrushManager;
+import net.thenextlvl.gopaint.objects.brush.AngleBrush;
+import net.thenextlvl.gopaint.objects.brush.Brush;
+import net.thenextlvl.gopaint.objects.brush.DiscBrush;
+import net.thenextlvl.gopaint.objects.brush.FractureBrush;
+import net.thenextlvl.gopaint.objects.brush.GradientBrush;
+import net.thenextlvl.gopaint.objects.brush.OverlayBrush;
+import net.thenextlvl.gopaint.objects.brush.PaintBrush;
+import net.thenextlvl.gopaint.objects.brush.SplatterBrush;
+import net.thenextlvl.gopaint.objects.brush.SprayBrush;
+import net.thenextlvl.gopaint.objects.brush.UnderlayBrush;
+import net.thenextlvl.gopaint.objects.other.Settings;
+import net.thenextlvl.gopaint.utils.GUI;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@@ -43,14 +44,10 @@
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.meta.ItemMeta;
+@RequiredArgsConstructor
public final class InventoryListener implements Listener {
-
private final PlayerBrushManager brushManager;
- public InventoryListener(PlayerBrushManager brushManager) {
- this.brushManager = brushManager;
- }
-
@EventHandler(priority = EventPriority.LOWEST)
public void menuClick(InventoryClickEvent event) {
if (!(event.getWhoClicked() instanceof Player player)) {
@@ -113,7 +110,7 @@ public void menuClick(InventoryClickEvent event) {
playerBrush.decreaseAngleDistance();
}
} else if (brush instanceof GradientBrush || brush instanceof PaintBrush
- || brush instanceof SplatterBrush) {
+ || brush instanceof SplatterBrush) {
if (event.getClick().equals(ClickType.LEFT)) {
playerBrush.increaseFalloffStrength();
} else if (event.getClick().equals(ClickType.RIGHT)) {
@@ -221,10 +218,9 @@ public void menuBrushClick(InventoryClickEvent event) {
//noinspection deprecation
String name = itemMeta.getDisplayName().replace("§6", "");
brushManager.getBrushHandler(name).ifPresent(brush -> {
- playerBrush.setBrush(brush);
+ playerBrush.brush(brush);
playerBrush.updateInventory();
player.openInventory(playerBrush.getInventory());
});
}
-
}
diff --git a/src/main/java/net/thenextlvl/gopaint/listeners/package-info.java b/src/main/java/net/thenextlvl/gopaint/listeners/package-info.java
new file mode 100644
index 00000000..d540a4a1
--- /dev/null
+++ b/src/main/java/net/thenextlvl/gopaint/listeners/package-info.java
@@ -0,0 +1,10 @@
+@TypesAreNotNullByDefault
+@FieldsAreNotNullByDefault
+@MethodsReturnNotNullByDefault
+@ParametersAreNotNullByDefault
+package net.thenextlvl.gopaint.listeners;
+
+import core.annotation.FieldsAreNotNullByDefault;
+import core.annotation.MethodsReturnNotNullByDefault;
+import core.annotation.ParametersAreNotNullByDefault;
+import core.annotation.TypesAreNotNullByDefault;
\ No newline at end of file
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/AngleBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/AngleBrush.java
similarity index 68%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/AngleBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/AngleBrush.java
index 9c3a14f9..df95260e 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/AngleBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/AngleBrush.java
@@ -16,34 +16,29 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Height;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Height;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class AngleBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Only works on cliffs";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmRlNDQ4ZjBkYmU3NmJiOGE4MzJjOGYzYjJhMDNkMzViZDRlMjc4NWZhNWU4Mjk4YzI2MTU1MDNmNDdmZmEyIn19fQ==";
- private static final @NotNull String NAME = "Angle Brush";
+ private static final String DESCRIPTION = "Only works on cliffs";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmRlNDQ4ZjBkYmU3NmJiOGE4MzJjOGYzYjJhMDNkMzViZDRlMjc4NWZhNWU4Mjk4YzI2MTU1MDNmNDdmZmEyIn19fQ==";
+ private static final String NAME = "Angle Brush";
public AngleBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
Stream blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), null, false);
blocks.filter(block -> passesDefaultChecks(brushSettings, player, block))
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/Brush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/Brush.java
similarity index 72%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/Brush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/Brush.java
index b38b3b6f..21d07d62 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/Brush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/Brush.java
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalSession;
@@ -25,52 +25,22 @@
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.bukkit.BukkitPlayer;
import com.sk89q.worldedit.math.BlockVector3;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Surface;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Surface;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.function.Consumer;
+@Getter
+@RequiredArgsConstructor
public abstract class Brush {
- private final @NotNull String name, description, head;
-
- protected Brush(@NotNull String name, @NotNull String description, @NotNull String head) {
- this.description = description;
- this.name = name;
- this.head = head;
- }
-
- /**
- * Retrieves the description of the brush.
- *
- * @return The description of the brush.
- */
- public @NotNull String getDescription() {
- return description;
- }
-
- /**
- * Retrieves the head of the brush.
- *
- * @return The head of the brush.
- */
- public @NotNull String getHead() {
- return head;
- }
-
- /**
- * Retrieves the name of the brush.
- *
- * @return The name of the brush.
- */
- public @NotNull String getName() {
- return name;
- }
+ private final String name, description, head;
/**
* Performs a painting action using the provided location, player, and brush settings.
@@ -79,11 +49,7 @@ protected Brush(@NotNull String name, @NotNull String description, @NotNull Stri
* @param player The player who is performing the paint action.
* @param brushSettings The brush settings to be applied while painting.
*/
- public abstract void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- );
+ public abstract void paint(Location location, Player player, BrushSettings brushSettings);
/**
* Sets the material of a block in an EditSession.
@@ -93,11 +59,7 @@ public abstract void paint(
* @param material The material to set the block to.
* @throws MaxChangedBlocksException If the maximum number of changed blocks is exceeded.
*/
- protected void setBlock(
- @NotNull EditSession session,
- @NotNull Block block,
- @NotNull Material material
- ) throws MaxChangedBlocksException {
+ protected void setBlock(EditSession session, Block block, Material material) throws MaxChangedBlocksException {
BlockVector3 vector = BlockVector3.at(block.getX(), block.getY(), block.getZ());
if (session.getMask() == null || session.getMask().test(vector)) {
session.setBlock(vector, BukkitAdapter.asBlockType(material));
@@ -131,7 +93,7 @@ protected void performEdit(Player player, Consumer edit) {
* @param block The block being checked.
* @return true if the block passes all the default checks, false otherwise.
*/
- protected boolean passesDefaultChecks(@NotNull BrushSettings brushSettings, @NotNull Player player, @NotNull Block block) {
+ protected boolean passesDefaultChecks(BrushSettings brushSettings, Player player, Block block) {
return passesMaskCheck(brushSettings, block) && passesSurfaceCheck(brushSettings, player, block);
}
@@ -143,7 +105,7 @@ protected boolean passesDefaultChecks(@NotNull BrushSettings brushSettings, @Not
* @param block The block being checked.
* @return true if the block passes the surface check, false otherwise.
*/
- protected boolean passesSurfaceCheck(@NotNull BrushSettings brushSettings, @NotNull Player player, @NotNull Block block) {
+ protected boolean passesSurfaceCheck(BrushSettings brushSettings, Player player, Block block) {
return Surface.isOnSurface(block, brushSettings.surfaceMode(), player.getLocation());
}
@@ -154,7 +116,7 @@ protected boolean passesSurfaceCheck(@NotNull BrushSettings brushSettings, @NotN
* @param block The block being checked.
* @return true if the block passes the mask check, false otherwise.
*/
- protected boolean passesMaskCheck(@NotNull BrushSettings brushSettings, @NotNull Block block) {
+ protected boolean passesMaskCheck(BrushSettings brushSettings, Block block) {
return !brushSettings.maskEnabled() || block.getType().equals(brushSettings.mask());
}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/BucketBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/BucketBrush.java
similarity index 64%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/BucketBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/BucketBrush.java
index a5bc3d4c..8c2398b8 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/BucketBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/BucketBrush.java
@@ -16,35 +16,30 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.ConnectedBlocks;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.ConnectedBlocks;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.stream.Stream;
public class BucketBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Paints connected blocks\n§8with the same block type";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTAxOGI0NTc0OTM5Nzg4YTJhZDU1NTJiOTEyZDY3ODEwNjk4ODhjNTEyMzRhNGExM2VhZGI3ZDRjOTc5YzkzIn19fQ==";
- private static final @NotNull String NAME = "Bucket Brush";
+ private static final String DESCRIPTION = "Paints connected blocks\n§8with the same block type";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTAxOGI0NTc0OTM5Nzg4YTJhZDU1NTJiOTEyZDY3ODEwNjk4ODhjNTEyMzRhNGExM2VhZGI3ZDRjOTc5YzkzIn19fQ==";
+ private static final String NAME = "Bucket Brush";
public BucketBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
List blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), null, false).toList();
Stream connectedBlocks = ConnectedBlocks.getConnectedBlocks(location, blocks);
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/DiscBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/DiscBrush.java
similarity index 64%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/DiscBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/DiscBrush.java
index e476c1ba..baa0c5ca 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/DiscBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/DiscBrush.java
@@ -16,33 +16,28 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class DiscBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Paints blocks in the\n§8same selected axis\n§8from the block you clicked";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjFmMjgyNTBkMWU0MjBhNjUxMWIwMzk2NDg2OGZjYTJmNTYzN2UzYWJhNzlmNGExNjNmNGE4ZDYxM2JlIn19fQ==";
- private static final @NotNull String NAME = "Disc Brush";
+ private static final String DESCRIPTION = "Paints blocks in the\n§8same selected axis\n§8from the block you clicked";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjFmMjgyNTBkMWU0MjBhNjUxMWIwMzk2NDg2OGZjYTJmNTYzN2UzYWJhNzlmNGExNjNmNGE4ZDYxM2JlIn19fQ==";
+ private static final String NAME = "Disc Brush";
public DiscBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
Stream blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), brushSettings.axis(), false);
blocks.filter(block -> passesDefaultChecks(brushSettings, player, block))
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/FractureBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/FractureBrush.java
similarity index 70%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/FractureBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/FractureBrush.java
index 3725b045..7a4522c7 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/FractureBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/FractureBrush.java
@@ -16,34 +16,29 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Height;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Height;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class FractureBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Places blocks in cracks/fisures";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjNkZjczZWVlNjIyNGM1YzVkOTQ4ZDJhMzQ1ZGUyNWYyMDhjYmQ5YWY3MTA4Y2UxZTFiNjFhNTg2ZGU5OGIyIn19fQ==";
- private static final @NotNull String NAME = "Fracture Brush";
+ private static final String DESCRIPTION = "Places blocks in cracks/fisures";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjNkZjczZWVlNjIyNGM1YzVkOTQ4ZDJhMzQ1ZGUyNWYyMDhjYmQ5YWY3MTA4Y2UxZTFiNjFhNTg2ZGU5OGIyIn19fQ==";
+ private static final String NAME = "Fracture Brush";
public FractureBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
Stream blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), null, false);
blocks.filter(block -> passesMaskCheck(brushSettings, block))
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/GradientBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/GradientBrush.java
similarity index 75%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/GradientBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/GradientBrush.java
index 5b847f1a..fc0bab7b 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/GradientBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/GradientBrush.java
@@ -16,33 +16,28 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class GradientBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Creates gradients";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjA2MmRhM2QzYjhmMWZkMzUzNDNjYzI3OWZiMGZlNWNmNGE1N2I1YWJjNDMxZmJiNzhhNzNiZjJhZjY3NGYifX19";
- private static final @NotNull String NAME = "Gradient Brush";
+ private static final String DESCRIPTION = "Creates gradients";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjA2MmRhM2QzYjhmMWZkMzUzNDNjYzI3OWZiMGZlNWNmNGE1N2I1YWJjNDMxZmJiNzhhNzNiZjJhZjY3NGYifX19";
+ private static final String NAME = "Gradient Brush";
public GradientBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
double y = location.getBlockY() - (brushSettings.size() / 2d);
Stream blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), null, false);
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/OverlayBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/OverlayBrush.java
similarity index 69%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/OverlayBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/OverlayBrush.java
index 109cb166..35022d87 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/OverlayBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/OverlayBrush.java
@@ -16,34 +16,29 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class OverlayBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Only paints blocks\n§8that have air above it";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGYzMWQ2Zjk2NTRmODc0ZWE5MDk3YWRlZWEwYzk2OTk2ZTc4ZTNmZDM3NTRmYmY5ZWJlOTYzYWRhZDliZTRjIn19fQ==";
- private static final @NotNull String NAME = "Overlay Brush";
+ private static final String DESCRIPTION = "Only paints blocks\n§8that have air above it";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGYzMWQ2Zjk2NTRmODc0ZWE5MDk3YWRlZWEwYzk2OTk2ZTc4ZTNmZDM3NTRmYmY5ZWJlOTYzYWRhZDliZTRjIn19fQ==";
+ private static final String NAME = "Overlay Brush";
public OverlayBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
Stream blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), null, false);
blocks.filter(block -> passesMaskCheck(brushSettings, block))
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/PaintBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/PaintBrush.java
similarity index 71%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/PaintBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/PaintBrush.java
index 5004964a..1aecb8e3 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/PaintBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/PaintBrush.java
@@ -16,50 +16,48 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
-
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.objects.other.Settings;
-import net.onelitefeather.bettergopaint.utils.Height;
-import net.onelitefeather.bettergopaint.utils.Sphere;
-import net.onelitefeather.bettergopaint.utils.curve.BezierSpline;
+package net.thenextlvl.gopaint.objects.brush;
+
+import core.i18n.file.ComponentBundle;
+import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Height;
+import net.thenextlvl.gopaint.utils.Sphere;
+import net.thenextlvl.gopaint.utils.curve.BezierSpline;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
import java.util.stream.Stream;
public class PaintBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Paints strokes\n§8hold shift to end";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBiM2E5ZGZhYmVmYmRkOTQ5YjIxN2JiZDRmYTlhNDg2YmQwYzNmMGNhYjBkMGI5ZGZhMjRjMzMyZGQzZTM0MiJ9fX0=";
- private static final @NotNull String NAME = "Paint Brush";
+ private static final String DESCRIPTION = "Paints strokes\n§8hold shift to end";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBiM2E5ZGZhYmVmYmRkOTQ5YjIxN2JiZDRmYTlhNDg2YmQwYzNmMGNhYjBkMGI5ZGZhMjRjMzMyZGQzZTM0MiJ9fX0=";
+ private static final String NAME = "Paint Brush";
+
+ private final ComponentBundle bundle;
- public PaintBrush() {
+ public PaintBrush(ComponentBundle bundle) {
super(NAME, DESCRIPTION, HEAD);
+ this.bundle = bundle;
}
private static final HashMap> selectedPoints = new HashMap<>();
@Override
- public void paint(
- @NotNull Location target,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
- String prefix = Settings.settings().GENERIC.PREFIX;
-
+ public void paint(Location target, Player player, BrushSettings brushSettings) {
List locations = selectedPoints.computeIfAbsent(player.getUniqueId(), ignored -> new ArrayList<>());
locations.add(target);
if (!player.isSneaking()) {
- player.sendRichMessage(prefix + " Paint brush point #" + locations.size() + " set.");
+ bundle.sendMessage(player, "brush.paint.point.set",
+ Placeholder.parsed("x", String.valueOf(target.getBlockX())),
+ Placeholder.parsed("y", String.valueOf(target.getBlockY())),
+ Placeholder.parsed("z", String.valueOf(target.getBlockZ())),
+ Placeholder.parsed("point", String.valueOf(locations.size()))
+ );
return;
}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/SphereBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/SphereBrush.java
similarity index 65%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/SphereBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/SphereBrush.java
index 4174870d..d2b72e41 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/SphereBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/SphereBrush.java
@@ -16,33 +16,28 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class SphereBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Regular sphere brush";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmU5OGY0ODU2MDE0N2MwYTJkNGVkYzE3ZjZkOTg1ZThlYjVkOTRiZDcyZmM2MDc0NGE1YThmMmQ5MDVhMTgifX19";
- private static final @NotNull String NAME = "Sphere Brush";
+ private static final String DESCRIPTION = "Regular sphere brush";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmU5OGY0ODU2MDE0N2MwYTJkNGVkYzE3ZjZkOTg1ZThlYjVkOTRiZDcyZmM2MDc0NGE1YThmMmQ5MDVhMTgifX19";
+ private static final String NAME = "Sphere Brush";
public SphereBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
Stream blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), null, false);
blocks.filter(block -> passesDefaultChecks(brushSettings, player, block))
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/SplatterBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/SplatterBrush.java
similarity index 71%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/SplatterBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/SplatterBrush.java
index fa3654db..9fb4cf41 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/SplatterBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/SplatterBrush.java
@@ -16,33 +16,28 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class SplatterBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "More chance when closer\n§8to the clicked point\n§8and configurable chance";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzMzODI5MmUyZTY5ZjA5MDY5NGNlZjY3MmJiNzZmMWQ4Mzc1OGQxMjc0NGJiNmZmYzY4MzRmZGJjMWE5ODMifX19";
- private static final @NotNull String NAME = "Splatter Brush";
+ private static final String DESCRIPTION = "More chance when closer\n§8to the clicked point\n§8and configurable chance";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzMzODI5MmUyZTY5ZjA5MDY5NGNlZjY3MmJiNzZmMWQ4Mzc1OGQxMjc0NGJiNmZmYzY4MzRmZGJjMWE5ODMifX19";
+ private static final String NAME = "Splatter Brush";
public SplatterBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
Stream blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), null, false);
blocks.filter(block -> passesDefaultChecks(brushSettings, player, block))
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/SprayBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/SprayBrush.java
similarity index 66%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/SprayBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/SprayBrush.java
index a49782bd..2ac63bec 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/SprayBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/SprayBrush.java
@@ -16,33 +16,28 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class SprayBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Configurable random chance brush";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjg4MGY3NjVlYTgwZGVlMzcwODJkY2RmZDk4MTJlZTM2ZmRhODg0ODY5MmE4NDFiZWMxYmJkOWVkNTFiYTIyIn19fQ==";
- private static final @NotNull String NAME = "Spray Brush";
+ private static final String DESCRIPTION = "Configurable random chance brush";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjg4MGY3NjVlYTgwZGVlMzcwODJkY2RmZDk4MTJlZTM2ZmRhODg0ODY5MmE4NDFiZWMxYmJkOWVkNTFiYTIyIn19fQ==";
+ private static final String NAME = "Spray Brush";
public SprayBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
Stream blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), null, false);
blocks.filter(block -> passesDefaultChecks(brushSettings, player, block))
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/UnderlayBrush.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/UnderlayBrush.java
similarity index 69%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/brush/UnderlayBrush.java
rename to src/main/java/net/thenextlvl/gopaint/objects/brush/UnderlayBrush.java
index d10f5e84..1df216d3 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/brush/UnderlayBrush.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/UnderlayBrush.java
@@ -16,34 +16,29 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.brush;
+package net.thenextlvl.gopaint.objects.brush;
-import net.onelitefeather.bettergopaint.brush.BrushSettings;
-import net.onelitefeather.bettergopaint.utils.Sphere;
+import net.thenextlvl.gopaint.brush.BrushSettings;
+import net.thenextlvl.gopaint.utils.Sphere;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
-import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class UnderlayBrush extends Brush {
- private static final @NotNull String DESCRIPTION = "Only paints blocks\n§8that have no air above it";
- private static final @NotNull String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzIzNDQ2OTkwZjU4YjY1M2FiNWYwZTdhZjNmZGM3NTYwOTEyNzVmNGMzYzJkZDQxYzdkODYyZGQzZjkyZTg0YSJ9fX0=";
- private static final @NotNull String NAME = "Underlay Brush";
+ private static final String DESCRIPTION = "Only paints blocks\n§8that have no air above it";
+ private static final String HEAD = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzIzNDQ2OTkwZjU4YjY1M2FiNWYwZTdhZjNmZGM3NTYwOTEyNzVmNGMzYzJkZDQxYzdkODYyZGQzZjkyZTg0YSJ9fX0=";
+ private static final String NAME = "Underlay Brush";
public UnderlayBrush() {
super(NAME, DESCRIPTION, HEAD);
}
@Override
- public void paint(
- @NotNull Location location,
- @NotNull Player player,
- @NotNull BrushSettings brushSettings
- ) {
+ public void paint(Location location, Player player, BrushSettings brushSettings) {
performEdit(player, session -> {
Stream blocks = Sphere.getBlocksInRadius(location, brushSettings.size(), null, false);
blocks.filter(block -> passesMaskCheck(brushSettings, block))
diff --git a/src/main/java/net/thenextlvl/gopaint/objects/brush/package-info.java b/src/main/java/net/thenextlvl/gopaint/objects/brush/package-info.java
new file mode 100644
index 00000000..11cc5935
--- /dev/null
+++ b/src/main/java/net/thenextlvl/gopaint/objects/brush/package-info.java
@@ -0,0 +1,10 @@
+@TypesAreNotNullByDefault
+@FieldsAreNotNullByDefault
+@MethodsReturnNotNullByDefault
+@ParametersAreNotNullByDefault
+package net.thenextlvl.gopaint.objects.brush;
+
+import core.annotation.FieldsAreNotNullByDefault;
+import core.annotation.MethodsReturnNotNullByDefault;
+import core.annotation.ParametersAreNotNullByDefault;
+import core.annotation.TypesAreNotNullByDefault;
\ No newline at end of file
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/other/Settings.java b/src/main/java/net/thenextlvl/gopaint/objects/other/Settings.java
similarity index 91%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/other/Settings.java
rename to src/main/java/net/thenextlvl/gopaint/objects/other/Settings.java
index 50650e66..fac8fc25 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/other/Settings.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/other/Settings.java
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.other;
+package net.thenextlvl.gopaint.objects.other;
import com.fastasyncworldedit.core.configuration.Config;
-import net.onelitefeather.bettergopaint.BetterGoPaint;
+import net.thenextlvl.gopaint.GoPaintPlugin;
import org.bukkit.Axis;
import org.bukkit.Material;
@@ -33,7 +33,7 @@ public final class Settings extends Config {
@Ignore
private static final Settings settings = new Settings();
- public void reload(BetterGoPaint plugin, File file) {
+ public void reload(GoPaintPlugin plugin, File file) {
try {
if (file.isFile() || file.createNewFile()) {
load(file);
@@ -63,7 +63,7 @@ public static class GENERIC {
@Comment({
"Default brush item",
- "Possible values: " + BetterGoPaint.PAPER_DOCS,
+ "Possible values: " + GoPaintPlugin.PAPER_DOCS,
"Only items are allowed"
})
public Material DEFAULT_BRUSH = Material.FEATHER;
@@ -79,8 +79,6 @@ public static class GENERIC {
public int DEFAULT_FALLOFF_STRENGTH = 50;
@Comment("Default paint mixing strength")
public int DEFAULT_MIXING_STRENGTH = 50;
- @Comment("Prefix of the plugin")
- public String PREFIX = "BetterGoPaint > ";
@Comment("World there are disabled to used brushes")
public List DISABLED_WORLDS = new ArrayList<>();
@@ -92,7 +90,7 @@ public static class GENERIC {
@Comment({
"Default mask to apply",
- "Possible values: " + BetterGoPaint.PAPER_DOCS
+ "Possible values: " + GoPaintPlugin.PAPER_DOCS
})
public Material DEFAULT_MASK = Material.SPONGE;
diff --git a/src/main/java/net/onelitefeather/bettergopaint/objects/other/SurfaceMode.java b/src/main/java/net/thenextlvl/gopaint/objects/other/SurfaceMode.java
similarity index 79%
rename from src/main/java/net/onelitefeather/bettergopaint/objects/other/SurfaceMode.java
rename to src/main/java/net/thenextlvl/gopaint/objects/other/SurfaceMode.java
index 3947f114..35d9b4fc 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/objects/other/SurfaceMode.java
+++ b/src/main/java/net/thenextlvl/gopaint/objects/other/SurfaceMode.java
@@ -16,16 +16,19 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.objects.other;
+package net.thenextlvl.gopaint.objects.other;
-import net.onelitefeather.bettergopaint.utils.Surface;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import net.thenextlvl.gopaint.utils.Surface;
import org.bukkit.Location;
import org.bukkit.block.Block;
-import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import java.util.Optional;
+@Getter
+@RequiredArgsConstructor
public enum SurfaceMode {
/**
* This enumeration represents a more intuitive check.
@@ -46,17 +49,9 @@ public enum SurfaceMode {
*/
RELATIVE("Relative");
- private final @NotNull String name;
+ private final String name;
- SurfaceMode(@NotNull String name) {
- this.name = name;
- }
-
- public @NotNull String getName() {
- return name;
- }
-
- public static @NotNull Optional byName(@NotNull String name) {
+ public static Optional byName(String name) {
return Arrays.stream(values())
.filter(surfaceMode -> surfaceMode.getName().equals(name))
.findAny();
diff --git a/src/main/java/net/thenextlvl/gopaint/objects/other/package-info.java b/src/main/java/net/thenextlvl/gopaint/objects/other/package-info.java
new file mode 100644
index 00000000..c79226a8
--- /dev/null
+++ b/src/main/java/net/thenextlvl/gopaint/objects/other/package-info.java
@@ -0,0 +1,10 @@
+@TypesAreNotNullByDefault
+@FieldsAreNotNullByDefault
+@MethodsReturnNotNullByDefault
+@ParametersAreNotNullByDefault
+package net.thenextlvl.gopaint.objects.other;
+
+import core.annotation.FieldsAreNotNullByDefault;
+import core.annotation.MethodsReturnNotNullByDefault;
+import core.annotation.ParametersAreNotNullByDefault;
+import core.annotation.TypesAreNotNullByDefault;
\ No newline at end of file
diff --git a/src/main/java/net/thenextlvl/gopaint/package-info.java b/src/main/java/net/thenextlvl/gopaint/package-info.java
new file mode 100644
index 00000000..5bc7c22e
--- /dev/null
+++ b/src/main/java/net/thenextlvl/gopaint/package-info.java
@@ -0,0 +1,10 @@
+@TypesAreNotNullByDefault
+@FieldsAreNotNullByDefault
+@MethodsReturnNotNullByDefault
+@ParametersAreNotNullByDefault
+package net.thenextlvl.gopaint;
+
+import core.annotation.FieldsAreNotNullByDefault;
+import core.annotation.MethodsReturnNotNullByDefault;
+import core.annotation.ParametersAreNotNullByDefault;
+import core.annotation.TypesAreNotNullByDefault;
\ No newline at end of file
diff --git a/src/main/java/net/onelitefeather/bettergopaint/utils/ConnectedBlocks.java b/src/main/java/net/thenextlvl/gopaint/utils/ConnectedBlocks.java
similarity index 98%
rename from src/main/java/net/onelitefeather/bettergopaint/utils/ConnectedBlocks.java
rename to src/main/java/net/thenextlvl/gopaint/utils/ConnectedBlocks.java
index f11c6a6c..acd416c5 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/utils/ConnectedBlocks.java
+++ b/src/main/java/net/thenextlvl/gopaint/utils/ConnectedBlocks.java
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.utils;
+package net.thenextlvl.gopaint.utils;
import org.bukkit.Location;
import org.bukkit.block.Block;
diff --git a/src/main/java/net/onelitefeather/bettergopaint/utils/GUI.java b/src/main/java/net/thenextlvl/gopaint/utils/GUI.java
similarity index 87%
rename from src/main/java/net/onelitefeather/bettergopaint/utils/GUI.java
rename to src/main/java/net/thenextlvl/gopaint/utils/GUI.java
index 90f719ff..fa69bc77 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/utils/GUI.java
+++ b/src/main/java/net/thenextlvl/gopaint/utils/GUI.java
@@ -16,45 +16,35 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.utils;
+package net.thenextlvl.gopaint.utils;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
-import net.onelitefeather.bettergopaint.BetterGoPaint;
-import net.onelitefeather.bettergopaint.brush.PlayerBrush;
-import net.onelitefeather.bettergopaint.objects.brush.AngleBrush;
-import net.onelitefeather.bettergopaint.objects.brush.Brush;
-import net.onelitefeather.bettergopaint.objects.brush.DiscBrush;
-import net.onelitefeather.bettergopaint.objects.brush.FractureBrush;
-import net.onelitefeather.bettergopaint.objects.brush.GradientBrush;
-import net.onelitefeather.bettergopaint.objects.brush.OverlayBrush;
-import net.onelitefeather.bettergopaint.objects.brush.PaintBrush;
-import net.onelitefeather.bettergopaint.objects.brush.SplatterBrush;
-import net.onelitefeather.bettergopaint.objects.brush.SprayBrush;
-import net.onelitefeather.bettergopaint.objects.brush.UnderlayBrush;
-import net.onelitefeather.bettergopaint.objects.other.Settings;
+import net.thenextlvl.gopaint.GoPaintPlugin;
+import net.thenextlvl.gopaint.brush.PlayerBrush;
+import net.thenextlvl.gopaint.objects.brush.*;
+import net.thenextlvl.gopaint.objects.other.Settings;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.inventory.Inventory;
import org.bukkit.plugin.java.JavaPlugin;
-import org.jetbrains.annotations.NotNull;
public class GUI {
- private static final BetterGoPaint plugin = JavaPlugin.getPlugin(BetterGoPaint.class);
+ private static final GoPaintPlugin plugin = JavaPlugin.getPlugin(GoPaintPlugin.class);
- public static @NotNull Inventory create(PlayerBrush pb) {
+ public static Inventory create(PlayerBrush pb) {
Inventory inv = Bukkit.createInventory(null, 54, Component.text("goPaint Menu", NamedTextColor.DARK_BLUE));
update(inv, pb);
return inv;
}
- public static @NotNull Inventory generateBrushes() {
+ public static Inventory generateBrushes() {
Inventory inv = Bukkit.createInventory(null, 27, Component.text("goPaint Brushes", NamedTextColor.DARK_BLUE));
// FILLER
formatDefault(inv);
- for (int index = 0; index < plugin.getBrushManager().getBrushes().size(); index++) {
- Brush brush = plugin.getBrushManager().getBrushes().get(index);
+ for (int index = 0; index < plugin.brushManager().getBrushes().size(); index++) {
+ Brush brush = plugin.brushManager().getBrushes().get(index);
inv.setItem(index, Items.createHead(brush.getHead(), 1, "§6" + brush.getName(),
"\n§7Click to select\n\n§8" + brush.getDescription()
));
@@ -62,13 +52,13 @@ public class GUI {
return inv;
}
- private static void formatDefault(@NotNull Inventory inventory) {
+ private static void formatDefault(Inventory inventory) {
for (int slot = 0; slot < inventory.getSize(); slot++) {
inventory.setItem(slot, Items.create(Material.GRAY_STAINED_GLASS_PANE, 1, "§7", ""));
}
}
- public static void update(@NotNull Inventory inventory, @NotNull PlayerBrush playerBrush) {
+ public static void update(Inventory inventory, PlayerBrush playerBrush) {
Brush brush = playerBrush.brush();
// FILLER
@@ -96,7 +86,7 @@ public static void update(@NotNull Inventory inventory, @NotNull PlayerBrush pla
String clicks = "\n§7Shift click to select\n§7Click to cycle brush\n\n";
inventory.setItem(11, Items.createHead(brush.getHead(), 1, "§6Selected Brush type",
- clicks + plugin.getBrushManager().getBrushLore(brush)
+ clicks + plugin.brushManager().getBrushLore(brush)
));
inventory.setItem(20, Items.create(Material.ORANGE_STAINED_GLASS_PANE, 1, "§7", ""));
diff --git a/src/main/java/net/onelitefeather/bettergopaint/utils/Height.java b/src/main/java/net/thenextlvl/gopaint/utils/Height.java
similarity index 93%
rename from src/main/java/net/onelitefeather/bettergopaint/utils/Height.java
rename to src/main/java/net/thenextlvl/gopaint/utils/Height.java
index 5845856e..b1ea1a22 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/utils/Height.java
+++ b/src/main/java/net/thenextlvl/gopaint/utils/Height.java
@@ -16,11 +16,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.utils;
+package net.thenextlvl.gopaint.utils;
import org.bukkit.Location;
import org.bukkit.block.Block;
-import org.jetbrains.annotations.NotNull;
public class Height {
@@ -30,7 +29,7 @@ public class Height {
* @param location the location to check
* @return the height of the nearest non-empty block at the location
*/
- public static int getNearestNonEmptyBlock(@NotNull Location location) {
+ public static int getNearestNonEmptyBlock(Location location) {
if (location.getBlock().getType().isEmpty()) {
for (int y = location.getBlockY(); y >= location.getWorld().getMinHeight(); y--) {
Block block = location.getWorld().getBlockAt(location.getBlockX(), y, location.getBlockZ());
@@ -58,7 +57,7 @@ public static int getNearestNonEmptyBlock(@NotNull Location location) {
* @param distance the distance at which to calculate the average height difference
* @return the average height difference of the surrounding blocks within the specified distance
*/
- public static double getAverageHeightDiffFracture(@NotNull Location location, int height, int distance) {
+ public static double getAverageHeightDiffFracture(Location location, int height, int distance) {
double totalHeight = 0;
totalHeight += Math.abs(getNearestNonEmptyBlock(location.clone().add(distance, 0, -distance))) - height;
totalHeight += Math.abs(getNearestNonEmptyBlock(location.clone().add(distance, 0, distance))) - height;
@@ -78,7 +77,7 @@ public static double getAverageHeightDiffFracture(@NotNull Location location, in
* @param distance the distance at which to calculate the average height difference angle
* @return the average height difference angle of the surrounding blocks within the specified distance
*/
- public static double getAverageHeightDiffAngle(@NotNull Location location, int distance) {
+ public static double getAverageHeightDiffAngle(Location location, int distance) {
double maxHeightDiff = 0;
double maxHeightDiff2 = 0;
double diff = Math.abs(getNearestNonEmptyBlock(location.clone().add(distance, 0, -distance))
diff --git a/src/main/java/net/onelitefeather/bettergopaint/utils/Items.java b/src/main/java/net/thenextlvl/gopaint/utils/Items.java
similarity index 82%
rename from src/main/java/net/onelitefeather/bettergopaint/utils/Items.java
rename to src/main/java/net/thenextlvl/gopaint/utils/Items.java
index 4a5b12eb..a9942464 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/utils/Items.java
+++ b/src/main/java/net/thenextlvl/gopaint/utils/Items.java
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.utils;
+package net.thenextlvl.gopaint.utils;
import com.destroystokyo.paper.profile.ProfileProperty;
import net.kyori.adventure.text.Component;
@@ -24,7 +24,6 @@
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta;
-import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
@@ -32,12 +31,7 @@
public final class Items {
- public static @NotNull ItemStack create(
- @NotNull Material material,
- int amount,
- @NotNull String name,
- @NotNull String lore
- ) {
+ public static ItemStack create(Material material, int amount, String name, String lore) {
ItemStack itemStack = new ItemStack(material);
itemStack.setAmount(amount);
itemStack.editMeta(itemMeta -> {
@@ -56,12 +50,7 @@ public final class Items {
return itemStack;
}
- public static @NotNull ItemStack createHead(
- @NotNull String texture,
- int amount,
- @NotNull String name,
- @NotNull String lore
- ) {
+ public static ItemStack createHead(String texture, int amount, String name, String lore) {
ItemStack head = create(Material.PLAYER_HEAD, amount, name, lore);
head.editMeta(SkullMeta.class, skullMeta -> {
var profile = Bukkit.createProfile(UUID.randomUUID());
diff --git a/src/main/java/net/onelitefeather/bettergopaint/utils/Sphere.java b/src/main/java/net/thenextlvl/gopaint/utils/Sphere.java
similarity index 92%
rename from src/main/java/net/onelitefeather/bettergopaint/utils/Sphere.java
rename to src/main/java/net/thenextlvl/gopaint/utils/Sphere.java
index f6351006..9d0f80f0 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/utils/Sphere.java
+++ b/src/main/java/net/thenextlvl/gopaint/utils/Sphere.java
@@ -16,12 +16,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.utils;
+package net.thenextlvl.gopaint.utils;
import org.bukkit.Axis;
import org.bukkit.Location;
import org.bukkit.block.Block;
-import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
@@ -39,7 +38,7 @@ public class Sphere {
* @param air Whether air blocks should be included.
* @return A stream of blocks within the specified radius.
*/
- public static Stream getBlocksInRadius(@NotNull Location middlePoint, int radius, @Nullable Axis axis, boolean air) {
+ public static Stream getBlocksInRadius(Location middlePoint, int radius, @Nullable Axis axis, boolean air) {
List blocks = new ArrayList<>();
Location loc1 = middlePoint.clone().add(-radius / 2d, -radius / 2d, -radius / 2d).getBlock().getLocation();
Location loc2 = middlePoint.clone().add(radius / 2d, radius / 2d, radius / 2d).getBlock().getLocation();
@@ -92,7 +91,7 @@ public static Stream getBlocksInRadius(@NotNull Location middlePoint, int
return blocks.stream().filter(block -> !block.isEmpty());
}
- private static boolean passesDefaultChecks(@NotNull Location location, @NotNull Location middlePoint, int radius) {
+ private static boolean passesDefaultChecks(Location location, Location middlePoint, int radius) {
return location.distance(middlePoint) < radius / 2d;
}
diff --git a/src/main/java/net/onelitefeather/bettergopaint/utils/Surface.java b/src/main/java/net/thenextlvl/gopaint/utils/Surface.java
similarity index 87%
rename from src/main/java/net/onelitefeather/bettergopaint/utils/Surface.java
rename to src/main/java/net/thenextlvl/gopaint/utils/Surface.java
index aa8e4e0a..14d17953 100644
--- a/src/main/java/net/onelitefeather/bettergopaint/utils/Surface.java
+++ b/src/main/java/net/thenextlvl/gopaint/utils/Surface.java
@@ -16,13 +16,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-package net.onelitefeather.bettergopaint.utils;
+package net.thenextlvl.gopaint.utils;
-import net.onelitefeather.bettergopaint.objects.other.SurfaceMode;
+import net.thenextlvl.gopaint.objects.other.SurfaceMode;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
-import org.jetbrains.annotations.NotNull;
public class Surface {
@@ -32,7 +31,7 @@ public class Surface {
* @param block the block to check
* @return true if the block is on the surface, false otherwise
*/
- public static boolean isDirectlyOnSurface(@NotNull Block block) {
+ public static boolean isDirectlyOnSurface(Block block) {
return block.isSolid() && !block.getRelative(BlockFace.UP).isSolid();
}
@@ -43,7 +42,7 @@ public static boolean isDirectlyOnSurface(@NotNull Block block) {
* @param playerLoc the player's location
* @return true if the block is on the surface from the player's location, false otherwise
*/
- public static boolean isRelativelyOnSurface(@NotNull Block block, @NotNull Location playerLoc) {
+ public static boolean isRelativelyOnSurface(Block block, Location playerLoc) {
Location location = block.getLocation();
playerLoc.add(0, 1.5, 0);
@@ -87,7 +86,7 @@ public static boolean isRelativelyOnSurface(@NotNull Block block, @NotNull Locat
* @param location the location to use for the check
* @return true if the block is on the surface based on the surface mode and location, false otherwise
*/
- public static boolean isOnSurface(@NotNull Block block, @NotNull SurfaceMode surfaceMode, @NotNull Location location) {
+ public static boolean isOnSurface(Block block, SurfaceMode surfaceMode, Location location) {
return switch (surfaceMode) {
case RELATIVE -> isRelativelyOnSurface(block, location);
case DIRECT -> isDirectlyOnSurface(block);
diff --git a/src/main/java/net/thenextlvl/gopaint/utils/curve/BezierSpline.java b/src/main/java/net/thenextlvl/gopaint/utils/curve/BezierSpline.java
new file mode 100644
index 00000000..d36eab59
--- /dev/null
+++ b/src/main/java/net/thenextlvl/gopaint/utils/curve/BezierSpline.java
@@ -0,0 +1,172 @@
+/*
+ * goPaint is designed to simplify painting inside of Minecraft.
+ * Copyright (C) Arcaniax-Development
+ * Copyright (C) Arcaniax team and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package net.thenextlvl.gopaint.utils.curve;
+
+import org.bukkit.Location;
+
+import java.util.LinkedList;
+
+public class BezierSpline {
+
+ private final LinkedList knotsList;
+ private Location[] knots;
+ private BezierSplineSegment[] segments;
+ private double length = 0;
+
+ public BezierSpline(LinkedList knotsList) {
+ this.knotsList = knotsList;
+ recalculate();
+ }
+
+ private void recalculate() {
+ knots = knotsList.toArray(new Location[0]);
+ segments = new BezierSplineSegment[knots.length - 1];
+ for (int i = 0; i < knots.length - 1; i++) {
+ segments[i] = new BezierSplineSegment(knots[i], knots[i + 1]);
+ }
+ calculateControlPoints();
+ calculateLength();
+ }
+
+ public double getCurveLength() {
+ return length;
+ }
+
+ public void calculateLength() {
+ length = 0;
+ for (BezierSplineSegment segment : segments) {
+ segment.calculateCurveLength();
+ length += segment.getCurveLength();
+ }
+ }
+
+ public Location getPoint(double point) {
+ if (point >= segments.length) {
+ return getPoint(segments.length - 1, 1);
+ } else {
+ return getPoint((int) Math.floor(point), point - Math.floor(point));
+ }
+ }
+
+ public Location getPoint(int n, double f) {
+ assert (n < segments.length);
+ assert (0 <= f && f <= 1);
+ BezierSplineSegment segment = segments[n];
+ return segment.getPoint(f);
+ }
+
+ public void calculateControlPoints() {
+ if (segments == null) return;
+ if (segments.length == 0) return;
+
+ Double xflat, yflat, zflat;
+ xflat = knots[0].getX();
+ yflat = knots[0].getY();
+ zflat = knots[0].getZ();
+ for (Location l : knots) {
+ if (l.getBlockX() != xflat) {
+ xflat = null;
+ break;
+ }
+ }
+ for (Location l : knots) {
+ if (l.getBlockY() != yflat) {
+ yflat = null;
+ break;
+ }
+ }
+ for (Location l : knots) {
+ if (l.getBlockZ() != zflat) {
+ zflat = null;
+ break;
+ }
+ }
+
+ if (segments.length == 1) {
+ Location midpoint = new Location(segments[0].getP0().getWorld(), 0, 0, 0);
+ midpoint.setX((segments[0].getP0().getX() + segments[0].getP3().getX()) / 2);
+ midpoint.setY((segments[0].getP0().getY() + segments[0].getP3().getY()) / 2);
+ midpoint.setZ((segments[0].getP0().getZ() + segments[0].getP3().getZ()) / 2);
+ segments[0].setP1(midpoint);
+ segments[0].setP2(midpoint.clone());
+ } else {
+ segments[0].setA(0);
+ segments[0].setB(2);
+ segments[0].setC(1);
+ segments[0].getR().setX(knots[0].getX() + 2 * knots[1].getX());
+ segments[0].getR().setY(knots[0].getY() + 2 * knots[1].getY());
+ segments[0].getR().setZ(knots[0].getZ() + 2 * knots[1].getZ());
+
+ int n = knots.length - 1;
+ float m;
+
+ for (int i = 1; i < n - 1; i++) {
+ segments[i].setA(1);
+ segments[i].setB(4);
+ segments[i].setC(1);
+ segments[i].getR().setX(4 * knots[i].getX() + 2 * knots[i + 1].getX());
+ segments[i].getR().setY(4 * knots[i].getY() + 2 * knots[i + 1].getY());
+ segments[i].getR().setZ(4 * knots[i].getZ() + 2 * knots[i + 1].getZ());
+ }
+
+ segments[n - 1].setA(2);
+ segments[n - 1].setB(7);
+ segments[n - 1].setC(0);
+ segments[n - 1].getR().setX(8 * knots[n - 1].getX() + knots[n].getX());
+ segments[n - 1].getR().setY(8 * knots[n - 1].getY() + knots[n].getY());
+ segments[n - 1].getR().setZ(8 * knots[n - 1].getZ() + knots[n].getZ());
+
+ for (int i = 1; i < n; i++) {
+ m = segments[i].getA() / segments[i - 1].getB();
+ segments[i].setB(segments[i].getB() - m * segments[i - 1].getC());
+ segments[i].getR().setX(segments[i].getR().getX() - m * segments[i - 1].getR().getX());
+ segments[i].getR().setY(segments[i].getR().getY() - m * segments[i - 1].getR().getY());
+ segments[i].getR().setZ(segments[i].getR().getZ() - m * segments[i - 1].getR().getZ());
+ }
+
+ segments[n - 1].getP1().setX(segments[n - 1].getR().getX() / segments[n - 1].getB());
+ segments[n - 1].getP1().setY(segments[n - 1].getR().getY() / segments[n - 1].getB());
+ segments[n - 1].getP1().setZ(segments[n - 1].getR().getZ() / segments[n - 1].getB());
+
+ for (int i = n - 2; i >= 0; i--) {
+ segments[i].getP1().setX((segments[i].getR().getX() - segments[i].getC() * segments[i + 1].getP1().getX()) / segments[i].getB());
+ segments[i].getP1().setY((segments[i].getR().getY() - segments[i].getC() * segments[i + 1].getP1().getY()) / segments[i].getB());
+ segments[i].getP1().setZ((segments[i].getR().getZ() - segments[i].getC() * segments[i + 1].getP1().getZ()) / segments[i].getB());
+ }
+
+ for (int i = 0; i < n - 1; i++) {
+ segments[i].getP2().setX(2 * knots[i + 1].getX() - segments[i + 1].getP1().getX());
+ segments[i].getP2().setY(2 * knots[i + 1].getY() - segments[i + 1].getP1().getY());
+ segments[i].getP2().setZ(2 * knots[i + 1].getZ() - segments[i + 1].getP1().getZ());
+ }
+ segments[n - 1].getP2().setX(0.5 * (knots[n].getX() + segments[n - 1].getP1().getX()));
+ segments[n - 1].getP2().setY(0.5 * (knots[n].getY() + segments[n - 1].getP1().getY()));
+ segments[n - 1].getP2().setZ(0.5 * (knots[n].getZ() + segments[n - 1].getP1().getZ()));
+ }
+
+ if (xflat != null) for (BezierSplineSegment cs : segments) cs.setX(xflat);
+ if (yflat != null) for (BezierSplineSegment cs : segments) cs.setY(yflat);
+ if (zflat != null) for (BezierSplineSegment cs : segments) cs.setZ(zflat);
+ }
+
+ @Override
+ public String toString() {
+ return (knots != null ? knots.length : 0) + " points.";
+ }
+}
diff --git a/src/main/java/net/thenextlvl/gopaint/utils/curve/BezierSplineSegment.java b/src/main/java/net/thenextlvl/gopaint/utils/curve/BezierSplineSegment.java
new file mode 100644
index 00000000..0a8fa45e
--- /dev/null
+++ b/src/main/java/net/thenextlvl/gopaint/utils/curve/BezierSplineSegment.java
@@ -0,0 +1,91 @@
+/*
+ * goPaint is designed to simplify painting inside of Minecraft.
+ * Copyright (C) Arcaniax-Development
+ * Copyright (C) Arcaniax team and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package net.thenextlvl.gopaint.utils.curve;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.bukkit.Location;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.Objects;
+
+@Getter
+@Setter
+public class BezierSplineSegment {
+
+ private final double[] lengths = new double[20];
+ private Location p0, p1, p2, p3;
+ private float a, b, c;
+ private @Nullable Double xFlat, yFlat, zFlat;
+ private Location r;
+ private double curveLength;
+
+ public BezierSplineSegment(Location p0, Location p3) {
+ this.p0 = p0;
+ this.p3 = p3;
+ p1 = new Location(p0.getWorld(), 0, 0, 0);
+ p2 = new Location(p0.getWorld(), 0, 0, 0);
+ r = new Location(p0.getWorld(), 0, 0, 0);
+ }
+
+ public void setX(double xflat2) {
+ p0.setX(xflat2);
+ p1.setX(xflat2);
+ p2.setX(xflat2);
+ p3.setX(xflat2);
+ xFlat = xflat2;
+ }
+
+ public void setY(double yflat2) {
+ p0.setY(yflat2);
+ p1.setY(yflat2);
+ p2.setY(yflat2);
+ p3.setY(yflat2);
+ yFlat = yflat2;
+ }
+
+ public void setZ(double zflat2) {
+ p0.setZ(zflat2);
+ p1.setZ(zflat2);
+ p2.setZ(zflat2);
+ p3.setZ(zflat2);
+ zFlat = zflat2;
+ }
+
+ public void calculateCurveLength() {
+ Location current = p0.clone();
+ double step = 0.05;
+ lengths[0] = 0;
+ Location temp;
+ for (int i = 1; i < 20; i++) {
+ temp = getPoint(i * step);
+ lengths[i] = lengths[i - 1] + temp.distance(current);
+ current = temp;
+ }
+ curveLength = lengths[19];
+ }
+
+ public Location getPoint(double f) {
+ Location result = new Location(p0.getWorld(), 0, 0, 0);
+ result.setX(Objects.requireNonNullElseGet(xFlat, () -> (Math.pow(1 - f, 3) * p0.getX()) + (3 * Math.pow(1 - f, 2) * f * p1.getX()) + (3 * (1 - f) * f * f * p2.getX()) + (Math.pow(f, 3) * p3.getX())));
+ result.setY(Objects.requireNonNullElseGet(yFlat, () -> (Math.pow(1 - f, 3) * p0.getY()) + (3 * Math.pow(1 - f, 2) * f * p1.getY()) + (3 * (1 - f) * f * f * p2.getY()) + (Math.pow(f, 3) * p3.getY())));
+ result.setZ(Objects.requireNonNullElseGet(zFlat, () -> (Math.pow(1 - f, 3) * p0.getZ()) + (3 * Math.pow(1 - f, 2) * f * p1.getZ()) + (3 * (1 - f) * f * f * p2.getZ()) + (Math.pow(f, 3) * p3.getZ())));
+ return result;
+ }
+}
diff --git a/src/main/java/net/thenextlvl/gopaint/utils/package-info.java b/src/main/java/net/thenextlvl/gopaint/utils/package-info.java
new file mode 100644
index 00000000..e1414ce4
--- /dev/null
+++ b/src/main/java/net/thenextlvl/gopaint/utils/package-info.java
@@ -0,0 +1,10 @@
+@TypesAreNotNullByDefault
+@FieldsAreNotNullByDefault
+@MethodsReturnNotNullByDefault
+@ParametersAreNotNullByDefault
+package net.thenextlvl.gopaint.utils;
+
+import core.annotation.FieldsAreNotNullByDefault;
+import core.annotation.MethodsReturnNotNullByDefault;
+import core.annotation.ParametersAreNotNullByDefault;
+import core.annotation.TypesAreNotNullByDefault;
\ No newline at end of file
diff --git a/src/main/resources/LICENSE b/src/main/resources/LICENSE
deleted file mode 100644
index 23702e5c..00000000
--- a/src/main/resources/LICENSE
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- {one line to give the program's name and a brief idea of what it does.}
- Copyright (C) {year} {name of author}
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- {project} Copyright (C) {year} {fullname}
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
\ No newline at end of file
diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties
new file mode 100644
index 00000000..d9ae80a7
--- /dev/null
+++ b/src/main/resources/messages.properties
@@ -0,0 +1,13 @@
+prefix=goPaint >
+command.gopaint.permission= You are lacking the permission gopaint.use
+command.gopaint.usage= /gp size|toggle|info
+command.gopaint.usage.admin= /gp size|toggle|info|reload
+command.gopaint.usage.size= /gp size [number]
+command.gopaint.brush.disabled= Disabled brush
+command.gopaint.brush.enabled= Enabled brush
+command.gopaint.brush.size= Brush size set to:
+command.gopaint.reloaded= Reloaded
+command.gopaint.info.creator= Created by: TheMeinerLP
+command.gopaint.info.link= Links: Twitter
+brush.disabled= Your brush is disabled, left click to enable the brush.
+brush.paint.point.set= Paint brush point # set.
diff --git a/src/main/resources/messages_german.properties b/src/main/resources/messages_german.properties
new file mode 100644
index 00000000..b5c9bf27
--- /dev/null
+++ b/src/main/resources/messages_german.properties
@@ -0,0 +1,9 @@
+command.gopaint.permission= Dir fehlt die Berechtigung gopaint.use
+command.gopaint.brush.disabled= Der Pinsel wurde deaktiviert
+command.gopaint.brush.enabled= Der Pinsel wurde aktiviert
+command.gopaint.brush.size= Die Pinselgröße wurde geändert:
+command.gopaint.reloaded= Die Konfiguration wurde neu geladen
+command.gopaint.info.creator= Erstellt von: TheMeinerLP
+command.gopaint.info.link= Links: Twitter
+brush.disabled= Dein Pinsel ist deaktiviert, linksklick um den Pinsel zu aktivieren.
+brush.paint.point.set= Der Pinselstrich # wurde gesetzt.