Animal Selector

Animal Selector

Animal Selector is an API for plugin developers to hook into and use in their entity related plugins. Animal Selector is perfect for plugins who require the user to select an animal for plugins to later manipulate.

Server Owners

You're probably here because a plugin you use has required you to download this plugin. You can get the latest version to the right of this page or on the files page.

Plugin Developers

Making a Bukkit plugin that requires players to select a animal? To prevent conflicts with other plugins when selecting entities, use Animal Selector! When a player wants to select an entity, all they need to do is sneak then right click the entity! We provide a super simple api that all plugins can hook into to get the entity information.

  1. First make sure you add
    depend: [AnimalSelector]
    
    to your plugin.yml
  2. Next download AnimalSelector and add it to your build path.
  3. After that, add the following code to call the plugin:
public static AnimalSelector getAnimalSelector() {
	//Get AnimalSelector plugin for later on use.
	AnimalSelector plugin = (AnimalSelector) Bukkit.getServer().getPluginManager().getPlugin("AnimalSelector");
	
	if (plugin == null || !(plugin instanceof AnimalSelector)) {
        Bukkit.getLogger().info("[WARNING] AnimalSelector isn't loaded yet.");
        return null;
    }
    return (AnimalSelector) plugin;
}
  1. Finally, you can get the selected entities by using
getAnimalSelector().getPlayerSelectedEntity(playerstring);

A more detailed documentation and a JavaDoc is in the process of getting written/created.

Plugins using Animal Selector

Animal Lock - nxtguy



HostHorde



Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    61050
  • Created
    Jul 7, 2013
  • Last Released File
    Never
  • Total Downloads
    2,546
  • License

Categories

Members

Recent Files