001 package cpw.mods.fml.common; 002 003 import java.lang.annotation.ElementType; 004 import java.lang.annotation.Retention; 005 import java.lang.annotation.RetentionPolicy; 006 import java.lang.annotation.Target; 007 008 /** 009 * Declare a variable to be populated by a Bukkit Plugin proxy instance if the bukkit coremod 010 * is available. It can only be applied to field typed as {@link BukkitProxy} 011 * Generally it should be used in conjunction with {@link Mod#bukkitPlugin()} specifying the 012 * plugin to load. 013 * 014 * @author cpw 015 * 016 */ 017 @Retention(RetentionPolicy.RUNTIME) 018 @Target(ElementType.FIELD) 019 public @interface BukkitPluginRef 020 { 021 /** 022 * A reference (possibly version specific) to a Bukkit Plugin by name, using the name@versionbound 023 * specification. If this is a bukkit enabled environment the field annotated by this 024 * will be populated with a {@link BukkitProxy} instance if possible. This proxy will be gotten by 025 * reflectively calling the "getModProxy" method on the bukkit plugin instance. 026 * @return The name of the plugin which we will inject into this field 027 */ 028 String value(); 029 }