fix circular dependency

WHY is there no warning when it happens
This commit is contained in:
alexcrea 2025-03-18 14:38:19 +01:00
parent 51dbbccc1c
commit c4ad5ae28e
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
2 changed files with 14 additions and 8 deletions

View file

@ -31,22 +31,22 @@ enum class AnvilUseType(
"Custom Craft", Material.CRAFTING_TABLE "Custom Craft", Material.CRAFTING_TABLE
), ),
LORE_EDIT_BOOK_APPEND( LORE_EDIT_BOOK_APPEND(
"lore_edit_book_append", LoreEditType.APPEND_BOOK.rootPath, "lore_edit_book_append", "lore_edit.book_and_quil.append",
WorkPenaltyPart(false, false), WorkPenaltyPart(false, false),
"Book Add", Material.WRITABLE_BOOK "Book Add", Material.WRITABLE_BOOK
), ),
LORE_EDIT_BOOK_REMOVE( LORE_EDIT_BOOK_REMOVE(
"lore_edit_book_remove", LoreEditType.REMOVE_BOOK.rootPath, "lore_edit_book_remove", "lore_edit.book_and_quil.remove",
WorkPenaltyPart(false, false), WorkPenaltyPart(false, false),
"Book Remove", Material.WRITABLE_BOOK "Book Remove", Material.WRITABLE_BOOK
), ),
LORE_EDIT_PAPER_APPEND( LORE_EDIT_PAPER_APPEND(
"lore_edit_paper_append", LoreEditType.APPEND_PAPER.rootPath, "lore_edit_paper_append", "lore_edit.paper.append_line",
WorkPenaltyPart(false, false), WorkPenaltyPart(false, false),
"Paper Add", Material.WRITABLE_BOOK "Paper Add", Material.WRITABLE_BOOK
), ),
LORE_EDIT_PAPER_REMOVE( LORE_EDIT_PAPER_REMOVE(
"lore_edit_paper_remove", LoreEditType.REMOVE_PAPER.rootPath, "lore_edit_paper_remove", "lore_edit.paper.remove_line",
WorkPenaltyPart(false, false), WorkPenaltyPart(false, false),
"Paper Remove", Material.WRITABLE_BOOK "Paper Remove", Material.WRITABLE_BOOK
), ),

View file

@ -21,12 +21,18 @@ enum class LoreEditType(
val isAppend: Boolean, val isAppend: Boolean,
val isMultiLine: Boolean, val isMultiLine: Boolean,
) { ) {
APPEND_BOOK("lore_edit.book_and_quil.append", AnvilUseType.LORE_EDIT_BOOK_APPEND, true, true), APPEND_BOOK(AnvilUseType.LORE_EDIT_BOOK_APPEND, true, true),
REMOVE_BOOK("lore_edit.book_and_quil.remove", AnvilUseType.LORE_EDIT_BOOK_REMOVE, false, true), REMOVE_BOOK(AnvilUseType.LORE_EDIT_BOOK_REMOVE, false, true),
APPEND_PAPER("lore_edit.paper.append_line", AnvilUseType.LORE_EDIT_PAPER_APPEND, true, false), APPEND_PAPER(AnvilUseType.LORE_EDIT_PAPER_APPEND, true, false),
REMOVE_PAPER("lore_edit.paper.remove_line", AnvilUseType.LORE_EDIT_PAPER_REMOVE, false, false), REMOVE_PAPER(AnvilUseType.LORE_EDIT_PAPER_REMOVE, false, false),
; ;
constructor(
useType: AnvilUseType,
isAppend: Boolean,
isMultiLine: Boolean,
) : this(useType.path, useType, isAppend, isMultiLine)
/** /**
* If this edit type is enabled * If this edit type is enabled
*/ */