mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-04-13 09:41:09 +00:00
#1083: Add API methods to Vault
This commit is contained in:
parent
3339db1661
commit
c0302c1911
1 changed files with 90 additions and 1 deletions
|
@ -1,10 +1,99 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.loot.LootTable;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a trial spawner.
|
||||
* Represents a captured state of a vault.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface Vault extends TileState {
|
||||
|
||||
/**
|
||||
* Gets the distance(squared) at which a player must enter for this vault to
|
||||
* activate.
|
||||
*
|
||||
* @return the distance(squared) at which a player must enter for this vault
|
||||
* to activate.
|
||||
*/
|
||||
double getActivationRange();
|
||||
|
||||
/**
|
||||
* Sets the distance(squared) at which a player must enter for this vault to
|
||||
* activate.
|
||||
*
|
||||
* @param range the distance(squared) at which a player must enter for this
|
||||
* vault to activate.
|
||||
*/
|
||||
void setActivationRange(double range);
|
||||
|
||||
/**
|
||||
* Gets the distance(squared) at which a player must exit for the vault to
|
||||
* deactivate.
|
||||
*
|
||||
* @return the distance(squared) at which a player must exit for the vault
|
||||
* to deactivate.
|
||||
*/
|
||||
double getDeactivationRange();
|
||||
|
||||
/**
|
||||
* Sets the distance(squared) at which a player must exit for this vault to
|
||||
* deactivate.
|
||||
*
|
||||
* @param range the distance(squared) at which a player must exit for this
|
||||
* vault to deactivate.
|
||||
*/
|
||||
void setDeactivationRange(double range);
|
||||
|
||||
/**
|
||||
* Gets the {@link LootTable} this vault will pick rewards from.
|
||||
*
|
||||
* @return the loot table
|
||||
*/
|
||||
@NotNull
|
||||
LootTable getLootTable();
|
||||
|
||||
/**
|
||||
* Sets the {@link LootTable} this vault will pick rewards from.
|
||||
*
|
||||
* @param table the loot table
|
||||
*/
|
||||
void setLootTable(@NotNull LootTable table);
|
||||
|
||||
/**
|
||||
* Gets the {@link LootTable} this vault will display items from. <br>
|
||||
* If this value is null the regular loot table will be used to display
|
||||
* items.
|
||||
*
|
||||
* @return the loot table to display items from
|
||||
*/
|
||||
@Nullable
|
||||
LootTable getDisplayLootTable();
|
||||
|
||||
/**
|
||||
* Sets the {@link LootTable} this vault will display items from. <br>
|
||||
* If this value is set to null the regular loot table will be used to
|
||||
* display items.
|
||||
*
|
||||
* @param table the loot table to display items from
|
||||
*/
|
||||
void setDisplayLootTable(@Nullable LootTable table);
|
||||
|
||||
/**
|
||||
* Gets the {@link ItemStack} players must use to unlock this vault.
|
||||
*
|
||||
* @return the key item
|
||||
*/
|
||||
@NotNull
|
||||
ItemStack getKeyItem();
|
||||
|
||||
/**
|
||||
* Sets the {@link ItemStack} players must use to unlock this vault.
|
||||
*
|
||||
* @param keyItem the key item
|
||||
*/
|
||||
void setKeyItem(@NotNull ItemStack keyItem);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue