#898: Use Java Consumer instead of Bukkit Consumer

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
Bukkit/Spigot
2023-09-22 02:57:09 +10:00
parent a67391a13e
commit 8f34277f6a
3 changed files with 10 additions and 4 deletions

View File

@@ -5,13 +5,19 @@ package org.bukkit.util;
* result.
*
* @param <T> the type of the input to the operation
* @deprecated Use {@link java.util.function.Consumer} instead
*/
public interface Consumer<T> {
// Bukkit developer note (NOT plugin developers):
// NEVER use this consumer in the API.
// API methods which use this consumer will be remapped to Java's consumer at runtime, resulting in an error.
@Deprecated
public interface Consumer<T> extends java.util.function.Consumer<T> {
/**
* Performs this operation on the given argument.
*
* @param t the input argument
*/
@Override
void accept(T t);
}