26 lines
482 B
Java
26 lines
482 B
Java
package net.raphimc.viaprotocolhack.util;
|
|
|
|
import com.viaversion.viaversion.api.platform.PlatformTask;
|
|
|
|
import java.util.concurrent.Future;
|
|
|
|
public class FutureTaskId implements PlatformTask<Future<?>> {
|
|
|
|
private final Future<?> object;
|
|
|
|
public FutureTaskId(Future<?> object) {
|
|
this.object = object;
|
|
}
|
|
|
|
@Override
|
|
public Future<?> getObject() {
|
|
return object;
|
|
}
|
|
|
|
@Override
|
|
public void cancel() {
|
|
object.cancel(false);
|
|
}
|
|
|
|
}
|