public interface MissionsManager
Modifier and Type | Method and Description |
---|---|
boolean |
canComplete(SuperiorPlayer superiorPlayer,
Mission<?> mission)
Check whether or not a player can complete a mission.
|
boolean |
canCompleteAgain(SuperiorPlayer superiorPlayer,
Mission<?> mission)
Check whether or not the player can complete the mission again.
|
boolean |
canCompleteNoProgress(SuperiorPlayer superiorPlayer,
Mission<?> mission)
Check whether or not a player can complete a mission, without considering progress.
|
boolean |
canPassAllChecks(SuperiorPlayer superiorPlayer,
Mission<?> mission)
Check whether or not a player can pass all the checks to complete a mission.
|
java.util.List<Mission<?>> |
getAllMissions()
Get a list of all the missions.
|
java.util.List<Mission<?>> |
getIslandMissions()
Get a list of all missions that are island missions.
|
Mission<?> |
getMission(java.lang.String name)
Get a mission by its name.
|
java.util.List<MissionCategory> |
getMissionCategories()
Get all the mission categories.
|
MissionCategory |
getMissionCategory(java.lang.String name)
Get a mission category by its name.
|
java.util.List<Mission<?>> |
getPlayerMissions()
Get a list of all missions that are player missions.
|
boolean |
hasAllRequiredMissions(SuperiorPlayer superiorPlayer,
Mission<?> mission)
Check whether or not a player has all the required missions to complete a mission.
|
boolean |
hasCompleted(SuperiorPlayer superiorPlayer,
Mission<?> mission)
Check whether or not the player has already completed the mission.
|
void |
loadMissionsData()
Load all data related to missions.
|
void |
loadMissionsData(java.util.List<Mission<?>> missionsList)
Load all data related to missions of specific missions.
|
void |
rewardMission(Mission<?> mission,
SuperiorPlayer superiorPlayer,
boolean checkAutoReward)
Reward a player for completing a specific mission.
|
void |
rewardMission(Mission<?> mission,
SuperiorPlayer superiorPlayer,
boolean checkAutoReward,
boolean forceReward)
Reward a player for completing a specific mission.
|
void |
rewardMission(Mission<?> mission,
SuperiorPlayer superiorPlayer,
boolean checkAutoReward,
boolean forceReward,
java.util.function.Consumer<java.lang.Boolean> result)
Reward a player for completing a specific mission.
|
void |
saveMissionsData()
Save all data related to missions.
|
@Nullable Mission<?> getMission(java.lang.String name)
name
- The name to check.java.util.List<Mission<?>> getAllMissions()
java.util.List<Mission<?>> getPlayerMissions()
java.util.List<Mission<?>> getIslandMissions()
@Nullable MissionCategory getMissionCategory(java.lang.String name)
name
- The name to check.java.util.List<MissionCategory> getMissionCategories()
boolean hasCompleted(SuperiorPlayer superiorPlayer, Mission<?> mission)
superiorPlayer
- The player to check.mission
- The mission to check.boolean canComplete(SuperiorPlayer superiorPlayer, Mission<?> mission)
superiorPlayer
- The player to check.mission
- The mission to check.boolean canCompleteNoProgress(SuperiorPlayer superiorPlayer, Mission<?> mission)
superiorPlayer
- The player to check.mission
- The mission to check.boolean canCompleteAgain(SuperiorPlayer superiorPlayer, Mission<?> mission)
superiorPlayer
- The player to check.mission
- The mission to check.boolean hasAllRequiredMissions(SuperiorPlayer superiorPlayer, Mission<?> mission)
superiorPlayer
- The player to check.mission
- The mission to check.boolean canPassAllChecks(SuperiorPlayer superiorPlayer, Mission<?> mission)
superiorPlayer
- The player to check.mission
- The mission to check.void rewardMission(Mission<?> mission, SuperiorPlayer superiorPlayer, boolean checkAutoReward)
mission
- The mission that was completed.superiorPlayer
- The player to reward.checkAutoReward
- Whether or not the auto reward flag should be checked.void rewardMission(Mission<?> mission, SuperiorPlayer superiorPlayer, boolean checkAutoReward, boolean forceReward)
mission
- The mission that was completed.superiorPlayer
- The player to reward.checkAutoReward
- Whether or not the auto reward flag should be checked.forceReward
- Should the plugin force the reward to the player (no checks will be ran)void rewardMission(Mission<?> mission, SuperiorPlayer superiorPlayer, boolean checkAutoReward, boolean forceReward, @Nullable java.util.function.Consumer<java.lang.Boolean> result)
mission
- The mission that was completed.superiorPlayer
- The player to reward.checkAutoReward
- Whether or not the auto reward flag should be checked.forceReward
- Should the plugin force the reward to the player (no checks will be ran)result
- The result of the reward.void saveMissionsData()
void loadMissionsData()
void loadMissionsData(java.util.List<Mission<?>> missionsList)