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

org.bukkit.metadata.FixedMetadataValue Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
package org.bukkit.metadata;

import org.bukkit.plugin.Plugin;

/**
 * A FixedMetadataValue is a special case metadata item that contains the same
 * value forever after initialization. Invalidating a FixedMetadataValue has
 * no effect.
 * 

* This class extends LazyMetadataValue for historical reasons, even though it * overrides all the implementation methods. it is possible that in the future * that the inheritance hierarchy may change. */ public class FixedMetadataValue extends LazyMetadataValue { /** * Store the internal value that is represented by this fixed value. */ private final Object internalValue; /** * Initializes a FixedMetadataValue with an Object * * @param owningPlugin the {@link Plugin} that created this metadata value * @param value the value assigned to this metadata value */ public FixedMetadataValue(Plugin owningPlugin, final Object value) { super(owningPlugin); this.internalValue = value; } @Override public void invalidate() { } @Override public Object value() { return internalValue; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy