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 Long |
getLastLooted(Player player)
Gets the timestamp, in milliseconds, of when the player last looted this object
|
Long |
getLastLooted(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(Player player)
Has this player ever looted this block
|
boolean |
hasPlayerLooted(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(Player player,
boolean looted)
Change the state of whether or not a player has looted this block
|
boolean |
setHasPlayerLooted(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, getLootTableName, getLootTableSeed, hasLootTable, setLootTable, setLootTable, setLootTableSeed
boolean isRefillEnabled()
boolean hasBeenFilled()
default boolean hasPlayerLooted(Player player)
player
- The player to checkboolean hasPlayerLooted(UUID player)
player
- The player to checkdefault Long getLastLooted(Player player)
player
- The player to checkLong getLastLooted(UUID player)
player
- The player to checkdefault boolean setHasPlayerLooted(Player player, boolean looted)
player
- The player to change state forlooted
- true to add player to looted list, false to removeboolean setHasPlayerLooted(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.