mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
SPIGOT-5311: Add API to get/set item associated with throwable projectiles
By: Lars Dormans <lars.dormans@live.nl>
This commit is contained in:
@@ -3,4 +3,4 @@ package org.bukkit.entity;
|
|||||||
/**
|
/**
|
||||||
* Represents a thrown egg.
|
* Represents a thrown egg.
|
||||||
*/
|
*/
|
||||||
public interface Egg extends Projectile {}
|
public interface Egg extends ThrowableProjectile {}
|
||||||
|
@@ -3,6 +3,6 @@ package org.bukkit.entity;
|
|||||||
/**
|
/**
|
||||||
* Represents a thrown Ender Pearl entity
|
* Represents a thrown Ender Pearl entity
|
||||||
*/
|
*/
|
||||||
public interface EnderPearl extends Projectile {
|
public interface EnderPearl extends ThrowableProjectile {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -3,5 +3,5 @@ package org.bukkit.entity;
|
|||||||
/**
|
/**
|
||||||
* Represents a large {@link Fireball}
|
* Represents a large {@link Fireball}
|
||||||
*/
|
*/
|
||||||
public interface LargeFireball extends Fireball {
|
public interface LargeFireball extends SizedFireball {
|
||||||
}
|
}
|
||||||
|
25
paper-api/src/main/java/org/bukkit/entity/SizedFireball.java
Normal file
25
paper-api/src/main/java/org/bukkit/entity/SizedFireball.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package org.bukkit.entity;
|
||||||
|
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a sized fireball.
|
||||||
|
*/
|
||||||
|
public interface SizedFireball extends Fireball {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the display {@link ItemStack}.
|
||||||
|
*
|
||||||
|
* @return display ItemStack
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
ItemStack getDisplayItem();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the display {@link ItemStack} for the fireball.
|
||||||
|
*
|
||||||
|
* @param item the ItemStack to display
|
||||||
|
*/
|
||||||
|
void setDisplayItem(@NotNull ItemStack item);
|
||||||
|
}
|
@@ -3,6 +3,6 @@ package org.bukkit.entity;
|
|||||||
/**
|
/**
|
||||||
* Represents a small {@link Fireball}
|
* Represents a small {@link Fireball}
|
||||||
*/
|
*/
|
||||||
public interface SmallFireball extends Fireball {
|
public interface SmallFireball extends SizedFireball {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -3,4 +3,4 @@ package org.bukkit.entity;
|
|||||||
/**
|
/**
|
||||||
* Represents a snowball.
|
* Represents a snowball.
|
||||||
*/
|
*/
|
||||||
public interface Snowball extends Projectile {}
|
public interface Snowball extends ThrowableProjectile {}
|
||||||
|
@@ -0,0 +1,22 @@
|
|||||||
|
package org.bukkit.entity;
|
||||||
|
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
public interface ThrowableProjectile extends Projectile {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the ItemStack the thrown projectile will display.
|
||||||
|
*
|
||||||
|
* @return The thrown item display ItemStack
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
ItemStack getItem();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the display ItemStack for the thrown projectile.
|
||||||
|
*
|
||||||
|
* @param item ItemStack set to be displayed
|
||||||
|
*/
|
||||||
|
void setItem(@NotNull ItemStack item);
|
||||||
|
}
|
@@ -3,6 +3,6 @@ package org.bukkit.entity;
|
|||||||
/**
|
/**
|
||||||
* Represents a thrown Experience bottle.
|
* Represents a thrown Experience bottle.
|
||||||
*/
|
*/
|
||||||
public interface ThrownExpBottle extends Projectile {
|
public interface ThrownExpBottle extends ThrowableProjectile {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user