Class IslandGenerator
java.lang.Object
us.talabrek.ultimateskyblock.island.IslandGenerator
The factory for creating islands (actual blocks).
-
Constructor Summary
ConstructorDescriptionIslandGenerator
(@NotNull File dataFolder, @NotNull org.bukkit.configuration.file.FileConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionboolean
createIsland
(@NotNull PlayerPerk playerPerk, @NotNull org.bukkit.Location next, @Nullable String cSchem) Generate an island at the givenLocation
.boolean
findAndSetChest
(@NotNull org.bukkit.Location location, @NotNull Perk perk) Find the nearest chest at the givenLocation
and fill the chest with the starter andPerk
based items.Gets aList
of available schematic names.boolean
-
Constructor Details
-
IslandGenerator
public IslandGenerator(@NotNull @NotNull File dataFolder, @NotNull @NotNull org.bukkit.configuration.file.FileConfiguration config)
-
-
Method Details
-
getSchemeNames
Gets aList
of available schematic names.- Returns:
- List of available schematic names.
-
createIsland
public boolean createIsland(@NotNull @NotNull PlayerPerk playerPerk, @NotNull @NotNull org.bukkit.Location next, @Nullable @Nullable String cSchem) Generate an island at the givenLocation
.- Parameters:
playerPerk
- PlayerPerk object for the island owner.next
- Location to generate an island.cSchem
- New island schematic.- Returns:
- True if the island was generated, false otherwise.
-
findAndSetChest
public boolean findAndSetChest(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull Perk perk) Find the nearest chest at the givenLocation
and fill the chest with the starter andPerk
based items.- Parameters:
location
- Location to search for a chest.perk
- Perk containing extra perk-based items to add.- Returns:
- True if the chest is found and filled, false otherwise.
-
setChest
public boolean setChest(@Nullable @Nullable org.bukkit.Location chestLocation, @NotNull @NotNull Perk perk) - Parameters:
chestLocation
- Location of the chest block.perk
- Perk containing extra perk-based items to add.- Returns:
- True if the chest is found and filled, false otherwise.
-