SPIGOT-1638 / SPIGOT-1673: Rework Potions API

By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
Bukkit/Spigot
2016-03-02 20:45:27 -05:00
parent a7e0658387
commit 949890d29d
16 changed files with 407 additions and 312 deletions

View File

@@ -318,6 +318,20 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/
public Arrow spawnArrow(Location location, Vector direction, float speed, float spread);
/**
* Creates an arrow entity of the given class at the given {@link Location}
*
* @param <T> type of arrow to spawn
* @param location Location to spawn the arrow
* @param direction Direction to shoot the arrow in
* @param speed Speed of the arrow. A recommend speed is 0.6
* @param spread Spread of the arrow. A recommend spread is 12
* @param clazz the Entity class for the arrow
* {@link org.bukkit.entity.SpectralArrow},{@link org.bukkit.entity.Arrow},{@link org.bukkit.entity.TippedArrow}
* @return Arrow entity spawned as a result of this method
*/
public <T extends Arrow> T spawnArrow(Location location, Vector direction, float speed, float spread, Class<T> clazz);
/**
* Creates a tree at the given {@link Location}
*