diff --git a/core/src/main/java/com/boydti/fawe/object/RunnableVal.java b/core/src/main/java/com/boydti/fawe/object/RunnableVal.java index 7777d1f8..45997dd0 100644 --- a/core/src/main/java/com/boydti/fawe/object/RunnableVal.java +++ b/core/src/main/java/com/boydti/fawe/object/RunnableVal.java @@ -1,6 +1,9 @@ package com.boydti.fawe.object; -public abstract class RunnableVal implements Runnable { +import java.util.function.Consumer; +import java.util.function.Supplier; + +public abstract class RunnableVal implements Runnable, Supplier, Consumer { public T value; public RunnableVal() { @@ -21,4 +24,14 @@ public abstract class RunnableVal implements Runnable { } public abstract void run(T value); + + @Override + public T get() { + return runAndGet(); + } + + @Override + public void accept(T t) { + run(value); + } }