public interface LootableInventory extends Lootable
Modifier and Type | Method and Description |
---|---|
long |
getLastFilled()
Gets the timestamp in milliseconds that the Lootable object was last refilled
|
default @Nullable Long |
getLastLooted(@NotNull Player player)
Gets the timestamp, in milliseconds, of when the player last looted this object
|
@Nullable Long |
getLastLooted(@NotNull UUID player)
Gets the timestamp, in milliseconds, of when the player last looted this object
|
long |
getNextRefill()
Gets the timestamp in milliseconds that the Lootable object will refill
|
boolean |
hasBeenFilled()
Whether or not this object has ever been filled
|
boolean |
hasPendingRefill()
Returns Whether or not this object has been filled and now has a pending refill
|
default boolean |
hasPlayerLooted(@NotNull Player player)
Has this player ever looted this block
|
boolean |
hasPlayerLooted(@NotNull UUID player)
Has this player ever looted this block
|
boolean |
isRefillEnabled()
Server owners have to enable whether or not an object in a world should refill
|
default boolean |
setHasPlayerLooted(@NotNull Player player,
boolean looted)
Change the state of whether or not a player has looted this block
|
boolean |
setHasPlayerLooted(@NotNull UUID player,
boolean looted)
Change the state of whether or not a player has looted this block
|
long |
setNextRefill(long refillAt)
Sets the timestamp in milliseconds of the next refill for this object
|
clearLootTable, getLootTable, getSeed, hasLootTable, setLootTable, setLootTable, setSeed
boolean isRefillEnabled()
boolean hasBeenFilled()
default boolean hasPlayerLooted(@NotNull @NotNull Player player)
player
- The player to checkboolean hasPlayerLooted(@NotNull @NotNull UUID player)
player
- The player to check@Nullable default @Nullable Long getLastLooted(@NotNull @NotNull Player player)
player
- The player to check@Nullable @Nullable Long getLastLooted(@NotNull @NotNull UUID player)
player
- The player to checkdefault boolean setHasPlayerLooted(@NotNull @NotNull Player player, boolean looted)
player
- The player to change state forlooted
- true to add player to looted list, false to removeboolean setHasPlayerLooted(@NotNull @NotNull UUID player, boolean looted)
player
- The player to change state forlooted
- true to add player to looted list, false to removeboolean hasPendingRefill()
long getLastFilled()
long getNextRefill()
long setNextRefill(long refillAt)
refillAt
- timestamp in milliseconds. -1 to clear next refillCopyright © 2021. All rights reserved.