Skip to content

Commit

Permalink
1.5.73
Browse files Browse the repository at this point in the history
BlobEditor#removeElement now has argument onRemove which runs once removes the element from the editor.
  • Loading branch information
anjoismysign committed Nov 29, 2022
1 parent d90235c commit 4b2ed2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/us/mytheria/bloblib/entities/BlobEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public List<VariableValue<T>> page(int page, int itemsPerPage) {
}

@SuppressWarnings("unchecked")
public void removeElement(Player player) {
public void removeElement(Player player, Runnable onRemove) {
loadPage(getPage(), false);
selectorManager.addSelectorListener(player, BlobSelectorListener.build(player,
() -> {
Expand All @@ -95,6 +95,7 @@ public void removeElement(Player player) {
return;
}
list.remove(input);
onRemove.run();
});
}, Collections.singletonList(new BlobActionBar(ChatColor.GRAY + "Click an element to remove it")),
this));
Expand Down

0 comments on commit 4b2ed2d

Please sign in to comment.