Class VersionMatcher
java.lang.Object
com.github.stefvanschie.inventoryframework.util.version.VersionMatcher
Utility class containing versioning related methods.
- Since:
- 0.8.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull com.github.stefvanschie.inventoryframework.abstraction.AnvilInventory
newAnvilInventory
(@NotNull Version version, @NotNull InventoryHolder inventoryHolder) Gets a new anvil inventory for the specified version of the specified inventory holder.static @NotNull com.github.stefvanschie.inventoryframework.abstraction.BeaconInventory
newBeaconInventory
(@NotNull Version version, @NotNull InventoryHolder inventoryHolder) Gets a new beacon inventory for the specified version of the specified inventory holder.static @NotNull com.github.stefvanschie.inventoryframework.abstraction.CartographyTableInventory
newCartographyTableInventory
(@NotNull Version version, @NotNull InventoryHolder inventoryHolder) Gets a new cartography table inventory for the specified version of the specified inventory holder.static @NotNull com.github.stefvanschie.inventoryframework.abstraction.EnchantingTableInventory
newEnchantingTableInventory
(@NotNull Version version, @NotNull InventoryHolder inventoryHolder) Gets a new enchanting table inventory for the specified version of the specified inventory holder.static @NotNull com.github.stefvanschie.inventoryframework.abstraction.GrindstoneInventory
newGrindstoneInventory
(@NotNull Version version, @NotNull InventoryHolder inventoryHolder) Gets a new grindstone inventory for the specified version of the specified inventory holder.static @NotNull com.github.stefvanschie.inventoryframework.abstraction.MerchantInventory
newMerchantInventory
(@NotNull Version version) Gets a new merchant inventory for the specified version.static @NotNull com.github.stefvanschie.inventoryframework.abstraction.SmithingTableInventory
newModernSmithingTableInventory
(@NotNull Version version, @NotNull InventoryHolder inventoryHolder) Gets a new smithing table inventory for the specified version of the specified inventory holder.static @NotNull com.github.stefvanschie.inventoryframework.abstraction.SmithingTableInventory
newSmithingTableInventory
(@NotNull Version version, @NotNull InventoryHolder inventoryHolder) Gets a new legacy smithing table inventory for the specified version of the specified inventory holder.static @NotNull com.github.stefvanschie.inventoryframework.abstraction.StonecutterInventory
newStonecutterInventory
(@NotNull Version version, @NotNull InventoryHolder inventoryHolder) Gets a new stonecutter inventory for the specified version of the specified inventory holder.
-
Constructor Details
-
VersionMatcher
public VersionMatcher()
-
-
Method Details
-
newAnvilInventory
@NotNull @Contract(pure=true) public static @NotNull com.github.stefvanschie.inventoryframework.abstraction.AnvilInventory newAnvilInventory(@NotNull @NotNull Version version, @NotNull @NotNull InventoryHolder inventoryHolder) Gets a new anvil inventory for the specified version of the specified inventory holder.- Parameters:
version
- the version to get the inventory ofinventoryHolder
- the inventory holder- Returns:
- the anvil inventory
- Since:
- 0.8.0
-
newBeaconInventory
@NotNull @Contract(pure=true) public static @NotNull com.github.stefvanschie.inventoryframework.abstraction.BeaconInventory newBeaconInventory(@NotNull @NotNull Version version, @NotNull @NotNull InventoryHolder inventoryHolder) Gets a new beacon inventory for the specified version of the specified inventory holder.- Parameters:
version
- the version to get the inventory ofinventoryHolder
- the inventory holder- Returns:
- the beacon inventory
- Since:
- 0.8.0
-
newCartographyTableInventory
@NotNull @Contract(pure=true) public static @NotNull com.github.stefvanschie.inventoryframework.abstraction.CartographyTableInventory newCartographyTableInventory(@NotNull @NotNull Version version, @NotNull @NotNull InventoryHolder inventoryHolder) Gets a new cartography table inventory for the specified version of the specified inventory holder.- Parameters:
version
- the version to get the inventory ofinventoryHolder
- the inventory holder- Returns:
- the cartography table inventory
- Since:
- 0.8.0
-
newEnchantingTableInventory
@NotNull @Contract(pure=true) public static @NotNull com.github.stefvanschie.inventoryframework.abstraction.EnchantingTableInventory newEnchantingTableInventory(@NotNull @NotNull Version version, @NotNull @NotNull InventoryHolder inventoryHolder) Gets a new enchanting table inventory for the specified version of the specified inventory holder.- Parameters:
version
- the version to get the inventory ofinventoryHolder
- the inventory holder- Returns:
- the enchanting table inventory
- Since:
- 0.8.0
-
newGrindstoneInventory
@NotNull @Contract(pure=true) public static @NotNull com.github.stefvanschie.inventoryframework.abstraction.GrindstoneInventory newGrindstoneInventory(@NotNull @NotNull Version version, @NotNull @NotNull InventoryHolder inventoryHolder) Gets a new grindstone inventory for the specified version of the specified inventory holder.- Parameters:
version
- the version to get the inventory ofinventoryHolder
- the inventory holder- Returns:
- the grindstone inventory
- Since:
- 0.8.0
-
newMerchantInventory
@NotNull @Contract(pure=true) public static @NotNull com.github.stefvanschie.inventoryframework.abstraction.MerchantInventory newMerchantInventory(@NotNull @NotNull Version version) Gets a new merchant inventory for the specified version.- Parameters:
version
- the version to get the inventory of- Returns:
- the merchant inventory
- Since:
- 0.10.1
-
newModernSmithingTableInventory
@NotNull @Contract(pure=true) public static @NotNull com.github.stefvanschie.inventoryframework.abstraction.SmithingTableInventory newModernSmithingTableInventory(@NotNull @NotNull Version version, @NotNull @NotNull InventoryHolder inventoryHolder) Gets a new smithing table inventory for the specified version of the specified inventory holder. If a smithing table is requested for a version that does not have smithing tables, anUnsupportedVersionException
is thrown.- Parameters:
version
- the version to get the inventory ofinventoryHolder
- the inventory holder- Returns:
- the smithing table inventory
- Throws:
UnsupportedVersionException
- when a smithing table is requested on a version without smithing tables- Since:
- 0.10.9
-
newSmithingTableInventory
@NotNull @Contract(pure=true) public static @NotNull com.github.stefvanschie.inventoryframework.abstraction.SmithingTableInventory newSmithingTableInventory(@NotNull @NotNull Version version, @NotNull @NotNull InventoryHolder inventoryHolder) Gets a new legacy smithing table inventory for the specified version of the specified inventory holder. If a smithing table is requested for a version that does not have smithing tables, anUnsupportedVersionException
is thrown.- Parameters:
version
- the version to get the inventory ofinventoryHolder
- the inventory holder- Returns:
- the smithing table inventory
- Throws:
UnsupportedVersionException
- when a smithing table is requested on a version without smithing tables- Since:
- 0.8.0
-
newStonecutterInventory
@NotNull @Contract(pure=true) public static @NotNull com.github.stefvanschie.inventoryframework.abstraction.StonecutterInventory newStonecutterInventory(@NotNull @NotNull Version version, @NotNull @NotNull InventoryHolder inventoryHolder) Gets a new stonecutter inventory for the specified version of the specified inventory holder.- Parameters:
version
- the version to get the inventory ofinventoryHolder
- the inventory holder- Returns:
- the stonecutter inventory
- Since:
- 0.8.0
-