cn.nukkit.metadata.MetadataValue Maven / Gradle / Ivy
package cn.nukkit.metadata;
import cn.nukkit.plugin.Plugin;
import java.lang.ref.WeakReference;
/**
* @author MagicDroidX (Nukkit Project)
*/
public abstract class MetadataValue {
protected final WeakReference owningPlugin;
protected MetadataValue(Plugin owningPlugin) {
this.owningPlugin = new WeakReference<>(owningPlugin);
}
public Plugin getOwningPlugin() {
return this.owningPlugin.get();
}
public abstract Object value();
public abstract void invalidate();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy