Skip to content

Commit 7cefb69

Browse files
committed
Add missing documentation.
1 parent 061895c commit 7cefb69

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/main/java/me/catcoder/sidebar/Sidebar.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,22 @@ public void shiftLine(SidebarLine<R> line, int offset) {
158158
*
159159
* @param task - task to bind
160160
* @return the task
161+
*
162+
* @deprecated Use {@link #bindWrappedTask(WrappedTask)} instead.
161163
*/
162164
@Deprecated(since = "6.2.9")
163165
public BukkitTask bindBukkitTask(@NonNull BukkitTask task) {
164166
this.tasks.add(new WrappedBukkitTask(task));
165167
return task;
166168
}
167169

170+
/**
171+
* Binds a {@link WrappedTask} to this sidebar.
172+
* When the sidebar is destroyed, the task will be cancelled.
173+
*
174+
* @param task - task to bind
175+
* @return the task
176+
*/
168177
public WrappedTask bindWrappedTask(@NonNull WrappedTask task) {
169178
this.tasks.add(task);
170179
return task;

0 commit comments

Comments
 (0)