All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.metadata.MetadataValue Maven / Gradle / Ivy

There is a newer version: 1.20.40-r1
Show newest version
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