Skip to content

Commit

Permalink
Replace registerIfAbsent by registerIfNew and make registerIfAbsent f…
Browse files Browse the repository at this point in the history
…ollow its name better
  • Loading branch information
alexcrea committed Oct 31, 2024
1 parent 8c95bff commit 3d01e53
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/xyz/alexcrea/cuanvil/api/ConflictBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,19 @@ public EnchantConflictGroup build(){

/**
* Register this conflict if not yet registered.
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder)}
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder, boolean) ConflictAPI.addConflict(this, true)}}
* @return True if successful.
*/
public boolean registerIfAbsent(){
return ConflictAPI.addConflict(this, true);
}

/**
* Register this conflict if not yet registered or deleted.
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder) ConflictAPI.addConflict(this)}
* @return True if successful.
*/
public boolean registerIfNew(){
return ConflictAPI.addConflict(this);
}

Expand Down

0 comments on commit 3d01e53

Please sign in to comment.