diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9737e6f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,311 @@ +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +# max_line_length = 120 +tab_width = 4 +trim_trailing_whitespace = true +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_visual_guides = none +ij_wrap_on_typing = false + +[*.java] +ij_smart_tabs = true +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 = 0 +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 = 0 +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_builder_methods = none +ij_java_call_parameters_new_line_after_left_paren = false +ij_java_call_parameters_right_paren_on_new_line = false +ij_java_call_parameters_wrap = off +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 = 15 +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 = never +ij_java_doc_add_blank_line_after_description = true +ij_java_doc_add_blank_line_after_param_comments = true +ij_java_doc_add_blank_line_after_return = true +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 = true +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 = true +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 = off +ij_java_extends_keyword_wrap = off +ij_java_extends_list_wrap = off +ij_java_field_annotation_wrap = split_into_lines +ij_java_finally_on_new_line = false +ij_java_for_brace_force = never +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 = false +ij_java_generate_final_parameters = false +ij_java_if_brace_force = never +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 = 0 +ij_java_keep_blank_lines_between_package_declaration_and_header = 0 +ij_java_keep_blank_lines_in_code = 1 +ij_java_keep_blank_lines_in_declarations = 1 +ij_java_keep_builder_methods_indents = false +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 = true +ij_java_keep_simple_lambdas_in_one_line = true +ij_java_keep_simple_methods_in_one_line = true +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 = off +ij_java_method_parameters_new_line_after_left_paren = false +ij_java_method_parameters_right_paren_on_new_line = false +ij_java_method_parameters_wrap = off +ij_java_modifier_list_wrap = false +ij_java_names_count_to_use_import_on_demand = 9 +ij_java_new_line_after_lparen_in_record_header = false +ij_java_packages_to_use_import_on_demand = _java.awt.*, _javax.swing.* +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 = true +ij_java_prefer_parameters_wrap = false +ij_java_record_components_wrap = normal +ij_java_repeat_synchronized = true +ij_java_replace_instanceof_and_cast = true +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 = true +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 = true +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 = true +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_record_header = 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 = false +ij_java_ternary_operation_wrap = off +ij_java_test_name_suffix = Test +ij_java_throws_keyword_wrap = off +ij_java_throws_list_wrap = off +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 = never +ij_java_while_on_new_line = false +ij_java_wrap_comments = false +ij_java_wrap_first_method_in_call_chain = false +ij_java_wrap_long_lines = 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 + +[.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 + +[{*.markdown, *.md}] +indent_size = 2 +tab_width = 2 +ij_markdown_force_one_space_after_blockquote_symbol = true +ij_markdown_force_one_space_after_header_symbol = true +ij_markdown_force_one_space_after_list_bullet = true +ij_markdown_force_one_space_between_words = true +ij_markdown_keep_indents_on_empty_lines = false +ij_markdown_max_lines_around_block_elements = 1 +ij_markdown_max_lines_around_header = 1 +ij_markdown_max_lines_between_paragraphs = 1 +ij_markdown_min_lines_around_block_elements = 1 +ij_markdown_min_lines_around_header = 1 +ij_markdown_min_lines_between_paragraphs = 1 + +[{*.yaml, *.yml, *.lang}] +indent_size = 2 +ij_yaml_align_values_properties = do_not_align +ij_yaml_autoinsert_sequence_marker = true +ij_yaml_block_mapping_on_new_line = false +ij_yaml_indent_sequence_value = true +ij_yaml_keep_indents_on_empty_lines = false +ij_yaml_keep_line_breaks = true +ij_yaml_sequence_on_new_line = false +ij_yaml_space_before_colon = false +ij_yaml_spaces_within_braces = true +ij_yaml_spaces_within_brackets = true diff --git a/.gitignore b/.gitignore index 77cc934..300e1db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -out/ -.idea/ -*.iml -META-INF/ -target/ +# JetBrains IDEs +/.idea/ +/*.iml + +# Maven +/target/ diff --git a/LICENSE b/LICENSE index 6505da0..7ecbbf1 100644 --- a/LICENSE +++ b/LICENSE @@ -6,4 +6,4 @@ The same distribution rights and limitations above shall similarly apply to any The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/pom.xml b/pom.xml index 93686ab..3cebbac 100644 --- a/pom.xml +++ b/pom.xml @@ -1,47 +1,48 @@ - + + + 4.0.0 + com.songoda EpicEnchants - 4.0.0 1.1.11 + + EpicEnchants + Unlock the potential of your weapons, tools and armor by making your own custom enchants. + https://songoda.com/marketplace/product/67 + + + 1.8 + 8 + + UTF-8 + + clean install EpicEnchants-${project.version} + org.apache.maven.plugins maven-compiler-plugin - 3.8.0 + 3.8.1 + - 1.8 - 1.8 - - - - com.google.code.maven-replacer-plugin - replacer - 1.5.3 - - - prepare-package - - replace - - - - - ${project.build.directory}/classes/plugin.yml - - - maven-version-number - ${project.version} - - + ${java.version} + ${java.version} + + + + org.apache.maven.plugins maven-shade-plugin 3.3.0-SNAPSHOT + shaded @@ -49,18 +50,22 @@ shade + + true false false + com.songoda:SongodaCore - fr.mymicky:FastInv + *:* + META-INF/*.SF META-INF/*.DSA @@ -73,21 +78,31 @@ + + + + src/main/resources + true + + + apache.snapshots https://repository.apache.org/snapshots/ + - public + songoda-public https://repo.songoda.com/repository/public/ + jitpack.io - https://jitpack.io + https://jitpack.io/ @@ -98,24 +113,21 @@ 1.17 provided - - fr.mrmicky - FastInv - 3.0.2 - compile - + com.songoda SongodaCore LATEST compile + com.songoda UltimateBottles 1_0 provided + me.clip placeholderapi diff --git a/src/main/java/com/songoda/epicenchants/EpicEnchants.java b/src/main/java/com/songoda/epicenchants/EpicEnchants.java index a2d0805..f7254cd 100644 --- a/src/main/java/com/songoda/epicenchants/EpicEnchants.java +++ b/src/main/java/com/songoda/epicenchants/EpicEnchants.java @@ -7,7 +7,17 @@ import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.configuration.Config; import com.songoda.core.gui.GuiManager; import com.songoda.core.hooks.EconomyManager; -import com.songoda.epicenchants.commands.*; +import com.songoda.epicenchants.commands.CommandAlchemist; +import com.songoda.epicenchants.commands.CommandApply; +import com.songoda.epicenchants.commands.CommandEnchanter; +import com.songoda.epicenchants.commands.CommandGiveBook; +import com.songoda.epicenchants.commands.CommandGiveItemDust; +import com.songoda.epicenchants.commands.CommandGiveRandomBook; +import com.songoda.epicenchants.commands.CommandGiveScroll; +import com.songoda.epicenchants.commands.CommandList; +import com.songoda.epicenchants.commands.CommandReload; +import com.songoda.epicenchants.commands.CommandSettings; +import com.songoda.epicenchants.commands.CommandTinkerer; import com.songoda.epicenchants.listeners.ArmorListener; import com.songoda.epicenchants.listeners.EntityListener; import com.songoda.epicenchants.listeners.HeldItemListener; @@ -16,7 +26,11 @@ import com.songoda.epicenchants.listeners.item.BlackScrollListener; import com.songoda.epicenchants.listeners.item.BookListener; import com.songoda.epicenchants.listeners.item.DustListener; import com.songoda.epicenchants.listeners.item.WhiteScrollListener; -import com.songoda.epicenchants.managers.*; +import com.songoda.epicenchants.managers.EnchantManager; +import com.songoda.epicenchants.managers.FileManager; +import com.songoda.epicenchants.managers.GroupManager; +import com.songoda.epicenchants.managers.HookManager; +import com.songoda.epicenchants.managers.InfoManager; import com.songoda.epicenchants.objects.Enchant; import com.songoda.epicenchants.utils.EnchantUtils; import com.songoda.epicenchants.utils.SpecialItems; diff --git a/src/main/java/com/songoda/epicenchants/commands/CommandAlchemist.java b/src/main/java/com/songoda/epicenchants/commands/CommandAlchemist.java index 51f8a55..756d053 100644 --- a/src/main/java/com/songoda/epicenchants/commands/CommandAlchemist.java +++ b/src/main/java/com/songoda/epicenchants/commands/CommandAlchemist.java @@ -17,10 +17,9 @@ public class CommandAlchemist extends AbstractCommand { this.plugin = plugin; } - @Override protected ReturnType runCommand(CommandSender sender, String... args) { - Player player = (Player)sender; + Player player = (Player) sender; new AlchemistMenu(plugin, plugin.getFileManager().getConfiguration("menus/alchemist-menu")).open(player); return ReturnType.SUCCESS; } diff --git a/src/main/java/com/songoda/epicenchants/commands/CommandApply.java b/src/main/java/com/songoda/epicenchants/commands/CommandApply.java index afe9209..68288eb 100644 --- a/src/main/java/com/songoda/epicenchants/commands/CommandApply.java +++ b/src/main/java/com/songoda/epicenchants/commands/CommandApply.java @@ -98,13 +98,13 @@ public class CommandApply extends AbstractCommand { .stream().findFirst().orElse(null); List levels = new ArrayList<>(); if (enchant != null) { - for (int i = 1; i <= enchant.getMaxLevel(); i ++) + for (int i = 1; i <= enchant.getMaxLevel(); i++) levels.add(String.valueOf(i)); } return levels; } else if (args.length == 3 || args.length == 4) { List rates = new ArrayList<>(); - for (int i = 1; i <= 100; i ++) + for (int i = 1; i <= 100; i++) rates.add(String.valueOf(i)); return rates; } diff --git a/src/main/java/com/songoda/epicenchants/commands/CommandEnchanter.java b/src/main/java/com/songoda/epicenchants/commands/CommandEnchanter.java index 10a561c..2b39de2 100644 --- a/src/main/java/com/songoda/epicenchants/commands/CommandEnchanter.java +++ b/src/main/java/com/songoda/epicenchants/commands/CommandEnchanter.java @@ -19,7 +19,7 @@ public class CommandEnchanter extends AbstractCommand { @Override protected ReturnType runCommand(CommandSender sender, String... args) { - Player player = (Player)sender; + Player player = (Player) sender; new EnchanterMenu(plugin, plugin.getFileManager().getConfiguration("menus/enchanter-menu"), player).open(player); return ReturnType.SUCCESS; } diff --git a/src/main/java/com/songoda/epicenchants/commands/CommandGiveBook.java b/src/main/java/com/songoda/epicenchants/commands/CommandGiveBook.java index d00014e..1a6681c 100644 --- a/src/main/java/com/songoda/epicenchants/commands/CommandGiveBook.java +++ b/src/main/java/com/songoda/epicenchants/commands/CommandGiveBook.java @@ -95,16 +95,16 @@ public class CommandGiveBook extends AbstractCommand { } else if (args.length == 3) { Enchant enchant = plugin.getEnchantManager().getValues() .stream().findFirst().orElse(null); - List levels = new ArrayList<>(); + List levels = new ArrayList<>(); if (enchant != null) { - for (int i = 1; i <= enchant.getMaxLevel(); i ++) + for (int i = 1; i <= enchant.getMaxLevel(); i++) levels.add(String.valueOf(i)); } return levels; } else if (args.length == 4 || args.length == 5) { List rates = new ArrayList<>(); - for (int i = 1; i <= 100; i ++) - rates.add(String.valueOf(i)); + for (int i = 1; i <= 100; i++) + rates.add(String.valueOf(i)); return rates; } return null; diff --git a/src/main/java/com/songoda/epicenchants/commands/CommandGiveItemDust.java b/src/main/java/com/songoda/epicenchants/commands/CommandGiveItemDust.java index 11651d5..c5ca35d 100644 --- a/src/main/java/com/songoda/epicenchants/commands/CommandGiveItemDust.java +++ b/src/main/java/com/songoda/epicenchants/commands/CommandGiveItemDust.java @@ -85,7 +85,7 @@ public class CommandGiveItemDust extends AbstractCommand { return dusts; } else if (args.length == 4) { List rates = new ArrayList<>(); - for (int i = 1; i <= 100; i ++) + for (int i = 1; i <= 100; i++) rates.add(String.valueOf(i)); return rates; } diff --git a/src/main/java/com/songoda/epicenchants/commands/CommandGiveRandomBook.java b/src/main/java/com/songoda/epicenchants/commands/CommandGiveRandomBook.java index 563a8da..fde88cf 100644 --- a/src/main/java/com/songoda/epicenchants/commands/CommandGiveRandomBook.java +++ b/src/main/java/com/songoda/epicenchants/commands/CommandGiveRandomBook.java @@ -33,7 +33,6 @@ public class CommandGiveRandomBook extends AbstractCommand { return ReturnType.FAILURE; } - List groups = plugin.getGroupManager().getValues().stream() .filter(group -> group.getIdentifier().equalsIgnoreCase(args[1])).collect(Collectors.toList()); diff --git a/src/main/java/com/songoda/epicenchants/commands/CommandGiveScroll.java b/src/main/java/com/songoda/epicenchants/commands/CommandGiveScroll.java index 907a004..471d989 100644 --- a/src/main/java/com/songoda/epicenchants/commands/CommandGiveScroll.java +++ b/src/main/java/com/songoda/epicenchants/commands/CommandGiveScroll.java @@ -39,11 +39,10 @@ public class CommandGiveScroll extends AbstractCommand { int amount = 1; int successRate = -1; - if (args.length > 2) { if (!CommandCommons.isInt(args[2], sender)) return ReturnType.FAILURE; - amount = Integer.parseInt(args[2]); + amount = Integer.parseInt(args[2]); } if (args.length > 3) { @@ -85,7 +84,7 @@ public class CommandGiveScroll extends AbstractCommand { return Bukkit.getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList()); } else if (args.length == 3 || args.length == 4) { List rates = new ArrayList<>(); - for (int i = 1; i <= (args.length == 3 ? 10 : 100); i ++) + for (int i = 1; i <= (args.length == 3 ? 10 : 100); i++) rates.add(String.valueOf(i)); return rates; } diff --git a/src/main/java/com/songoda/epicenchants/commands/CommandList.java b/src/main/java/com/songoda/epicenchants/commands/CommandList.java index 684b973..938944a 100644 --- a/src/main/java/com/songoda/epicenchants/commands/CommandList.java +++ b/src/main/java/com/songoda/epicenchants/commands/CommandList.java @@ -22,12 +22,12 @@ public class CommandList extends AbstractCommand { protected ReturnType runCommand(CommandSender sender, String... args) { if (args.length > 1 && args[1].equalsIgnoreCase("chat")) { plugin.getLocale().newMessage(plugin.getEnchantManager().getValues().stream() - .sorted(Comparator.comparing(enchant -> enchant.getGroup().getOrder())) - .map(enchant -> enchant.getColoredIdentifier(true)).collect(Collectors.joining("&7, "))) + .sorted(Comparator.comparing(enchant -> enchant.getGroup().getOrder())) + .map(enchant -> enchant.getColoredIdentifier(true)).collect(Collectors.joining("&7, "))) .sendPrefixedMessage(sender); return ReturnType.SUCCESS; } - plugin.getInfoManager().getMainInfoMenu().open((Player)sender); + plugin.getInfoManager().getMainInfoMenu().open((Player) sender); return ReturnType.SUCCESS; } diff --git a/src/main/java/com/songoda/epicenchants/commands/CommandTinkerer.java b/src/main/java/com/songoda/epicenchants/commands/CommandTinkerer.java index 3238917..cac55f4 100644 --- a/src/main/java/com/songoda/epicenchants/commands/CommandTinkerer.java +++ b/src/main/java/com/songoda/epicenchants/commands/CommandTinkerer.java @@ -19,7 +19,7 @@ public class CommandTinkerer extends AbstractCommand { @Override protected ReturnType runCommand(CommandSender sender, String... args) { - Player player = (Player)sender; + Player player = (Player) sender; new TinkererMenu(plugin, plugin.getFileManager().getConfiguration("menus/tinkerer-menu")).open(player); return ReturnType.SUCCESS; } diff --git a/src/main/java/com/songoda/epicenchants/effect/effects/Fly.java b/src/main/java/com/songoda/epicenchants/effect/effects/Fly.java index 7017ed2..aa98dd1 100644 --- a/src/main/java/com/songoda/epicenchants/effect/effects/Fly.java +++ b/src/main/java/com/songoda/epicenchants/effect/effects/Fly.java @@ -19,5 +19,4 @@ public class Fly extends EffectExecutor { user.setAllowFlight(eventType == ON); user.setFlying(eventType == ON); } - } diff --git a/src/main/java/com/songoda/epicenchants/effect/effects/Potion.java b/src/main/java/com/songoda/epicenchants/effect/effects/Potion.java index 55ea8c8..ffe7d5e 100644 --- a/src/main/java/com/songoda/epicenchants/effect/effects/Potion.java +++ b/src/main/java/com/songoda/epicenchants/effect/effects/Potion.java @@ -44,5 +44,4 @@ public class Potion extends EffectExecutor { consume(entity -> entity.addPotionEffect(new PotionEffect(effectType, (int) duration.get(level, 60, user, opponent) * 20, (int) amplifier.get(level - 1, 0, user, opponent), false, false)), user, opponent); } - } diff --git a/src/main/java/com/songoda/epicenchants/effect/effects/SpawnMob.java b/src/main/java/com/songoda/epicenchants/effect/effects/SpawnMob.java index f943bfa..ab21408 100644 --- a/src/main/java/com/songoda/epicenchants/effect/effects/SpawnMob.java +++ b/src/main/java/com/songoda/epicenchants/effect/effects/SpawnMob.java @@ -1,10 +1,8 @@ package com.songoda.epicenchants.effect.effects; -import com.songoda.core.nms.NmsManager; import com.songoda.epicenchants.effect.EffectExecutor; import com.songoda.epicenchants.enums.EventType; import com.songoda.epicenchants.objects.LeveledModifier; -import com.songoda.core.nms.nbt.NBTEntity; import com.songoda.epicenchants.utils.objects.ItemBuilder; import org.bukkit.Location; import org.bukkit.attribute.Attribute; diff --git a/src/main/java/com/songoda/epicenchants/effect/effects/StealFood.java b/src/main/java/com/songoda/epicenchants/effect/effects/StealFood.java index d8190a3..1fa08cf 100644 --- a/src/main/java/com/songoda/epicenchants/effect/effects/StealFood.java +++ b/src/main/java/com/songoda/epicenchants/effect/effects/StealFood.java @@ -2,7 +2,6 @@ package com.songoda.epicenchants.effect.effects; import com.songoda.epicenchants.effect.EffectExecutor; import com.songoda.epicenchants.enums.EventType; -import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -15,7 +14,7 @@ public class StealFood extends EffectExecutor { @Override public void execute(@NotNull Player user, LivingEntity opponent, int level, EventType eventType) { - int amount = (int)Math.floor(getAmount().get(level, 0, user, opponent)); + int amount = (int) Math.floor(getAmount().get(level, 0, user, opponent)); if (!(opponent instanceof Player)) { return; diff --git a/src/main/java/com/songoda/epicenchants/events/ArmorEquipEvent.java b/src/main/java/com/songoda/epicenchants/events/ArmorEquipEvent.java index 7d08084..bf5d9fb 100644 --- a/src/main/java/com/songoda/epicenchants/events/ArmorEquipEvent.java +++ b/src/main/java/com/songoda/epicenchants/events/ArmorEquipEvent.java @@ -150,6 +150,7 @@ public final class ArmorEquipEvent extends PlayerEvent implements Cancellable { * Attempts to match the ArmorType for the specified ItemStack. * * @param itemStack The ItemStack to parse the type of. + * * @return The parsed ArmorType. (null if none were found.) */ public static ArmorType matchType(final ItemStack itemStack) { diff --git a/src/main/java/com/songoda/epicenchants/events/HeldItemChangedEvent.java b/src/main/java/com/songoda/epicenchants/events/HeldItemChangedEvent.java index 68b7fd8..3b48809 100644 --- a/src/main/java/com/songoda/epicenchants/events/HeldItemChangedEvent.java +++ b/src/main/java/com/songoda/epicenchants/events/HeldItemChangedEvent.java @@ -17,7 +17,7 @@ public final class HeldItemChangedEvent extends PlayerEvent implements Cancellab /** * Constructor for the HeldItemChangedEvent. * - * @param player The player who put (un)equipped an item. + * @param player The player who put (un)equipped an item. * @param oldItem The ItemStack removed. * @param newItem The ItemStack added. */ @@ -116,11 +116,11 @@ public final class HeldItemChangedEvent extends PlayerEvent implements Cancellab */ DEATH, /** - * When an item is picked up into the selected hotbar slot by the player + * When an item is picked up into the selected hotbar slot by the player */ DROP_ITEM, /** - * When an item is dropped from the selected hotbar slot by the player + * When an item is dropped from the selected hotbar slot by the player */ PICKUP_ITEM, ; diff --git a/src/main/java/com/songoda/epicenchants/listeners/ArmorListener.java b/src/main/java/com/songoda/epicenchants/listeners/ArmorListener.java index fbff012..9d9faef 100644 --- a/src/main/java/com/songoda/epicenchants/listeners/ArmorListener.java +++ b/src/main/java/com/songoda/epicenchants/listeners/ArmorListener.java @@ -11,7 +11,11 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.entity.PlayerDeathEvent; -import org.bukkit.event.inventory.*; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryDragEvent; +import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerItemBreakEvent; diff --git a/src/main/java/com/songoda/epicenchants/listeners/EntityListener.java b/src/main/java/com/songoda/epicenchants/listeners/EntityListener.java index 08cb94e..dc30f1e 100644 --- a/src/main/java/com/songoda/epicenchants/listeners/EntityListener.java +++ b/src/main/java/com/songoda/epicenchants/listeners/EntityListener.java @@ -57,7 +57,6 @@ public class EntityListener implements Listener { } } - //Player got hit if (event.getEntity() instanceof Player) { Player defender = (Player) event.getEntity(); diff --git a/src/main/java/com/songoda/epicenchants/listeners/HeldItemListener.java b/src/main/java/com/songoda/epicenchants/listeners/HeldItemListener.java index 756fc70..834d61b 100644 --- a/src/main/java/com/songoda/epicenchants/listeners/HeldItemListener.java +++ b/src/main/java/com/songoda/epicenchants/listeners/HeldItemListener.java @@ -1,14 +1,8 @@ package com.songoda.epicenchants.listeners; -import static com.songoda.epicenchants.enums.EventType.OFF; -import static com.songoda.epicenchants.enums.EventType.ON; -import static com.songoda.epicenchants.enums.TriggerType.HELD_ITEM; import com.songoda.epicenchants.events.ArmorEquipEvent; -import com.songoda.epicenchants.events.HeldItemChangedEvent.EquipMethod; import com.songoda.epicenchants.events.HeldItemChangedEvent; -import java.util.Arrays; -import java.util.OptionalInt; -import java.util.stream.IntStream; +import com.songoda.epicenchants.events.HeldItemChangedEvent.EquipMethod; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -17,7 +11,11 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.PlayerDeathEvent; -import org.bukkit.event.inventory.*; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryDragEvent; +import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerItemBreakEvent; @@ -25,6 +23,10 @@ import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; +import java.util.Arrays; +import java.util.OptionalInt; +import java.util.stream.IntStream; + public class HeldItemListener implements Listener { private static final boolean SWAP_OFFHAND_SUPPORTED = Arrays.stream(ClickType.values()).anyMatch(e -> e.name().equals("SWAP_OFFHAND")); @@ -117,21 +119,21 @@ public class HeldItemListener implements Listener { EquipMethod method; if (numberKey) { if (!(e.getClickedInventory() instanceof PlayerInventory) - || e.getHotbarButton() != heldslot) //we only care about heldslot + || e.getHotbarButton() != heldslot) //we only care about heldslot return; method = EquipMethod.HOTBAR_SWAP; newItem = e.getCurrentItem(); oldItem = e.getClickedInventory().getItem(e.getHotbarButton()); } else if (swapoffhand) { if (!(e.getClickedInventory() instanceof PlayerInventory) - || e.getSlot() != heldslot) //we only care about heldslot + || e.getSlot() != heldslot) //we only care about heldslot return; method = EquipMethod.OFFHAND_SWAP; newItem = e.getClickedInventory().getItem(40); oldItem = e.getCurrentItem(); } else { if (!(e.getClickedInventory() instanceof PlayerInventory) - || e.getSlot() != heldslot) //we only care about heldslot + || e.getSlot() != heldslot) //we only care about heldslot return; method = EquipMethod.PICK_DROP; } @@ -147,7 +149,7 @@ public class HeldItemListener implements Listener { public void inventoryDrag(InventoryDragEvent event) { if (event.getRawSlots().isEmpty()) return; - + int rawslot = event.getRawSlots().stream().findFirst().orElse(0); int invslot = event.getView().convertSlot(rawslot); boolean bottominventory = rawslot != invslot; @@ -208,7 +210,7 @@ public class HeldItemListener implements Listener { if (event.getItem().getItemStack().getMaxStackSize() == 1) { //tools maxStackSize is 1, ignore other items int firstEmpty = event.getPlayer().getInventory().firstEmpty(); if (0 <= firstEmpty && firstEmpty <= 8 - && event.getPlayer().getInventory().getHeldItemSlot() == firstEmpty) + && event.getPlayer().getInventory().getHeldItemSlot() == firstEmpty) Bukkit.getServer().getPluginManager().callEvent(new HeldItemChangedEvent(event.getPlayer(), EquipMethod.PICKUP_ITEM, null, event.getItem().getItemStack())); } } diff --git a/src/main/java/com/songoda/epicenchants/listeners/PlayerListener.java b/src/main/java/com/songoda/epicenchants/listeners/PlayerListener.java index 3c666dd..4bab2c2 100644 --- a/src/main/java/com/songoda/epicenchants/listeners/PlayerListener.java +++ b/src/main/java/com/songoda/epicenchants/listeners/PlayerListener.java @@ -2,7 +2,9 @@ package com.songoda.epicenchants.listeners; import com.songoda.epicenchants.EpicEnchants; import com.songoda.epicenchants.events.ArmorEquipEvent; +import com.songoda.epicenchants.events.HeldItemChangedEvent; import com.songoda.epicenchants.objects.Enchant; +import org.bukkit.Material; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; @@ -12,6 +14,7 @@ import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerItemHeldEvent; import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.inventory.ItemStack; import java.util.Arrays; import java.util.Map; @@ -19,9 +22,6 @@ import java.util.Map; import static com.songoda.epicenchants.enums.EventType.OFF; import static com.songoda.epicenchants.enums.EventType.ON; import static com.songoda.epicenchants.enums.TriggerType.*; -import com.songoda.epicenchants.events.HeldItemChangedEvent; -import org.bukkit.Material; -import org.bukkit.inventory.ItemStack; public class PlayerListener implements Listener { private final EpicEnchants instance; @@ -38,7 +38,7 @@ public class PlayerListener implements Listener { oldArmorMap.forEach((enchant, level) -> enchant.onAction(event.getPlayer(), null, event, level, STATIC_EFFECT, OFF)); newArmorMap.forEach((enchant, level) -> enchant.onAction(event.getPlayer(), null, event, level, STATIC_EFFECT, ON)); } - + @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) public void onHeldItemChanged(HeldItemChangedEvent event) { Map oldItemMap = instance.getEnchantUtils().getEnchants(event.getOldItem()); diff --git a/src/main/java/com/songoda/epicenchants/listeners/item/BookListener.java b/src/main/java/com/songoda/epicenchants/listeners/item/BookListener.java index 264c845..02391ca 100644 --- a/src/main/java/com/songoda/epicenchants/listeners/item/BookListener.java +++ b/src/main/java/com/songoda/epicenchants/listeners/item/BookListener.java @@ -1,7 +1,7 @@ package com.songoda.epicenchants.listeners.item; -import com.songoda.core.nms.nbt.NBTItem; import com.songoda.core.compatibility.CompatibleMaterial; +import com.songoda.core.nms.nbt.NBTItem; import com.songoda.epicenchants.EpicEnchants; import com.songoda.epicenchants.enums.EnchantResult; import com.songoda.epicenchants.events.EnchantApplyEvent; diff --git a/src/main/java/com/songoda/epicenchants/listeners/item/WhiteScrollListener.java b/src/main/java/com/songoda/epicenchants/listeners/item/WhiteScrollListener.java index fab4e3f..08debd6 100644 --- a/src/main/java/com/songoda/epicenchants/listeners/item/WhiteScrollListener.java +++ b/src/main/java/com/songoda/epicenchants/listeners/item/WhiteScrollListener.java @@ -1,7 +1,6 @@ package com.songoda.epicenchants.listeners.item; import com.songoda.core.compatibility.CompatibleMaterial; -import com.songoda.core.nms.nbt.NBTCompound; import com.songoda.core.nms.nbt.NBTItem; import com.songoda.epicenchants.EpicEnchants; import com.songoda.epicenchants.utils.objects.ItemBuilder; diff --git a/src/main/java/com/songoda/epicenchants/managers/FileManager.java b/src/main/java/com/songoda/epicenchants/managers/FileManager.java index 68bbe54..5ae3642 100644 --- a/src/main/java/com/songoda/epicenchants/managers/FileManager.java +++ b/src/main/java/com/songoda/epicenchants/managers/FileManager.java @@ -14,7 +14,11 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.file.Files; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Optional; import static com.songoda.epicenchants.utils.objects.FileLocation.of; import static java.io.File.separator; diff --git a/src/main/java/com/songoda/epicenchants/managers/HookManager.java b/src/main/java/com/songoda/epicenchants/managers/HookManager.java index 60ecd63..dcc7609 100644 --- a/src/main/java/com/songoda/epicenchants/managers/HookManager.java +++ b/src/main/java/com/songoda/epicenchants/managers/HookManager.java @@ -15,5 +15,4 @@ public class HookManager { public Optional getUltimateBottles() { return Optional.ofNullable(ultimateBottles); } - } diff --git a/src/main/java/com/songoda/epicenchants/managers/Manager.java b/src/main/java/com/songoda/epicenchants/managers/Manager.java index 1e95739..040c0b7 100644 --- a/src/main/java/com/songoda/epicenchants/managers/Manager.java +++ b/src/main/java/com/songoda/epicenchants/managers/Manager.java @@ -2,7 +2,11 @@ package com.songoda.epicenchants.managers; import com.songoda.epicenchants.EpicEnchants; -import java.util.*; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; public abstract class Manager { @@ -41,5 +45,4 @@ public abstract class Manager { public void clear() { map.clear(); } - } diff --git a/src/main/java/com/songoda/epicenchants/menus/AlchemistMenu.java b/src/main/java/com/songoda/epicenchants/menus/AlchemistMenu.java index a94581b..0fb3093 100644 --- a/src/main/java/com/songoda/epicenchants/menus/AlchemistMenu.java +++ b/src/main/java/com/songoda/epicenchants/menus/AlchemistMenu.java @@ -213,7 +213,7 @@ public class AlchemistMenu extends FastInv { int leftDestroy = leftItem.getNBTObject("destroy-rate").asInt(); int rightDestroy = rightItem.getNBTObject("destroy-rate").asInt(); - Placeholder[] placeholders = new Placeholder[]{ + Placeholder[] placeholders = new Placeholder[] { of("left_success_rate", leftSuccess), of("right_success_rate", rightSuccess), of("left_destroy_rate", leftDestroy), @@ -227,7 +227,7 @@ public class AlchemistMenu extends FastInv { int successRate = getFromFormula("book.success-rate-formula", placeholders); int destroyRate = getFromFormula("book.destroy-rate-formula", placeholders); - Placeholder[] costPlaceholders = new Placeholder[]{ + Placeholder[] costPlaceholders = new Placeholder[] { of("group_order_index", enchant.getGroup().getOrder()), of("final_success_rate", successRate), of("final_destroy_rate", destroyRate), @@ -240,14 +240,14 @@ public class AlchemistMenu extends FastInv { } else { Group group = instance.getGroupManager().getValue(leftItem.getNBTObject("group").asString()).orElseThrow(() -> new IllegalStateException("Dust without group!")); - Placeholder[] placeholders = new Placeholder[]{ + Placeholder[] placeholders = new Placeholder[] { of("left_percentage", leftItem.getNBTObject("percentage").asInt()), of("right_percentage", rightItem.getNBTObject("percentage").asInt()) }; int successRate = getFromFormula("dust.percentage-formula", placeholders); - Placeholder[] costPlaceholders = new Placeholder[]{ + Placeholder[] costPlaceholders = new Placeholder[] { of("group_order_index", group.getOrder()), of("final_success_rate", successRate), }; @@ -294,4 +294,4 @@ public class AlchemistMenu extends FastInv { return (int) Double.parseDouble(GeneralUtils.parseJS(toTest, "alchemist expression", 0).toString()); } -} \ No newline at end of file +} diff --git a/src/main/java/com/songoda/epicenchants/menus/EnchanterMenu.java b/src/main/java/com/songoda/epicenchants/menus/EnchanterMenu.java index 12386c8..5eb5b42 100644 --- a/src/main/java/com/songoda/epicenchants/menus/EnchanterMenu.java +++ b/src/main/java/com/songoda/epicenchants/menus/EnchanterMenu.java @@ -14,8 +14,10 @@ import java.util.Map; import java.util.UUID; import static com.songoda.epicenchants.objects.Placeholder.of; -import static com.songoda.epicenchants.utils.single.Experience.*; -import static com.songoda.epicenchants.utils.single.GeneralUtils.*; +import static com.songoda.epicenchants.utils.single.Experience.changeExp; +import static com.songoda.epicenchants.utils.single.Experience.getExp; +import static com.songoda.epicenchants.utils.single.GeneralUtils.color; +import static com.songoda.epicenchants.utils.single.GeneralUtils.getSlots; public class EnchanterMenu extends FastInv { private final Map DELAY = new HashMap<>(); diff --git a/src/main/java/com/songoda/epicenchants/menus/InfoMenu.java b/src/main/java/com/songoda/epicenchants/menus/InfoMenu.java index 0a25f4a..70c53b6 100644 --- a/src/main/java/com/songoda/epicenchants/menus/InfoMenu.java +++ b/src/main/java/com/songoda/epicenchants/menus/InfoMenu.java @@ -1,6 +1,5 @@ package com.songoda.epicenchants.menus; -import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.epicenchants.EpicEnchants; import com.songoda.epicenchants.objects.Enchant; import com.songoda.epicenchants.objects.Group; @@ -15,7 +14,8 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; import static com.songoda.epicenchants.objects.Placeholder.of; -import static com.songoda.epicenchants.utils.single.GeneralUtils.*; +import static com.songoda.epicenchants.utils.single.GeneralUtils.color; +import static com.songoda.epicenchants.utils.single.GeneralUtils.getSlots; import static java.util.Arrays.stream; public class InfoMenu extends FastInv { @@ -44,7 +44,6 @@ public class InfoMenu extends FastInv { } })); - Iterator enchantIterator = instance.getEnchantManager().getEnchants(group).iterator(); slots.stream().filter(slot -> enchantIterator.hasNext()).forEach(slot -> { Enchant enchant = enchantIterator.next(); diff --git a/src/main/java/com/songoda/epicenchants/menus/MainInfoMenu.java b/src/main/java/com/songoda/epicenchants/menus/MainInfoMenu.java index 491455f..7fda7c1 100644 --- a/src/main/java/com/songoda/epicenchants/menus/MainInfoMenu.java +++ b/src/main/java/com/songoda/epicenchants/menus/MainInfoMenu.java @@ -7,9 +7,8 @@ import com.songoda.epicenchants.utils.objects.ItemBuilder; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.event.Listener; -import java.util.Optional; - -import static com.songoda.epicenchants.utils.single.GeneralUtils.*; +import static com.songoda.epicenchants.utils.single.GeneralUtils.color; +import static com.songoda.epicenchants.utils.single.GeneralUtils.getSlots; public class MainInfoMenu extends FastInv implements Listener { @@ -26,6 +25,4 @@ public class MainInfoMenu extends FastInv implements Listener { instance.getInfoManager().getMenu(group).ifPresent(menu -> menu.open(event.getPlayer())); })); } - - } diff --git a/src/main/java/com/songoda/epicenchants/menus/TinkererMenu.java b/src/main/java/com/songoda/epicenchants/menus/TinkererMenu.java index ddb5cb9..ef8f1d4 100644 --- a/src/main/java/com/songoda/epicenchants/menus/TinkererMenu.java +++ b/src/main/java/com/songoda/epicenchants/menus/TinkererMenu.java @@ -153,7 +153,6 @@ public class TinkererMenu extends FastInv { } }); - // Player closed inventory onClose(event -> { slotMap.keySet().stream().filter(s -> getInventory().getItem(s) != null).forEach(s -> { diff --git a/src/main/java/com/songoda/epicenchants/objects/BookItem.java b/src/main/java/com/songoda/epicenchants/objects/BookItem.java index 4c8ef34..01a92b6 100644 --- a/src/main/java/com/songoda/epicenchants/objects/BookItem.java +++ b/src/main/java/com/songoda/epicenchants/objects/BookItem.java @@ -1,6 +1,5 @@ package com.songoda.epicenchants.objects; -import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.nms.nbt.NBTItem; import com.songoda.epicenchants.EpicEnchants; import com.songoda.epicenchants.utils.objects.ItemBuilder; @@ -128,5 +127,4 @@ public class BookItem { return "BookItem.BookItemBuilder(instance=" + this.instance + ", material=" + this.material + ", displayName=" + this.displayName + ", lore=" + this.lore + ")"; } } - } diff --git a/src/main/java/com/songoda/epicenchants/objects/Enchant.java b/src/main/java/com/songoda/epicenchants/objects/Enchant.java index 220f1c9..89dac1d 100644 --- a/src/main/java/com/songoda/epicenchants/objects/Enchant.java +++ b/src/main/java/com/songoda/epicenchants/objects/Enchant.java @@ -5,7 +5,6 @@ import com.songoda.epicenchants.effect.EffectExecutor; import com.songoda.epicenchants.enums.EventType; import com.songoda.epicenchants.enums.TriggerType; import com.songoda.epicenchants.utils.single.RomanNumber; -import org.bukkit.Material; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.Event; diff --git a/src/main/java/com/songoda/epicenchants/utils/SpecialItems.java b/src/main/java/com/songoda/epicenchants/utils/SpecialItems.java index ba00a81..007012e 100644 --- a/src/main/java/com/songoda/epicenchants/utils/SpecialItems.java +++ b/src/main/java/com/songoda/epicenchants/utils/SpecialItems.java @@ -56,7 +56,6 @@ public class SpecialItems { return nbtItem.finish(); } - public ItemStack getSecretDust(NBTItem book) { Group group = instance.getEnchantManager().getValueUnsafe(book.getNBTObject("enchant").asString()).getGroup(); return getSecretDust(group, (int) Math.floor(book.getNBTObject("success-rate").asInt() / 10.0)); diff --git a/src/main/java/com/songoda/epicenchants/utils/objects/FastInv.java b/src/main/java/com/songoda/epicenchants/utils/objects/FastInv.java index eedd16b..6176048 100644 --- a/src/main/java/com/songoda/epicenchants/utils/objects/FastInv.java +++ b/src/main/java/com/songoda/epicenchants/utils/objects/FastInv.java @@ -4,7 +4,11 @@ import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; -import org.bukkit.event.inventory.*; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryCloseEvent; +import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.server.PluginDisableEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; @@ -12,7 +16,10 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitTask; -import java.util.*; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; /** * A fast API to easily create advanced GUI. @@ -125,6 +132,7 @@ public class FastInv implements InventoryHolder { * Add an {@link ItemStack} to the menus. * * @param item The item to add + * * @return This FastInv instance, for chaining. */ public FastInv addItem(ItemStack item) { @@ -136,6 +144,7 @@ public class FastInv implements InventoryHolder { * * @param item The item to add. * @param listener The {@link FastInvClickListener} for the item. + * * @return This FastInv instance, for chaining. */ public FastInv addItem(ItemStack item, FastInvClickListener listener) { @@ -153,6 +162,7 @@ public class FastInv implements InventoryHolder { * * @param slot The slot of the item. * @param item The item to add. + * * @return This FastInv instance, for chaining. */ public FastInv addItem(int slot, ItemStack item) { @@ -165,6 +175,7 @@ public class FastInv implements InventoryHolder { * @param slot The slot of the item. * @param item The item to add. * @param listener The FastInvClickListener for the item. + * * @return This FastInv instance, for chaining. */ public FastInv addItem(int slot, ItemStack item, FastInvClickListener listener) { @@ -187,6 +198,7 @@ public class FastInv implements InventoryHolder { * @param slotFrom Starting slot to put the item in. * @param slotTo Ending slot to put the item in. * @param item The item to add. + * * @return This FastInv instance, for chaining. */ public FastInv addItem(int slotFrom, int slotTo, ItemStack item) { @@ -200,6 +212,7 @@ public class FastInv implements InventoryHolder { * @param slotTo Ending slot to put the item in. * @param item The item to add. * @param listener The FastInvClickListener for the item. + * * @return This FastInv instance, for chaining. */ public FastInv addItem(int slotFrom, int slotTo, ItemStack item, FastInvClickListener listener) { @@ -214,6 +227,7 @@ public class FastInv implements InventoryHolder { * * @param slots The slot of the item. * @param item The item to add. + * * @return This FastInv instance, for chaining. */ public FastInv addItem(int[] slots, ItemStack item) { @@ -224,6 +238,7 @@ public class FastInv implements InventoryHolder { * Clear a spot in the inventory. * * @param slot The slot to clear. + * * @return This FastInv instance, for chaining. */ public FastInv clear(int slot) { @@ -234,6 +249,7 @@ public class FastInv implements InventoryHolder { * Add an {@link ItemStack} to the menus on the edges. * * @param item The item to add. + * * @return This FastInv instance, for chaining. */ public FastInv edge(ItemStack item) { @@ -256,6 +272,7 @@ public class FastInv implements InventoryHolder { * @param slots The slots to place the item. * @param item The item to add. * @param listener The FastInvClickListener for the item. + * * @return This FastInv instance, for chaining. */ public FastInv addItem(int[] slots, ItemStack item, FastInvClickListener listener) { @@ -280,6 +297,7 @@ public class FastInv implements InventoryHolder { * Add a {@link FastInvCloseListener} to listen on menus close. * * @param listener The {@link FastInvCloseListener} to add. + * * @return This FastInv instance, for chaining. */ public FastInv onClose(FastInvCloseListener listener) { @@ -291,6 +309,7 @@ public class FastInv implements InventoryHolder { * Add a {@link FastInvClickListener} to listen on menus click. * * @param listener The {@link FastInvClickListener} to add. + * * @return This FastInv instance, for chaining. */ public FastInv onClick(FastInvClickListener listener) { @@ -303,6 +322,7 @@ public class FastInv implements InventoryHolder { * * @param period Delay between each run. * @param runnable The {@link Runnable} task to run. + * * @return This FastInv instance, for chaining. */ public FastInv onUpdate(long period, Runnable runnable) { @@ -315,6 +335,7 @@ public class FastInv implements InventoryHolder { * @param delay Ticks to wait before starting the task. * @param period Delay between each run. * @param runnable The {@link Runnable} task to run. + * * @return This FastInv instance, for chaining */ public FastInv onUpdate(long delay, long period, Runnable runnable) { @@ -366,6 +387,7 @@ public class FastInv implements InventoryHolder { * Set if the tasks will be cancel on menus close. * * @param cancelTasksOnClose Set if the tasks will be cancel + * * @return This FastInv instance, for chaining. */ public FastInv setCancelTasksOnClose(boolean cancelTasksOnClose) { diff --git a/src/main/java/com/songoda/epicenchants/utils/settings/Settings.java b/src/main/java/com/songoda/epicenchants/utils/settings/Settings.java index 9771876..20e2acf 100644 --- a/src/main/java/com/songoda/epicenchants/utils/settings/Settings.java +++ b/src/main/java/com/songoda/epicenchants/utils/settings/Settings.java @@ -27,8 +27,8 @@ public class Settings { public static final ConfigSetting FIRST_LOAD = new ConfigSetting(config, "System.First Load", true); public static final ConfigSetting LANGUGE_MODE = new ConfigSetting(config, "System.Language Mode", "en_US", - "The enabled language file.", - "More language files (if available) can be found in the plugins data folder."); + "The enabled language file.", + "More language files (if available) can be found in the plugins data folder."); /** * In order to set dynamic economy comment correctly, this needs to be diff --git a/src/main/java/com/songoda/epicenchants/utils/single/Experience.java b/src/main/java/com/songoda/epicenchants/utils/single/Experience.java index 0828b99..8dfbdb3 100644 --- a/src/main/java/com/songoda/epicenchants/utils/single/Experience.java +++ b/src/main/java/com/songoda/epicenchants/utils/single/Experience.java @@ -13,6 +13,7 @@ public class Experience { * Calculates a player's total exp based on level and progress to next. * * @param player the Player + * * @return the amount of exp the Player has */ public static int getExp(Player player) { @@ -30,6 +31,7 @@ public class Experience { * 4.5[Level]2 - 162.5[Level] + 2220 (at level 31+)" * * @param level the level + * * @return the total experience calculated */ public static int getExpFromLevel(int level) { @@ -46,6 +48,7 @@ public class Experience { * Calculates level based on total experience. * * @param exp the total experience + * * @return the level calculated */ public static double getLevelFromExp(long exp) { @@ -99,5 +102,4 @@ public class Experience { player.setLevel(level); player.setExp((float) (levelAndExp - level)); } - -} \ No newline at end of file +} diff --git a/src/main/java/com/songoda/epicenchants/utils/single/ItemGroup.java b/src/main/java/com/songoda/epicenchants/utils/single/ItemGroup.java index 1ea7fb4..7792621 100644 --- a/src/main/java/com/songoda/epicenchants/utils/single/ItemGroup.java +++ b/src/main/java/com/songoda/epicenchants/utils/single/ItemGroup.java @@ -105,7 +105,6 @@ public class ItemGroup { return out; } - public enum Group { AXES, HOES, diff --git a/src/main/java/com/songoda/epicenchants/utils/single/Placeholders.java b/src/main/java/com/songoda/epicenchants/utils/single/Placeholders.java index 0609c0b..d692579 100644 --- a/src/main/java/com/songoda/epicenchants/utils/single/Placeholders.java +++ b/src/main/java/com/songoda/epicenchants/utils/single/Placeholders.java @@ -12,7 +12,12 @@ import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; -import java.util.*; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Optional; +import java.util.Set; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiFunction; @@ -98,7 +103,6 @@ public class Placeholders { AtomicReference output = new AtomicReference<>(input); - REGEX_CONSUMERS.forEach(consumer -> consumer.accept(output)); Optional.ofNullable(event).ifPresent(e -> EVENT_FUNCTIONS.forEach((toReplace, function) -> output.updateAndGet(string -> string.replace(toReplace, "'" + function.apply(e) + "'")))); @@ -112,6 +116,4 @@ public class Placeholders { return output.get(); } - - } diff --git a/src/main/resources/enchants/elite/AntiGravity.yml b/src/main/resources/enchants/elite/AntiGravity.yml index 24abb11..7367178 100644 --- a/src/main/resources/enchants/elite/AntiGravity.yml +++ b/src/main/resources/enchants/elite/AntiGravity.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: AntiGravity @@ -29,4 +29,3 @@ effects: potion-type: JUMP # The amplifier of the potion effect. amplifier: "{level}" - \ No newline at end of file diff --git a/src/main/resources/enchants/elite/Frozen.yml b/src/main/resources/enchants/elite/Frozen.yml index 54d36d6..1443435 100644 --- a/src/main/resources/enchants/elite/Frozen.yml +++ b/src/main/resources/enchants/elite/Frozen.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Frozen @@ -36,4 +36,3 @@ effects: chance: "5 * {level}" # Who should this effect be ran on. who: OPPONENT - \ No newline at end of file diff --git a/src/main/resources/enchants/elite/Healy.yml b/src/main/resources/enchants/elite/Healy.yml index 7ce7c02..3cfcb03 100644 --- a/src/main/resources/enchants/elite/Healy.yml +++ b/src/main/resources/enchants/elite/Healy.yml @@ -1,46 +1,35 @@ - -#Who made this? -Author: Auora +author: Auora # The enchant identifier must be unique. identifier: Healy - + # The max level for this enchant. max-level: 4 - + # The group of this enchant. Configure the groups in the groups.yml file. group: ELITE - + book-item: - material: BOOK - display-name: "&a&lHealy {level}" - + # The lore on the enchantments books. - lore: - - "&7Drag on to enchant" - - "&a{success_rate}% Success Rate" - - "&c{destroy_rate}% Destroy Rate" - - - + # How the enchant should be formatted on the enchanted item. - applied-format: "&aHealy {level}" - + # Description description: - "A chance of remove the players effects" - + # What items this enchant can be applied to. item-whitelist: - "ARMOR" - + # For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials effects: REMOVE_EFFECT: @@ -51,4 +40,4 @@ effects: # The potion type. potion-type: POISON # Chance of the effect firing. - chance: "3 * {level}" \ No newline at end of file + chance: "3 * {level}" diff --git a/src/main/resources/enchants/elite/Poison.yml b/src/main/resources/enchants/elite/Poison.yml index f2ba371..1e7d03d 100644 --- a/src/main/resources/enchants/elite/Poison.yml +++ b/src/main/resources/enchants/elite/Poison.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Poison @@ -34,4 +34,4 @@ effects: # Duration of the potion effect. duration: "{level} * 2" # Chance of the effect firing. - chance: "3 * {level}" \ No newline at end of file + chance: "3 * {level}" diff --git a/src/main/resources/enchants/elite/RocketEscape.yml b/src/main/resources/enchants/elite/RocketEscape.yml index 884b5dd..dab7772 100644 --- a/src/main/resources/enchants/elite/RocketEscape.yml +++ b/src/main/resources/enchants/elite/RocketEscape.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: RocketEscape @@ -35,4 +35,3 @@ effects: chance: "{level} * 10" # Only fire at low HP condition: "{user_health} < 5" - \ No newline at end of file diff --git a/src/main/resources/enchants/elite/Shocky.yml b/src/main/resources/enchants/elite/Shocky.yml index 9a2b8d3..92e96e0 100644 --- a/src/main/resources/enchants/elite/Shocky.yml +++ b/src/main/resources/enchants/elite/Shocky.yml @@ -1,54 +1,45 @@ +author: Auora + # The enchant identifier must be unique. -#Who made this? - -Author: Auora - identifier: Shocky - + # The max level for this enchant. max-level: 5 # The group of this enchant. Configure the groups in the groups.yml file. group: ELITE - + book-item: - material: BOOK - display-name: "&b&lShocky {level}" - + # The lore on the enchantments books. - lore: - - "&7Drag on to enchant" - - "&a{success_rate}% Success Rate" - - "&c{destroy_rate}% Destroy Rate" - - - + + + # How the enchant should be formatted on the enchanted item. - applied-format: "&bShocky {level}" - + # Description description: - "A chance of forming an explosion while mining" - + # What items this enchant can be applied to. item-whitelist: - "PICKAXE" - + # For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials effects: SPAWN_TNT: # The trigger that will fire this effect. trigger: BLOCK_BREAK - + fuse: 0 amount: "{random(low=0, up={level})}" # Chance of the effect firing. - chance: "5 * {level}" \ No newline at end of file + chance: "5 * {level}" diff --git a/src/main/resources/enchants/elite/Wither.yml b/src/main/resources/enchants/elite/Wither.yml index d6e48a5..efc8e37 100644 --- a/src/main/resources/enchants/elite/Wither.yml +++ b/src/main/resources/enchants/elite/Wither.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Wither @@ -36,4 +36,3 @@ effects: chance: "5 * {level}" # Who should this effect be ran on. who: OPPONENT - \ No newline at end of file diff --git a/src/main/resources/enchants/legendary/DeathBringer.yml b/src/main/resources/enchants/legendary/DeathBringer.yml index e1e9018..8e3ef02 100644 --- a/src/main/resources/enchants/legendary/DeathBringer.yml +++ b/src/main/resources/enchants/legendary/DeathBringer.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: DeathBringer @@ -30,4 +30,4 @@ effects: # The duration of the effect. duration: "{level} * 2" # Chance that this effect will fire. - chance: "{level} * 5" \ No newline at end of file + chance: "{level} * 5" diff --git a/src/main/resources/enchants/legendary/DeathGod.yml b/src/main/resources/enchants/legendary/DeathGod.yml index c6c4a8c..ded4283 100644 --- a/src/main/resources/enchants/legendary/DeathGod.yml +++ b/src/main/resources/enchants/legendary/DeathGod.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: DeathGod @@ -31,4 +31,4 @@ effects: # Only trigger this effect when the user has less than 2 hearts. condition: "{user_health} < 4" # Chance that this effect wil fire. - chance: "100*{level}" \ No newline at end of file + chance: "100*{level}" diff --git a/src/main/resources/enchants/legendary/Divergent.yml b/src/main/resources/enchants/legendary/Divergent.yml index bacebd7..ba56789 100644 --- a/src/main/resources/enchants/legendary/Divergent.yml +++ b/src/main/resources/enchants/legendary/Divergent.yml @@ -1,95 +1,65 @@ -#Who made this? - -Author: Auora +author: Auora # The enchant identifier must be unique. - identifier: Divergent # The max level for this enchant. - max-level: 4 # The group of this enchant. Configure the groups in the groups.yml file. - group: LEGENDARY -  - book-item: + material: BOOK + display-name: "&c&lDivergent {level}" -  material: BOOK - -  display-name: "&c&lDivergent {level}" - -  # The lore on the enchantments books. -  -  lore: - -    - "&7Drag on to enchant" -    - "&a{success_rate}% Success Rate" -    - "&c{destroy_rate}% Destroy Rate" + # The lore on the enchantments books. + lore: + - "&7Drag on to enchant" + - "&a{success_rate}% Success Rate" + - "&c{destroy_rate}% Destroy Rate" # How the enchant should be formatted on the enchanted item. - applied-format: "&cDivergent {level}" # Description - description: - -  - "A chance of giving your opponent slowness and you speed!" + - "A chance of giving your opponent slowness and you speed!" # What items this enchant can be applied to. - item-whitelist: + - "ARMOR" -  - "ARMOR" - -# For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials - +# For a full list of effects, please visit: https://wiki.songoda.com/Epic_Enchants#Tutorials effects: + POTION: + # The trigger that will fire this effect. + trigger: ATTACK_PLAYER_MELEE -  POTION: + # Who do you want to give the effect? + who: OPPONENT -    # The trigger that will fire this effect. + # What player should the effect be ran on: WEARER/OPPONENT. + potion-type: SLOWNESS -    trigger: ATTACK_PLAYER_MELEE + amplifier: "{level}" + duration: "{level} * 3" -    # Who do you want to give the effect? + # Chance of the effect firing. + chance: "4 * {level}" -    who: OPPONENT + POTION-2: + # The trigger that will fire this effect. + trigger: ATTACK_PLAYER_MELEE -    # What player should the effect be ran on: WEARER/OPPONENT. + # Who do you want to give the effect? + who: USER -    potion-type: SLOWNESS + # What player should the effect be ran on: WEARER/OPPONENT. + potion-type: SPEED -    amplifier: "{level}" + amplifier: "{level}" + duration: "{level} * 3" -    duration: "{level} * 3" - -    # Chance of the effect firing. - -    chance: "4 * {level}" - -  POTION-2: - -    # The trigger that will fire this effect. - -    trigger: ATTACK_PLAYER_MELEE - -    # Who do you want to give the effect? - -    who: USER - -    # What player should the effect be ran on: WEARER/OPPONENT. - -    potion-type: SPEED - -    amplifier: "{level}" - -    duration: "{level} * 3" - -    # Chance of the effect firing. - -    chance: "4 * {level}" \ No newline at end of file + # Chance of the effect firing. + chance: "4 * {level}" diff --git a/src/main/resources/enchants/legendary/Drunk.yml b/src/main/resources/enchants/legendary/Drunk.yml index ce41657..f848e2d 100644 --- a/src/main/resources/enchants/legendary/Drunk.yml +++ b/src/main/resources/enchants/legendary/Drunk.yml @@ -1,47 +1,35 @@ -#Who made this? - -Author: Auora - +author: Auora # The enchant identifier must be unique. identifier: Drunk - + # The max level for this enchant. max-level: 4 - + # The group of this enchant. Configure the groups in the groups.yml file. group: LEGENDARY - + book-item: - material: BOOK - display-name: "&2&lDrunk {level}" - + # The lore on the enchantments books. - lore: - - "&7Drag on to enchant" - - "&a{success_rate}% Success Rate" - - "&c{destroy_rate}% Destroy Rate" - - - + # How the enchant should be formatted on the enchanted item. - applied-format: "&2Drunk {level}" - + # Description description: - "A chance of making your opponent drunk!" - + # What items this enchant can be applied to. item-whitelist: - "ARMOR" - + # For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials effects: POTION: @@ -51,9 +39,9 @@ effects: who: OPPONENT # What player should the effect be ran on: WEARER/OPPONENT. potion-type: NAUSEA - + amplifier: "{level}" - duration: "{level} * 3" + # Chance of the effect firing. - chance: "4 * {level}" \ No newline at end of file + chance: "4 * {level}" diff --git a/src/main/resources/enchants/legendary/Enlightened.yml b/src/main/resources/enchants/legendary/Enlightened.yml index d2066e6..c0b4c28 100644 --- a/src/main/resources/enchants/legendary/Enlightened.yml +++ b/src/main/resources/enchants/legendary/Enlightened.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Enlightened @@ -25,7 +25,9 @@ effects: MODIFY_HEALTH: # The trigger that will fire this effect trigger: "DEFENSE_PLAYER_MELEE, DEFENSE_MOB_MELEE" + # How much life does it should add amount: "+1" + # Chances for the event to proceed - chance: "10*{level}" \ No newline at end of file + chance: "10*{level}" diff --git a/src/main/resources/enchants/legendary/Gears.yml b/src/main/resources/enchants/legendary/Gears.yml index a65cac4..08bf7c9 100644 --- a/src/main/resources/enchants/legendary/Gears.yml +++ b/src/main/resources/enchants/legendary/Gears.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Gears @@ -25,7 +25,9 @@ effects: POTION: # The trigger that will fire this effect. trigger: STATIC_EFFECT + # The potion type. potion-type: SPEED + # The amplifier of the potion effect. - amplifier: "{level}" \ No newline at end of file + amplifier: "{level}" diff --git a/src/main/resources/enchants/legendary/LifeSteal.yml b/src/main/resources/enchants/legendary/LifeSteal.yml index 8748b59..2ca7abb 100644 --- a/src/main/resources/enchants/legendary/LifeSteal.yml +++ b/src/main/resources/enchants/legendary/LifeSteal.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: LifeSteal @@ -25,7 +25,9 @@ effects: STEAL_HEALTH: # The trigger that will fire this effect trigger: ATTACK_PLAYER_MELEE + # How much life does it should steal amount: 1 + # Chance that this effect wil fire. - chance: "5*{level}" \ No newline at end of file + chance: "5*{level}" diff --git a/src/main/resources/enchants/legendary/Overload.yml b/src/main/resources/enchants/legendary/Overload.yml index 69d98a5..75909cd 100644 --- a/src/main/resources/enchants/legendary/Overload.yml +++ b/src/main/resources/enchants/legendary/Overload.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Overload @@ -25,7 +25,9 @@ effects: POTION: # The trigger that will fire this effect. trigger: STATIC_EFFECT + # The potion type. potion-type: HEALTH_BOOST + # The amplifier of the potion effect. - amplifier: "{level}" \ No newline at end of file + amplifier: "{level}" diff --git a/src/main/resources/enchants/legendary/Resist.yml b/src/main/resources/enchants/legendary/Resist.yml index cbad523..48e9178 100644 --- a/src/main/resources/enchants/legendary/Resist.yml +++ b/src/main/resources/enchants/legendary/Resist.yml @@ -12,9 +12,6 @@ group: LEGENDARY # How the enchant should be formatted on the enchanted item. applied-format: "&bResist {level}" -# How the enchant should be formatted on the enchanted item. -applied-format: "&bResist {level}" - # Description description: - "A chance of giving the resist effect." @@ -28,13 +25,18 @@ effects: POTION: # The trigger that will fire this effect. trigger: STATIC_EFFECT + # What player should the effect be ran on: WEARER/OPPONENT. who: USER + # The potion type. potion-type: DAMAGE_RESISTANCE + # The amplifier of the potion effect. amplifier: "{level}" + # Duration of the potion effect. duration: "{level} * 10" + # Chance of the effect firing. - chance: "100" \ No newline at end of file + chance: "100" diff --git a/src/main/resources/enchants/legendary/SkillSwipe.yml b/src/main/resources/enchants/legendary/SkillSwipe.yml index ab801e4..ee7a61f 100644 --- a/src/main/resources/enchants/legendary/SkillSwipe.yml +++ b/src/main/resources/enchants/legendary/SkillSwipe.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: SkillSwipe @@ -25,7 +25,9 @@ effects: STEAL_EXP: # The trigger that will fire this effect trigger: ATTACK_PLAYER_MELEE + # Chance that this effect wil fire. chance: "5 * {level}" + # Amount of EXP to be stolen. - amount: 100 \ No newline at end of file + amount: 100 diff --git a/src/main/resources/enchants/simple/Aquatic.yml b/src/main/resources/enchants/simple/Aquatic.yml index 1c76680..d34ee25 100644 --- a/src/main/resources/enchants/simple/Aquatic.yml +++ b/src/main/resources/enchants/simple/Aquatic.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Aquatic @@ -25,5 +25,6 @@ effects: POTION: # The trigger that will fire this effect trigger: STATIC_EFFECT + # Potion Effect that should be applied. - potion-type: WATER_BREATHING \ No newline at end of file + potion-type: WATER_BREATHING diff --git a/src/main/resources/enchants/simple/Confusion.yml b/src/main/resources/enchants/simple/Confusion.yml index a17f6b5..fede3ae 100644 --- a/src/main/resources/enchants/simple/Confusion.yml +++ b/src/main/resources/enchants/simple/Confusion.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Confusion @@ -26,13 +26,18 @@ effects: POTION: # The trigger that will fire this effect trigger: ATTACK_PLAYER_MELEE + # What player should the effect be ran on: WEARER/OPPONENT. who: OPPONENT + # Potion Effect that should be applied. potion-type: CONFUSION + # Duration of the Potion Effect in seconds. duration: "3 * {level}" + # Chance that the Effect gets activated. chance: "5 * {level}" + # Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc. - amplifier: "{level}" \ No newline at end of file + amplifier: "{level}" diff --git a/src/main/resources/enchants/simple/Experience.yml b/src/main/resources/enchants/simple/Experience.yml index 827a55c..87581b8 100644 --- a/src/main/resources/enchants/simple/Experience.yml +++ b/src/main/resources/enchants/simple/Experience.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Experience @@ -26,9 +26,12 @@ effects: MODIFY_EXP: # Chance that this will happen chance: "20 * {level}" + # The trigger that will fire this effect trigger: EXPERIENCE_BLOCK_BREAK + # What player should the effect be ran on: USER/OPPONENT. who: USER + # Amount of EXP to add - amount: "10 * {level}" \ No newline at end of file + amount: "10 * {level}" diff --git a/src/main/resources/enchants/simple/Glowing.yml b/src/main/resources/enchants/simple/Glowing.yml index cf5132b..aa8a10c 100644 --- a/src/main/resources/enchants/simple/Glowing.yml +++ b/src/main/resources/enchants/simple/Glowing.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Glowing @@ -25,5 +25,6 @@ effects: POTION-1: # The trigger that will fire this effect trigger: STATIC_EFFECT + # Potion effect type - potion-type: NIGHT_VISION \ No newline at end of file + potion-type: NIGHT_VISION diff --git a/src/main/resources/enchants/simple/Haste.yml b/src/main/resources/enchants/simple/Haste.yml index 8c63ae2..ff12122 100644 --- a/src/main/resources/enchants/simple/Haste.yml +++ b/src/main/resources/enchants/simple/Haste.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Haste @@ -26,8 +26,9 @@ effects: POTION: # The trigger that will fire this effect trigger: HELD_ITEM + # Potion Effect that should be applied. potion-type: FAST_DIGGING + # Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc. amplifier: "{level}" - \ No newline at end of file diff --git a/src/main/resources/enchants/simple/Insomnia.yml b/src/main/resources/enchants/simple/Insomnia.yml index c720840..d3ad4cf 100644 --- a/src/main/resources/enchants/simple/Insomnia.yml +++ b/src/main/resources/enchants/simple/Insomnia.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Insomnia @@ -26,39 +26,52 @@ effects: POTION-1: # Chance that this will happen chance: "5 * {level}" + # The trigger that will fire this effect trigger: ATTACK_PLAYER_MELEE + # What player should the effect be ran on: USER/OPPONENT. who: OPPONENT + # Amount of EXP to add potion-type: CONFUSION + # Duration of the Potion Effect in seconds. duration: "3 * {level}" - # Chance that the Effect gets activated. - chance: "5 * {level}" + # Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc. amplifier: "{level}" + # Simultaneous simultaneous: - POTION: - # What player should the effect be ran on: USER/OPPONENT. - who: OPPONENT - # Amount of EXP to add - potion-type: SLOW_DIGGING - # Duration of the Potion Effect in seconds. - duration: "3 * {level}" - # Chance that the Effect gets activated. - chance: "5 * {level}" - # Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc. - amplifier: "{level}" - POTION-1: - # What player should the effect be ran on: USER/OPPONENT. - who: OPPONENT - # Amount of EXP to add - potion-type: SLOW - # Duration of the Potion Effect in seconds. - duration: "3 * {level}" - # Chance that the Effect gets activated. - chance: "5 * {level}" - # Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc. - amplifier: "{level}" \ No newline at end of file + POTION: + # What player should the effect be ran on: USER/OPPONENT. + who: OPPONENT + + # Amount of EXP to add + potion-type: SLOW_DIGGING + + # Duration of the Potion Effect in seconds. + duration: "3 * {level}" + + # Chance that the Effect gets activated. + chance: "5 * {level}" + + # Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc. + amplifier: "{level}" + + POTION-1: + # What player should the effect be ran on: USER/OPPONENT. + who: OPPONENT + + # Amount of EXP to add + potion-type: SLOW + + # Duration of the Potion Effect in seconds. + duration: "3 * {level}" + + # Chance that the Effect gets activated. + chance: "5 * {level}" + + # Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc. + amplifier: "{level}" diff --git a/src/main/resources/enchants/simple/Lightning.yml b/src/main/resources/enchants/simple/Lightning.yml index b9f62e6..ccf77b8 100644 --- a/src/main/resources/enchants/simple/Lightning.yml +++ b/src/main/resources/enchants/simple/Lightning.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Lightning @@ -26,7 +26,9 @@ effects: LIGHTNING: # Chance that this will happen chance: "5 * {level}" + # The trigger that will fire this effect trigger: ATTACK_PLAYER_RANGE + # What player should the effect be ran on: USER/OPPONENT. - who: OPPONENT \ No newline at end of file + who: OPPONENT diff --git a/src/main/resources/enchants/simple/Obliterate.yml b/src/main/resources/enchants/simple/Obliterate.yml index 7a4a931..b2905f3 100644 --- a/src/main/resources/enchants/simple/Obliterate.yml +++ b/src/main/resources/enchants/simple/Obliterate.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Obliterate @@ -25,13 +25,18 @@ effects: THROW: # Chance that this will happen chance: "5 * {level}" + # The trigger that will fire this effect trigger: ATTACK_PLAYER_MELEE + # What player should the effect be ran on: USER/OPPONENT. who: OPPONENT + # What direction the player should be moved in: UP/DOWN/BACKWARD/FORWARD direction: FORWARD + # Magnitude of the throw magnitude: "0.2 * {level}" + # What the direction should relative to - relative-to: USER \ No newline at end of file + relative-to: USER diff --git a/src/main/resources/enchants/simple/Oxygenate.yml b/src/main/resources/enchants/simple/Oxygenate.yml index 683d9d4..f384224 100644 --- a/src/main/resources/enchants/simple/Oxygenate.yml +++ b/src/main/resources/enchants/simple/Oxygenate.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: Songoda # The enchant identifier must be unique. identifier: Oxygenate @@ -26,11 +26,15 @@ effects: POTION: # The trigger that will fire this effect trigger: BLOCK_BREAK + # Potion Effect that should be applied. potion-type: WATER_BREATHING + # Chance that this will happen chance: "10 * {level}" + # Amount of oxygen to refill amount: "{level}" + # What player should the effect be ran on: USER/OPPONENT. - who: USER \ No newline at end of file + who: USER diff --git a/src/main/resources/enchants/ultimate/Blind.yml b/src/main/resources/enchants/ultimate/Blind.yml index 053a1ae..ea78fe0 100644 --- a/src/main/resources/enchants/ultimate/Blind.yml +++ b/src/main/resources/enchants/ultimate/Blind.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: "Songoda" # The enchant identifier must be unique. identifier: Blind @@ -20,7 +20,7 @@ description: # What items this enchant can be applied to. item-whitelist: - "WEAPONS" - + # For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials effects: POTION: @@ -35,4 +35,4 @@ effects: # Who this effect should be ran on. who: OPPONENT # Chance that this effect wil fire. - chance: "10*{level}" \ No newline at end of file + chance: "10*{level}" diff --git a/src/main/resources/enchants/ultimate/Dodge.yml b/src/main/resources/enchants/ultimate/Dodge.yml index 3bfa74a..87c5b6a 100644 --- a/src/main/resources/enchants/ultimate/Dodge.yml +++ b/src/main/resources/enchants/ultimate/Dodge.yml @@ -28,4 +28,3 @@ effects: trigger: "DEFENSE_PLAYER_MELEE,DEFENSE_MOB_MELEE" # Chance that this effect wil fire. chance: "{user_is_sneaking} ? (8 * {level}) : (4 * {level})" - \ No newline at end of file diff --git a/src/main/resources/enchants/ultimate/Fly.yml b/src/main/resources/enchants/ultimate/Fly.yml index 6438892..02353f0 100644 --- a/src/main/resources/enchants/ultimate/Fly.yml +++ b/src/main/resources/enchants/ultimate/Fly.yml @@ -26,4 +26,4 @@ item-whitelist: effects: FLY: # The trigger that will fire this effect - trigger: STATIC_EFFECT, HELD_ITEM \ No newline at end of file + trigger: STATIC_EFFECT, HELD_ITEM diff --git a/src/main/resources/enchants/ultimate/FoodSteal.yml b/src/main/resources/enchants/ultimate/FoodSteal.yml index 4c1e83e..e162c09 100644 --- a/src/main/resources/enchants/ultimate/FoodSteal.yml +++ b/src/main/resources/enchants/ultimate/FoodSteal.yml @@ -28,4 +28,4 @@ effects: # How much food does it should steal amount: 3 # Chance that this effect wil fire. - chance: "5*{level}" \ No newline at end of file + chance: "5*{level}" diff --git a/src/main/resources/enchants/ultimate/StormFall.yml b/src/main/resources/enchants/ultimate/StormFall.yml index 38b663b..3974598 100644 --- a/src/main/resources/enchants/ultimate/StormFall.yml +++ b/src/main/resources/enchants/ultimate/StormFall.yml @@ -1,4 +1,4 @@ -author: "Songoda" +author: "Songoda" # The enchant identifier must be unique. identifier: StormFall @@ -35,7 +35,7 @@ effects: trigger: ATTACK_PLAYER_RANGE who: OPPONENT chance: '100*{level}-200' -#--------------------------------------- + # --------------------------------------- LIGHTNING-4: trigger: ATTACK_MOB_RANGE who: OPPONENT @@ -47,4 +47,4 @@ effects: LIGHTNING-6: trigger: ATTACK_MOB_RANGE who: OPPONENT - chance: '100*{level}-200' \ No newline at end of file + chance: '100*{level}-200' diff --git a/src/main/resources/enchants/unique/Berserk.yml b/src/main/resources/enchants/unique/Berserk.yml index 63a34d1..bd553b2 100644 --- a/src/main/resources/enchants/unique/Berserk.yml +++ b/src/main/resources/enchants/unique/Berserk.yml @@ -44,4 +44,4 @@ effects: # Chance that the Effect gets activated. chance: "5 * {level}" # Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc. - amplifier: "{level}" \ No newline at end of file + amplifier: "{level}" diff --git a/src/main/resources/enchants/unique/Decapitation.yml b/src/main/resources/enchants/unique/Decapitation.yml index 1904d53..b6e5f38 100644 --- a/src/main/resources/enchants/unique/Decapitation.yml +++ b/src/main/resources/enchants/unique/Decapitation.yml @@ -2,25 +2,25 @@ author: Hipopotofobia # The enchant identifier must be unique. identifier: Decapitation - + # The max level for this enchant. max-level: 3 - + # The group of this enchant. Configure the groups in the groups.yml file. group: UNIQUE - + # How the enchant should be formatted on the enchanted item. applied-format: "&eDecapitation {level}" - + # Description description: - "Decapitate your victim and" - "keep their head as a trophy!" - + # What items this enchant can be applied to. item-whitelist: - "AXES" - + # For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials effects: DROP_HEAD: @@ -29,4 +29,4 @@ effects: # The trigger that will fire this effect trigger: ATTACK_PLAYER_MELEE # What player should the effect be ran on: USER/OPPONENT. - who: OPPONENT \ No newline at end of file + who: OPPONENT diff --git a/src/main/resources/enchants/unique/Explosive.yml b/src/main/resources/enchants/unique/Explosive.yml index 7e2049e..b8aa00e 100644 --- a/src/main/resources/enchants/unique/Explosive.yml +++ b/src/main/resources/enchants/unique/Explosive.yml @@ -31,4 +31,4 @@ effects: # What player should the effect be ran on: USER/OPPONENT. who: OPPONENT # Magnitude of the throw - magnitude: "1 * {level}" \ No newline at end of file + magnitude: "1 * {level}" diff --git a/src/main/resources/enchants/unique/FeatherWeight.yml b/src/main/resources/enchants/unique/FeatherWeight.yml index 5f1ab54..744632c 100644 --- a/src/main/resources/enchants/unique/FeatherWeight.yml +++ b/src/main/resources/enchants/unique/FeatherWeight.yml @@ -31,4 +31,4 @@ effects: # Amplifier of 0 = SPEED 1 a Amplifier of 1 = SPEED 2, etc. amplifier: "{level}" # Chance that this will happen - chance: "10 * {level}" \ No newline at end of file + chance: "10 * {level}" diff --git a/src/main/resources/enchants/unique/Inquisitive.yml b/src/main/resources/enchants/unique/Inquisitive.yml index efaf026..9117cb0 100644 --- a/src/main/resources/enchants/unique/Inquisitive.yml +++ b/src/main/resources/enchants/unique/Inquisitive.yml @@ -2,21 +2,21 @@ author: Tin # The enchant identifier must be unique. identifier: Inquisitive - + # The max level for this enchant. max-level: 5 - + # The group of this enchant. Configure the groups in the groups.yml file. group: UNIQUE - + # The item that the enchantment book is. description: - "A chance to receive" - "more EXP when killing mobs." - + # How the enchant should be formatted on the enchanted item. applied-format: "&cInquisitive {level}" - + # What items this enchant can be applied too. item-whitelist: - "SWORDS" @@ -31,4 +31,4 @@ effects: # Chance that this will happen chance: "20 * {level}" # Amount of EXP to add - amount: "3 * {level}" \ No newline at end of file + amount: "3 * {level}" diff --git a/src/main/resources/enchants/unique/PlagueCarrier.yml b/src/main/resources/enchants/unique/PlagueCarrier.yml index 0878256..4d49e18 100644 --- a/src/main/resources/enchants/unique/PlagueCarrier.yml +++ b/src/main/resources/enchants/unique/PlagueCarrier.yml @@ -20,7 +20,7 @@ description: # What items this enchant can be applied to. item-whitelist: - "LEGGINGS" - + # For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials effects: SPAWN_MOB: @@ -35,4 +35,4 @@ effects: # Condition condition: "{user_health} < 4" # Display name of the spawned mob - display-name: "&cPlague carrier" \ No newline at end of file + display-name: "&cPlague carrier" diff --git a/src/main/resources/enchants/unique/Ragdoll.yml b/src/main/resources/enchants/unique/Ragdoll.yml index 6380740..c890447 100644 --- a/src/main/resources/enchants/unique/Ragdoll.yml +++ b/src/main/resources/enchants/unique/Ragdoll.yml @@ -15,7 +15,7 @@ applied-format: "&Ragdoll {level}" # Description description: - "A chance to be pushed back when." - - "you take damage." + - "you take damage." # What items this enchant can be applied to. item-whitelist: @@ -35,4 +35,4 @@ effects: # Magnitude of the throw magnitude: "0.1 * {level}" # What the direction should relative to - relative-to: USER \ No newline at end of file + relative-to: USER diff --git a/src/main/resources/enchants/unique/SelfDestruct.yml b/src/main/resources/enchants/unique/SelfDestruct.yml index 2d21325..2f29ea9 100644 --- a/src/main/resources/enchants/unique/SelfDestruct.yml +++ b/src/main/resources/enchants/unique/SelfDestruct.yml @@ -19,7 +19,7 @@ description: # What items this enchant can be applied to. item-whitelist: - "ARMOR" - + # For a full list of effects, please visit: https://docs.songoda.com/epic-series/epicenchants/tutorials effects: SPAWN_TNT: @@ -32,4 +32,4 @@ effects: # Condition condition: "{user_health} < 4" # The fuse of the TNT - fuse: 60 \ No newline at end of file + fuse: 60 diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 00d75bf..89d468c 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,11 +1,20 @@ -name: EpicEnchants -version: maven-version-number -main: com.songoda.epicenchants.EpicEnchants -authors: [Songoda] -website: https://songoda.com/ -softdepend: [Vault, PlayerPoints, UltimateBottles, PlaceholderAPI] +name: ${project.name} +description: ${project.description} +version: ${project.version} api-version: 1.13 + +main: com.songoda.epicenchants.EpicEnchants +softdepend: + - PlaceholderAPI + - PlayerPoints + - UltimateBottles + - Vault + +author: Songoda +website: ${project.url} + commands: ee: - aliases: [epicenchants] - ussage: reload \ No newline at end of file + aliases: + - epicenchants + ussage: reload diff --git a/src/main/resources/version-dependent/legacy/menus/enchanter-menu.yml b/src/main/resources/version-dependent/legacy/menus/enchanter-menu.yml index e91d945..6727e3d 100644 --- a/src/main/resources/version-dependent/legacy/menus/enchanter-menu.yml +++ b/src/main/resources/version-dependent/legacy/menus/enchanter-menu.yml @@ -1,10 +1,10 @@ title: "Enchanter" rows: 3 - #You can choose to fill the entire inventory with this material - #fill: - # material: "MATERIAL_HERE" - # display-name: "&r" +# You can choose to fill the entire inventory with this material +# fill: +# material: "MATERIAL_HERE" +# display-name: "&r" contents: 1: @@ -109,4 +109,4 @@ contents: whites: material: STAINED_GLASS_PANE display-name: "&r" - slot: "10,16" \ No newline at end of file + slot: "10,16" diff --git a/src/main/resources/version-dependent/master/menus/enchanter-menu.yml b/src/main/resources/version-dependent/master/menus/enchanter-menu.yml index 9cb5e27..a9809e7 100644 --- a/src/main/resources/version-dependent/master/menus/enchanter-menu.yml +++ b/src/main/resources/version-dependent/master/menus/enchanter-menu.yml @@ -1,10 +1,10 @@ title: "Enchanter" rows: 3 - #You can choose to fill the entire inventory with this material - #fill: - # material: "MATERIAL_HERE" - # display-name: "&r" +# You can choose to fill the entire inventory with this material +# fill: +# material: "MATERIAL_HERE" +# display-name: "&r" contents: 1: @@ -102,4 +102,4 @@ contents: whites: material: WHITE_STAINED_GLASS_PANE display-name: "&r" - slot: "10,16" \ No newline at end of file + slot: "10,16"