We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 061895c commit 7cefb69Copy full SHA for 7cefb69
1 file changed
src/main/java/me/catcoder/sidebar/Sidebar.java
@@ -158,13 +158,22 @@ public void shiftLine(SidebarLine<R> line, int offset) {
158
*
159
* @param task - task to bind
160
* @return the task
161
+ *
162
+ * @deprecated Use {@link #bindWrappedTask(WrappedTask)} instead.
163
*/
164
@Deprecated(since = "6.2.9")
165
public BukkitTask bindBukkitTask(@NonNull BukkitTask task) {
166
this.tasks.add(new WrappedBukkitTask(task));
167
return task;
168
}
169
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
+ */
177
public WrappedTask bindWrappedTask(@NonNull WrappedTask task) {
178
this.tasks.add(task);
179
0 commit comments