001/*
002 * Forge Mod Loader
003 * Copyright (c) 2012-2013 cpw.
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser Public License v2.1
006 * which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
008 * 
009 * Contributors:
010 *     cpw - implementation
011 */
012
013package cpw.mods.fml.common;
014
015import java.lang.annotation.ElementType;
016import java.lang.annotation.Retention;
017import java.lang.annotation.RetentionPolicy;
018import java.lang.annotation.Target;
019
020/**
021 * Declare a variable to be populated by a Bukkit Plugin proxy instance if the bukkit coremod
022 * is available. It can only be applied to field typed as {@link BukkitProxy}
023 * Generally it should be used in conjunction with {@link Mod#bukkitPlugin()} specifying the
024 * plugin to load.
025 *
026 * @author cpw
027 *
028 */
029@Retention(RetentionPolicy.RUNTIME)
030@Target(ElementType.FIELD)
031public @interface BukkitPluginRef
032{
033    /**
034     * A reference (possibly version specific) to a Bukkit Plugin by name, using the name@versionbound
035     * specification. If this is a bukkit enabled environment the field annotated by this
036     * will be populated with a {@link BukkitProxy} instance if possible. This proxy will be gotten by
037     * reflectively calling the "getModProxy" method on the bukkit plugin instance.
038     * @return The name of the plugin which we will inject into this field
039     */
040    String value();
041}