Class ExperimentData
java.lang.Object
org.skriptlang.skript.lang.experiment.ExperimentData
Container for holding
Experiments that must be enabled or disabled to use.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ExperimentData.Builderbuilder()Create and return a newExperimentData.Builder.booleancheckRequirements(ExperimentSet experiments) Check if the requirements of thisExperimentDataare met.booleancheckRequirementsAndError(ExperimentSet experiments) Check if the requirements of thisExperimentDataare met.Construct aStringcombining whatExperiments need to be enabled and/or disabled in order to use.static ExperimentDatacreateSingularData(Experiment experiment) Create a newExperimentDatawith only a singular requiredExperiment@Unmodifiable Set<Experiment> Get theExperiments that must be disabled in order to use.Get theStringused to error whencheckRequirementsAndError(ExperimentSet)fails.@Unmodifiable Set<Experiment> Get theExperiments that must be enabled in order to use.Get aExperimentData.Builderwith the current data of thisExperimentData.
-
Method Details
-
builder
Create and return a newExperimentData.Builder. -
createSingularData
Create a newExperimentDatawith only a singular requiredExperiment- Parameters:
experiment- The requiredExperiment.- Returns:
ExperimentData
-
getRequired
Get theExperiments that must be enabled in order to use. -
getDisallowed
Get theExperiments that must be disabled in order to use. -
getErrorMessage
Get theStringused to error whencheckRequirementsAndError(ExperimentSet)fails. If theerrorMessagewas not manually set when buildingExperimentData.Builder, uses the message fromconstructError(). -
checkRequirements
Check if the requirements of thisExperimentDataare met.- Parameters:
experiments- The current enabledExperiments.- Returns:
Trueif the requirements were met.
-
checkRequirementsAndError
Check if the requirements of thisExperimentDataare met. If the requirements are not met, will produce aSkript.error(String)usingerrorMessage.- Parameters:
experiments- The current enabledExperiments.- Returns:
Trueif the requirements were met.
-
constructError
Construct aStringcombining whatExperiments need to be enabled and/or disabled in order to use. -
toBuilder
Get aExperimentData.Builderwith the current data of thisExperimentData.
-