PetMigrations

public final class PetMigrations

Night migrations: now and then a flock of a migrating species crosses the sky over a player and is gone after the crossing. The members are wild pets of the species on a migration route, so they look and animate like the pets, and a player who reaches one can tame it. Each player gets one roll per night, the first time the schedule sees them in that night; a won roll picks a moment in the rest of the night, and the flock starts then if the player is under open sky (otherwise it tries again until the night runs out). A flying species takes part through a migration: section in its pet file, as long as migrate is among its behaviors (the flying defaults include it); the schedule's own settings live in pets.yml.

Constructors

Link copied to clipboard
public void PetMigrations(Plugin plugin)

Types

Link copied to clipboard
public final class Settings extends Record
The pets.yml settings of the schedule and of every flock.

Functions

Link copied to clipboard
public List<MigrationFlock> flocks()
Flocks in the air now.
Link copied to clipboard
public static void loadSettings(FileConfiguration config)
Reads the migrations section of pets.yml, writing any missing key with its default and comment.
Link copied to clipboard
Link copied to clipboard
public MigrationFlock start(Player player, PetSpecies species, boolean forced)
Sends a flock over the player now.
Link copied to clipboard
public void stopAll()
Takes every flock out of the sky and forgets the rolls.
Link copied to clipboard
public void tick(long ticks)
Called by the interaction pass with its clock; the schedule looks around every five seconds.