#555: Item - add getters/setters for owner/thrower
By: Shane Bee <shanebolenback@me.com>
This commit is contained in:
parent
32e338b513
commit
54b0a6d645
1 changed files with 39 additions and 0 deletions
|
@ -1,7 +1,9 @@
|
||||||
package org.bukkit.entity;
|
package org.bukkit.entity;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a dropped item.
|
* Represents a dropped item.
|
||||||
|
@ -36,4 +38,41 @@ public interface Item extends Entity {
|
||||||
* @param delay New delay
|
* @param delay New delay
|
||||||
*/
|
*/
|
||||||
public void setPickupDelay(int delay);
|
public void setPickupDelay(int delay);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the owner of this item.
|
||||||
|
*
|
||||||
|
* Other entities will not be able to pickup this item when an owner is set.
|
||||||
|
*
|
||||||
|
* @param owner UUID of new owner
|
||||||
|
*/
|
||||||
|
public void setOwner(@Nullable UUID owner);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the owner of this item.
|
||||||
|
*
|
||||||
|
* @return UUID of owner
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public UUID getOwner();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the thrower of this item.
|
||||||
|
*
|
||||||
|
* The thrower is the entity which dropped the item. This affects the
|
||||||
|
* trigger criteria for item pickups, for things such as advancements.
|
||||||
|
*
|
||||||
|
* @param uuid UUID of thrower
|
||||||
|
*/
|
||||||
|
public void setThrower(@Nullable UUID uuid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the thrower of this item.
|
||||||
|
*
|
||||||
|
* The thrower is the entity which dropped the item.
|
||||||
|
*
|
||||||
|
* @return UUID of thrower
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public UUID getThrower();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue